1 |
slords |
1.1 |
Summary: Makes the SME server a dedicated rsync based backup server |
2 |
|
|
%define name smeserver-affa |
3 |
|
|
Name: %{name} |
4 |
|
|
%define version 0.9.0 |
5 |
mweinber |
1.10 |
%define release 10 |
6 |
slords |
1.1 |
Version: %{version} |
7 |
|
|
Release: %{release}%{?dist} |
8 |
|
|
License: GNU GPL (GNU General Public License) |
9 |
|
|
Group: Applications/Archiving |
10 |
|
|
Source: %{name}-%{version}.tar.gz |
11 |
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
12 |
|
|
BuildArch: noarch |
13 |
|
|
AutoReq: no |
14 |
|
|
Requires: smeserver-release >= 7 |
15 |
|
|
Requires: perl-Filesys-DiskFree |
16 |
|
|
BuildRequires: e-smith-devtools |
17 |
mweinber |
1.2 |
Patch0: smeserver-affa-0.9.0-debugsshquiet.patch |
18 |
mweinber |
1.4 |
Patch1: smeserver-affa-0.9.0-defaultRemoteHostName.patch |
19 |
mweinber |
1.5 |
Patch2: smeserver-affa-0.9.0-dovecotDeleteNewStyleIndexFiles.patch |
20 |
mweinber |
1.6 |
Patch3: smeserver-affa-0.9.0-createBackupFileOption.patch |
21 |
mweinber |
1.7 |
Patch4: smeserver-affa-0.9.0-createBackupFileOption2.patch |
22 |
mweinber |
1.9 |
Patch5: smeserver-affa-0.9.0-trapsignals.patch |
23 |
mweinber |
1.10 |
Patch5: smeserver-affa-0.9.0-trapsignals.patch |
24 |
|
|
Patch6: smeserver-affa-0.9.0-bug4035.patch |
25 |
slords |
1.1 |
|
26 |
|
|
%description |
27 |
|
|
Main purpose ist to make the SME server a dedicated rsync based backup server. |
28 |
|
|
Also providing functions to backup to USB disks or SMB shares in SOHO environments. |
29 |
|
|
|
30 |
|
|
%changelog |
31 |
mweinber |
1.10 |
* Mon Mar 10 2008 Michael Weinberger 0.9.0-10 |
32 |
|
|
Delete locally created watchdog file after remotecopy |
33 |
|
|
Bugfix 4035 |
34 |
|
|
Added default AutoUnmount property to sample script |
35 |
|
|
Fix man page |
36 |
|
|
Do not delete md5sum in --create-backup-file when verify is skipped by user |
37 |
|
|
Set lock in --create-backup-file |
38 |
mweinber |
1.9 |
* Sun Mar 09 2008 Michael Weinberger 0.9.0-9 |
39 |
|
|
trap signals in --create-backup-file |
40 |
|
|
* Sat Mar 08 2008 Michael Weinberger 0.9.0-8 |
41 |
mweinber |
1.8 |
Permissions in /usr/lib/affa |
42 |
|
|
* Sat Mar 08 2008 Michael Weinberger 0.9.0-7 |
43 |
mweinber |
1.7 |
md5sum in --create-backup-file |
44 |
mweinber |
1.6 |
* Fri Mar 07 2008 Michael Weinberger 0.9.0-6 |
45 |
|
|
Added option --create-backup-file |
46 |
|
|
Using line number as error code in affaErrorExit() |
47 |
|
|
Fixed /etc/profile.d/affa.sh |
48 |
|
|
|
49 |
mweinber |
1.5 |
* Mon Mar 03 2008 Michael Weinberger 0.9.0-5 |
50 |
|
|
- delete new style Dovecot's index files dovecot.index* |
51 |
|
|
- delete dovecot index files on remote server in --full-restore |
52 |
|
|
|
53 |
mweinber |
1.4 |
* Fri Feb 29 2008 Michael Weinberger 0.9.0-4 |
54 |
|
|
set localhost as default remoteHostName in /etc/e-smith/templates//etc/cron.d/affa/00jobs |
55 |
|
|
|
56 |
mweinber |
1.3 |
* Wed Feb 27 2008 Michael Weinberger 0.9.0-3 |
57 |
|
|
removed %post from spec file |
58 |
mweinber |
1.4 |
|
59 |
mweinber |
1.2 |
* Sat Feb 02 2008 Michael Weinberger 0.9.0-2 |
60 |
|
|
Bugfix: Report db was not deleted in deleteJob() |
61 |
|
|
don't use -q on ssh commands with Debug=yes |
62 |
|
|
|
63 |
slords |
1.1 |
* Fri Feb 1 2008 Shad L. Lords <slords@mail.com> 0.9.0-1 |
64 |
|
|
- Fix specfile for building in new buildsystem |
65 |
|
|
|
66 |
|
|
* Fri Jan 18 2008 Michael Weinberger |
67 |
|
|
Version 0.9.0 |
68 |
|
|
Bugfix: run cronSetup() after job delete |
69 |
|
|
Throw error if nothing was backed up (empty archive) |
70 |
|
|
Added rsyncd support for backing up Windows/Cygwin |
71 |
|
|
Added option and property remoteOS. Which remoteOS=cgywin the |
72 |
|
|
send key and revoke key functions use the right path to the |
73 |
|
|
authorized_keys2 file and login as user Administrator |
74 |
|
|
|
75 |
|
|
* Sat Dec 29 2007 Michael Weinberger |
76 |
|
|
Version 0.8.1 |
77 |
|
|
Automount Bugfix [Bug 3165]: Only exit with error on mount failure |
78 |
|
|
when in backup run. Otherwise log the error and continue. |
79 |
|
|
|
80 |
|
|
* Thu Dec 20 2007 Michael Weinberger |
81 |
|
|
Version 0.8.0 |
82 |
|
|
added bash completion script |
83 |
|
|
added option --kill JOB |
84 |
|
|
improved INT and TERM signal handling |
85 |
|
|
replaced all scp commands by rsync |
86 |
|
|
added poperty BandwidthLimit (unit KBytes/sec) |
87 |
|
|
each job write its own known hosts entry using ssh option HostKeyAliasOption |
88 |
|
|
affa --send-key w/o arguments sends the keys for all jobs |
89 |
|
|
removed Property StrictHostKeyChecking |
90 |
|
|
UPDATE FROM VERSIONS<8: run the command 'affa --send-key' to generate |
91 |
|
|
the known hosts entries for all jobs |
92 |
|
|
|
93 |
|
|
* Wed Dec 12 2007 Michael Weinberger |
94 |
|
|
Version 0.7.0 |
95 |
|
|
Modified logging: Job run logs to /var/log/affa/JOBNAME.log, all other |
96 |
|
|
to /var/log/affa/affa.log |
97 |
|
|
Bugfix: Check error status of --send-key and --revoke-key |
98 |
|
|
New: Options --show-schedule |
99 |
|
|
Modified: Option --list-archives now accepts multiple args or none |
100 |
|
|
Fix: install watchdog on source server before every run not only scheduled, |
101 |
|
|
to avoid watchdog triggered if a non-scheduled run take to long time. |
102 |
|
|
|
103 |
|
|
* Wed Nov 28 2007 Michael Weinberger |
104 |
|
|
Version 0.6.8 |
105 |
|
|
Bugfix: Automount was done too late. Daily backup never ran. |
106 |
|
|
|
107 |
|
|
* Wed Nov 21 2007 Michael Weinberger |
108 |
|
|
Version 0.6.7 |
109 |
|
|
Bugfix: Size and No. of files were not shown in --status |
110 |
|
|
Improved deleting of directories |
111 |
|
|
added --check-connections option |
112 |
|
|
Increased width of job column in --stats table |
113 |
|
|
|
114 |
|
|
* Sun Nov 11 2007 Michael Weinberger |
115 |
|
|
Version 0.6.6 |
116 |
|
|
Property rsync--modify-window added |
117 |
|
|
Modified recursive deleting directories |
118 |
|
|
|
119 |
|
|
* Wed Nov 07 2007 Michael Weinberger |
120 |
|
|
Version 0.6.5 |
121 |
|
|
ssh options added to scp commands |
122 |
|
|
added post-backup event |
123 |
|
|
|
124 |
|
|
* Wed Aug 08 2007 Michael Weinberger |
125 |
|
|
Version 0.6.4 |
126 |
|
|
delete dovcot index files after a --rise |
127 |
|
|
|
128 |
|
|
* Thu Jul 05 2007 Michael Weinberger |
129 |
|
|
Version 0.6.3 |
130 |
|
|
Bugfix: with RPMCheck=yes the affa-rpmlist was not found in the |
131 |
|
|
archive. Wrong path to schedule.0 instead of scheduled.running. |
132 |
|
|
Side effect of changes in version 0.5.0. [Bug 3128] |
133 |
|
|
|
134 |
|
|
* Tue Jul 03 2007 Michael Weinberger |
135 |
|
|
Version 0.6.2 |
136 |
|
|
Bugfix: Filesys::DiskFree requires $ENV{LANG}="en_US" [Bug 3119] |
137 |
|
|
Bug reported to bug-Filesys-DiskFree [at] rt.cpan.org |
138 |
|
|
|
139 |
|
|
* Mon Jun 25 2007 Michael Weinberger |
140 |
|
|
Version 0.6.1 |
141 |
|
|
Fix 3080 was not applied. |
142 |
|
|
|
143 |
|
|
* Mon Jun 18 2007 Michael Weinberger |
144 |
|
|
Version 0.6.0 |
145 |
|
|
- Replaced Filesys::DiskSpace by Filesys::DiskFree as the latter |
146 |
|
|
supports CIFS file system |
147 |
|
|
- using Filesys::DiskFree->mount and ->device instead of scanning /proc/mounts |
148 |
|
|
- mkdir RootDir only on job run to avoid making it in an unmounted mountpoint |
149 |
|
|
|
150 |
|
|
* Mon Jun 18 2007 Michael Weinberger |
151 |
|
|
Version 0.5.2 |
152 |
|
|
- Sending ssh key failed. When grep returned an error |
153 |
|
|
the mv command was not executed. Using ';' instead of '&&' |
154 |
|
|
for chaining commands. [Bug 3080] |
155 |
|
|
- /root/.ssh/authorized_keys2: No such file or directory warning. |
156 |
|
|
Run a touch to guarantee, that the file exists. [Bug 3080] |
157 |
|
|
- same issue with --revoke-key |
158 |
|
|
|
159 |
|
|
* Thu Jun 14 2007 Michael Weinberger |
160 |
|
|
Version 0.5.1 |
161 |
|
|
- Bugfix automount: getStatus() unmounts the device while a job is running |
162 |
|
|
- Status table: Last=never, if there are no archives at all |
163 |
|
|
|
164 |
|
|
* Tue Jun 12 2007 Michael Weinberger |
165 |
|
|
Version 0.5.0 |
166 |
|
|
- New property AutomountOptions |
167 |
|
|
- status table: grouped disabled jobs. Show Last='-' for disabled jobs |
168 |
|
|
instead of 'failed' |
169 |
|
|
- unlink lockfile in getLock() |
170 |
|
|
- Changes to improve robustness in case of network outage: |
171 |
|
|
- writing to a temporary archive scheduled.running and linkdest |
172 |
|
|
against the latest existing archive (usually scheduled.0). Then |
173 |
|
|
shift archives and rename scheduled.running to scheduled.0 |
174 |
|
|
- scheduledKeep=1 is now allowed |
175 |
|
|
- also check connection in daily,weekly etc., not only in scheduled run |
176 |
|
|
- don't run daily, weekly, monthly or yearly, when scheduled.0 doesn't exist. |
177 |
|
|
- new option --revoke-key |
178 |
|
|
- added optional option --revoke-key to --delete-job |
179 |
|
|
- avoid multiple adding public key to authorized_keys2 on source server |
180 |
|
|
|
181 |
|
|
* Wed Jun 06 2007 Michael Weinberger |
182 |
|
|
Version 0.4.7 |
183 |
|
|
- use StrictHostKeyChecking=no in sendKeys() |
184 |
|
|
|
185 |
|
|
* Tue Jun 05 2007 Michael Weinberger |
186 |
|
|
Version 0.4.6 |
187 |
|
|
- mailtest: Send also a testmail from the remotehost, when property Watchdog=yes |
188 |
|
|
- removed useless code in mailTestWatchdogRemote() |
189 |
|
|
|
190 |
|
|
* Mon Jun 04 2007 Michael Weinberger |
191 |
|
|
Version 0.4.5 |
192 |
|
|
write job config file to the archive dir |
193 |
|
|
|
194 |
|
|
* Thu May 31 2007 Michael Weinberger |
195 |
|
|
Version 0.4.4 |
196 |
|
|
- added property StrictHostKeyChecking (ssh option) |
197 |
|
|
- string comparison instead of numric for $job{'doneYearly'} ne $thisYear etc. |
198 |
|
|
|
199 |
|
|
* Wed May 30 2007 Michael Weinberger |
200 |
|
|
Version 0.4.3 |
201 |
|
|
- Minor bugfixes: |
202 |
|
|
calculation of RootDirFilesystemUsage in .AFFA-REPORT |
203 |
|
|
improved error handling with rsync status and df in DiskspaceWarn() |
204 |
|
|
|
205 |
|
|
* Thu May 29 2007 Michael Weinberger |
206 |
|
|
- Version 0.4.2 |
207 |
|
|
Infinite loop in execPostJobCommand() if command could not be executed: |
208 |
|
|
Don't call execPostJobCommand() in affaErrorExit() if err==115 |
209 |
|
|
- RPMCheck property was ignored |
210 |
|
|
- added Property chattyOnSuccess |
211 |
|
|
- modified jobconfig-sample.pl to preserve 'doneDaily','doneWeekly', |
212 |
|
|
'doneMonthly','doneYearly' and 'chattyOnSuccess' |
213 |
|
|
- write error codes of affaErrorExit() to log |
214 |
|
|
|
215 |
|
|
* Thu May 24 2007 Michael Weinberger |
216 |
|
|
- Version 0.4.1 |
217 |
|
|
- fixed bug in disk usage calculation |
218 |
|
|
|
219 |
|
|
* Tue May 22 2007 Michael Weinberger |
220 |
|
|
- Version 0.4.0 |
221 |
|
|
- added option --rename-job |
222 |
|
|
- changed syntax of --send-keys |
223 |
|
|
- added option --move-archive |
224 |
|
|
|
225 |
|
|
* Sun May 20 2007 Michael Weinberger |
226 |
|
|
- Version 0.3.3 |
227 |
|
|
- rebuild cronjobs after rise/undorise |
228 |
|
|
- ignore job of own backup, when creating cronjobs (job appears after a rise run) |
229 |
|
|
|
230 |
|
|
* Sun May 20 2007 Michael Weinberger |
231 |
|
|
- Version 0.3.2 |
232 |
|
|
- man: added sshPort propperty |
233 |
|
|
- chdir /tmp to avoid cwd warnings when the cwd disappears while |
234 |
|
|
running rise or undo rise |
235 |
|
|
- bugfix: undorise() did not found own backup archive. Was searching for a wrong name |
236 |
|
|
|
237 |
|
|
* Wed May 16 2007 Michael Weinberger |
238 |
|
|
- Version 0.3.1 minor bugfixes |
239 |
|
|
- checkCrossFS() did not work (used in --rise) |
240 |
|
|
- jobconfig-sample.pl: deleting record before setting props |
241 |
|
|
- Perl errors with --status before a job run |
242 |
|
|
|
243 |
|
|
* Thu May 10 2007 Michael Weinberger |
244 |
|
|
- Version 0.3.0 |
245 |
|
|
- man page completed |
246 |
|
|
- mark archives with indices > keep setting with '*' in --list-acrchive output |
247 |
|
|
- Option --delete-job |
248 |
|
|
- Option --cleanup |
249 |
|
|
- added --job=JOB alternative to --send-keys |
250 |
|
|
|
251 |
|
|
* Wed May 09 2007 Michael Weinberger |
252 |
|
|
- Version 0.2.0 |
253 |
|
|
- added --mailtest option |
254 |
|
|
|
255 |
|
|
* Tue May 08 2007 Michael Weinberger |
256 |
|
|
- Version 0.1.5 |
257 |
|
|
- improved --status output |
258 |
|
|
- removed options --report and --send-report |
259 |
|
|
- added option --show-archives |
260 |
|
|
- added --csv for status and show-archives output in CSV format |
261 |
|
|
- added property 'sshPort' |
262 |
|
|
|
263 |
|
|
* Mon May 07 2007 Michael Weinberger |
264 |
|
|
- Version 0.1.4 |
265 |
|
|
- don't install the remote watchdog, when remotehost is eq localhost |
266 |
|
|
- improved check for remoteHostName eq localhost using DNS |
267 |
|
|
- ssh -o PasswordAuthentication=no in checkConnection() |
268 |
|
|
- added --full-restore |
269 |
|
|
- missing check for HOSTNAME argument in --send-keys added |
270 |
|
|
improved error check |
271 |
|
|
- prevent run of --rise of localhost from own backup |
272 |
|
|
|
273 |
|
|
* Mon Apr 30 2007 Michael Weinberger |
274 |
|
|
- Version 0.1.3 |
275 |
|
|
modified 'use constant* syntax in watchdog script for compatibility |
276 |
|
|
with perl 5.6 on SME6 |
277 |
|
|
|
278 |
|
|
* Fri Apr 27 2007 Michael Weinberger |
279 |
|
|
- Version 0.1.2 |
280 |
|
|
Bugfix: Preserve of ethernet driver setting with --rise did not work. |
281 |
|
|
Also preserve NIC bonding. |
282 |
|
|
|
283 |
|
|
* Mon Apr 23 2007 Michael Weinberger |
284 |
|
|
- Version 0.1.1 |
285 |
|
|
scheduledKeep must be>=2 for --link-dest |
286 |
|
|
set scheduledKeep to 2 if <2 |
287 |
|
|
- get lastrun date from affa-report rather than from report file |
288 |
|
|
- added auto mount function |
289 |
|
|
- added AutomountDevice and AutomountPoint to jobconfig-sample.pl |
290 |
|
|
|
291 |
|
|
* Wed Apr 18 2007 Michael Weinberger |
292 |
|
|
- Version 0.0.8 |
293 |
|
|
dont die if report db does not exist |
294 |
|
|
|
295 |
|
|
* Wed Apr 18 2007 Michael Weinberger |
296 |
|
|
- Version 0.0.7 |
297 |
|
|
run checkConnection() only for scheduled backups |
298 |
|
|
added Size and Disk usage information to --status |
299 |
|
|
|
300 |
|
|
* Tue Apr 17 2007 Michael Weinberger |
301 |
|
|
- Version 0.0.7 |
302 |
|
|
print Servername in --status output |
303 |
|
|
|
304 |
|
|
* Thu Apr 12 2007 Michael Weinberger |
305 |
|
|
- Version 0.0.5 |
306 |
|
|
fixed calculation of lastrun-now |
307 |
|
|
|
308 |
|
|
* Thu Apr 12 2007 Michael Weinberger |
309 |
|
|
- Version 0.0.4 |
310 |
|
|
- added --send-status plus templates |
311 |
|
|
- fixed format error of times in affa --status |
312 |
|
|
- show 'failed', if lastrun is older 1 day in affa --status |
313 |
|
|
- fixed typo. default status=disabled (was disable) |
314 |
|
|
|
315 |
|
|
* Fri Apr 06 2007 Michael Weinberger |
316 |
|
|
- Version 0.0.3 |
317 |
|
|
- watchdog reminder was not deleted on soure |
318 |
|
|
- wrong version mismatch list in rpm compare |
319 |
|
|
|
320 |
|
|
* Thu Apr 05 2007 Michael Weinberger |
321 |
|
|
- added 'rsync--inplace' property |
322 |
|
|
|
323 |
|
|
* Mon Apr 02 2007 Michael Weinberger |
324 |
|
|
- initial release |
325 |
|
|
|
326 |
|
|
%prep |
327 |
|
|
%setup -q -n %{name}-%{version} |
328 |
mweinber |
1.4 |
%patch0 -p1 |
329 |
|
|
%patch1 -p1 |
330 |
mweinber |
1.5 |
%patch2 -p1 |
331 |
mweinber |
1.6 |
%patch3 -p1 |
332 |
mweinber |
1.7 |
%patch4 -p1 |
333 |
mweinber |
1.9 |
%patch5 -p1 |
334 |
mweinber |
1.10 |
%patch6 -p1 |
335 |
slords |
1.1 |
|
336 |
|
|
%build |
337 |
|
|
|
338 |
|
|
%install |
339 |
|
|
rm -rf $RPM_BUILD_ROOT |
340 |
|
|
rm -f %{name}-%{version}-filelist |
341 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
342 |
|
|
|
343 |
|
|
perl createlinks $RPM_BUILD_ROOT |
344 |
|
|
|
345 |
mweinber |
1.2 |
# Set version String |
346 |
|
|
cp -a $RPM_BUILD_ROOT/sbin/e-smith/affa $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp |
347 |
|
|
VERSIONSTRING=%{version}-`echo %{release}|sed -e 's/\..*$//'` |
348 |
|
|
sed -e "s/_VERSIONSTRING_/$VERSIONSTRING/" < $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp > $RPM_BUILD_ROOT/sbin/e-smith/affa |
349 |
|
|
rm -f $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp |
350 |
|
|
|
351 |
slords |
1.1 |
rm -f %{name}-%{version}-filelist |
352 |
|
|
|
353 |
|
|
find $RPM_BUILD_ROOT -depth -type f -print |\ |
354 |
|
|
sed -e "s@^$RPM_BUILD_ROOT@@g" \ |
355 |
|
|
-e "s@^/sbin/e-smith/@%attr(0750,root,root) &@"\ |
356 |
|
|
-e "s@^/etc/profile.d/@%attr(0755,root,root) &@"\ |
357 |
|
|
-e "s@^/etc/e-smith/templates/@%attr(0644,root,root) &@"\ |
358 |
mweinber |
1.8 |
-e "s@^/usr/lib/affa/COPYING@%attr(0444,root,root) &@"\ |
359 |
|
|
-e "s@^/usr/lib/affa/@%attr(0750,root,root) &@"\ |
360 |
slords |
1.1 |
>> %{name}-%{version}-filelist |
361 |
|
|
|
362 |
|
|
find $RPM_BUILD_ROOT -depth -type l -print |\ |
363 |
|
|
sed "s@^$RPM_BUILD_ROOT@@g" >> %{name}-%{version}-filelist |
364 |
|
|
|
365 |
|
|
%clean |
366 |
|
|
rm -rf $RPM_BUILD_ROOT |
367 |
|
|
exit 0 |
368 |
|
|
|
369 |
|
|
|
370 |
|
|
%files -f %{name}-%{version}-filelist |
371 |
|
|
%defattr(-,root,root) |