/[smecontribs]/rpms/smeserver-affa/contribs8/smeserver-affa.spec
ViewVC logotype

Contents of /rpms/smeserver-affa/contribs8/smeserver-affa.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download)
Sun Dec 15 16:50:26 2013 UTC (10 years, 5 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-affa-2_0_0-rc5_el5_sme
Changes since 1.2: +6 -1 lines
* Sun Dec 15 2013 JP Pialasse 2.0.0-rc5
- yum path bug fix [SME: 5661]

1 Summary: Makes the SME server a dedicated backup server
2 %define name smeserver-affa
3 Name: %{name}
4 %define version 2.0.0
5 %define release rc5
6 Version: %{version}
7 Release: %{release}%{?dist}
8 Vendor: Michael Weinberger <Michael.Weinberger@neddix.de>
9 License: GNU General Public License
10 Group: Applications/Archiving
11 Source: %{name}-%{version}.tar.gz
12 Patch0: smeserver-affa-2.0.0-change-path-to-yum.patch
13 BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
14 BuildArch: noarch
15 AutoReq: no
16 Requires: smeserver-release >= 7.3
17 Requires: rsync >= 3.0.4
18 Requires: perl-Filesys-DiskFree
19 Requires: perl-Compress-Bzip2
20 BuildRequires: e-smith-devtools
21
22 %description
23 http://wiki.contribs.org/Affa
24 http://wiki.contribs.org/Backup_of_ESXi_Virtual_Machines_using_Affa
25
26 %prep
27 %setup -q -n %{name}-%{version}
28 %patch0 -p1
29
30 %build
31
32 %install
33 rm -rf $RPM_BUILD_ROOT
34 rm -f %{name}-%{version}-filelist
35 (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
36
37 perl createlinks $RPM_BUILD_ROOT
38
39 # Set version String
40 cp -a $RPM_BUILD_ROOT/sbin/e-smith/affa $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp
41 VERSIONSTRING=%{version}-`echo %{release}|sed -e 's/\..*$//'`
42 sed -e "s/my \$VERSION.*;/my \$VERSION='$VERSIONSTRING';/" < $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp > $RPM_BUILD_ROOT/sbin/e-smith/affa
43 rm -f $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp
44
45 rm -f %{name}-%{version}-filelist
46
47 find $RPM_BUILD_ROOT -depth -type f -print |\
48 sed -e "s@^$RPM_BUILD_ROOT@@g" \
49 -e "s@^/sbin/e-smith/@%attr(0750,root,root) &@"\
50 -e "s@^/usr/lib/perl5/@%attr(0644,root,root) &@"\
51 -e "s@^/etc/profile.d/@%attr(0555,root,root) &@"\
52 -e "s@^/etc/e-smith/templates/@%attr(0644,root,root) &@"\
53 -e "s@^/usr/lib/affa/COPYING@%attr(0444,root,root) &@"\
54 -e "s@^/usr/lib/affa/@%attr(0750,root,root) &@"\
55 >> %{name}-%{version}-filelist
56
57 find $RPM_BUILD_ROOT -depth -type l -print |\
58 sed "s@^$RPM_BUILD_ROOT@@g" >> %{name}-%{version}-filelist
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62 exit 0
63
64
65 %files -f %{name}-%{version}-filelist
66 %defattr(-,root,root)
67
68 %changelog
69 * Sun Dec 15 2013 JP Pialasse 2.0.0-rc5
70 - yum path bug fix [SME: 5661]
71
72 * Sun Jan 25 2009 Michael Weinberger 2.0.0-rc4
73 Bugfix: --send-status was broken
74 Added disk usages to Success Message
75
76 * Fri Jan 23 2009 Michael Weinberger 2.0.0-rc3
77 Bugfix: --mailtest: mail from remote watchdog was not sent
78
79 * Sun Jan 10 2009 Michael Weinberger 2.0.0-rc2
80 - Workaround to catch Dropbear rsync errors (ESXi Mode)
81
82 * Sun Jan 04 2009 Michael Weinberger 2.0.0-rc1
83 - no changes
84
85 * Fri Jan 02 2009 Michael Weinberger 2.0.0-beta21
86 - show last execution time in --show-schedule
87
88 * Thu Jan 01 2009 Michael Weinberger 2.0.0-beta20
89 - Fixed calculation of compression rate in chunkfile()
90 - Changed format of --list-archives output: added Exec Time and Bytes received
91 - Changed format of --status: added Exec Time, removed Disk usage
92 - Output formatted table in --disk-usage
93 - added --debug CLI switch
94
95
96 * Tue Dec 30 2008 Michael Weinberger 2.0.0-beta19
97 - Retry feature added, new props RetryAfter,RetryAttempts and RetryNotification
98 - Dependency rsync >= 3.0.4 added to spec file
99 - Append job status on testmail (because spam filter on receiver site)
100 - log total execution time
101
102 * Fri Dec 26 2008 Michael Weinberger 2.0.0-beta18
103 - bugfix check-connections: in ssh check in rsyncd mode
104 - Bug 4888 fixed: escape single quotes in source dir names
105 - Bug 4882 fixed: LVM mapped devices
106
107 * Fri Dec 19 2008 Michael Weinberger 2.0.0-beta17
108 - dont chunk ESXi vmdk files in linkdest archive that will be deleted afterwards
109 - show disk usage at time at job run in --status
110 - new option --disk-usage shows current disk usage of all Root Dirs
111 - Bug 4852 fixed
112 - Modifications to allow backup of specific files (Bug 4853)
113
114 * Thu Dec 11 2008 Michael Weinberger 2.0.0-beta16
115 - shorten command line of rsync command when syncing ESXi VM. Dropbear has limits
116
117 * Wed Dec 10 2008 Michael Weinberger 2.0.0-beta15
118 - chunk feature now working for all job types
119 - new property chunkFiles
120 - new options --chunk-archive and --unchunk-archive
121
122 * Mon Dec 08 2008 Michael Weinberger 2.0.0-beta14
123 - --delete-job: Delete logfile
124 - samba template for Affa archives
125 - Bugfix: snapshot was removed to early. Wrong vmx file copied
126 - disabled chunk feature for now. Needs more testing
127
128 * Sun Dec 07 2008 Michael Weinberger 2.0.0-beta12
129 - using perl Compress::Bzip2
130
131 * Sat Dec 06 2008 Michael Weinberger 2.0.0-beta11
132 - replaced gzip by bzip2 as gzip inserts timestamps
133
134 * Wed Dec 04 2008 Michael Weinberger 2.0.0-beta10
135 - bugfixes
136
137 * Wed Dec 04 2008 Michael Weinberger 2.0.0-beta09
138 - chunk and compress vmdk files
139
140 * Thu Nov 27 2008 Michael Weinberger 2.0.0-beta08
141 - allow special characters in VM name and pathes
142
143 * Tue Nov 11 2008 Michael Weinberger 2.0.0-beta07
144 - New Dropbear Version 0.51 did not work stable. Stay with original 0.49 and th exit status bug
145 - Modified Affa to not to check exit status of ssh and rsync command
146
147 * Sat Nov 08 2008 Michael Weinberger 2.0.0-beta06
148 - FIXED: rsync did not work for VM with blanks in name
149 - SSH exit codes now checked as Dropbear 0.51 is used on ESX3i host
150
151 * Tue Nov 04 2008 Michael Weinberger 2.0.0-beta05
152 - log msg and exit if VI Pert Tool Kit installed
153 - Fixed: in job sample scripts create affa db if not exists
154
155 * Tue Nov 04 2008 Michael Weinberger 2.0.0-beta04
156 - Allow setups with dailyKeep=0, weeklyKeep=0, monthlyKeep=0 or yearlyKeep=0
157 - Fixed: Yearly archives not listed in --status and --list-archives
158
159 * Mon Nov 03 2008 Michael Weinberger 2.0.0-beta03
160 - cleaner logging of VI API errors
161 - backing up ESXi server config and root home dir
162 - Checking VI API connect in --check-connections
163
164 * Sun Nov 02 2008 Michael Weinberger 2.0.0-beta02
165 - Fixed: Log file excerpt was not appened to Email.
166 - Fixed: checkConnection() did not work for ESXi
167 - Fixed: ssh find command did not use the HostKeyAlias option
168 - Catch die from VI Toolkit
169 - Close VI API session while rsyncing
170
171 * Fri Oct 31 2008 Michael Weinberger 2.0.0-beta01
172 - ESXi support added
173
174 * Tue May 27 2008 Michael Weinberger 1.0.0-3
175 Re-added type 'desktop' to pre-backup event for SME6 compatibility
176 * Tue Apr 22 2008 Michael Weinberger 1.0.0-2
177 Bug fix #4210, command "affa --show-schedule" executes postJobCommand
178 * Fri Apr 04 2008 Michael Weinberger 1.0.0-1
179 Final release
180 man page updated
181 * Fri Apr 04 2008 Michael Weinberger 0.10.0-2
182 added --all option to --rise
183 * Mon Mar 10 2008 Michael Weinberger 0.10.0-1
184 Increased release number
185 Added 10 sec timeout in Net::DNS::Resolver->search
186 * Mon Mar 10 2008 Michael Weinberger 0.9.0-11
187 Specfile fix
188 * Mon Mar 10 2008 Michael Weinberger 0.9.0-10
189 Delete locally created watchdog file after remotecopy
190 Bugfix 4035
191 Added default AutoUnmount property to sample script
192 Fix man page
193 Do not delete md5sum in --create-backup-file when verify is skipped by user
194 Set lock in --create-backup-file
195 * Sun Mar 09 2008 Michael Weinberger 0.9.0-9
196 trap signals in --create-backup-file
197 * Sat Mar 08 2008 Michael Weinberger 0.9.0-8
198 Permissions in /usr/lib/affa
199 * Sat Mar 08 2008 Michael Weinberger 0.9.0-7
200 md5sum in --create-backup-file
201 * Fri Mar 07 2008 Michael Weinberger 0.9.0-6
202 Added option --create-backup-file
203 Using line number as error code in affaErrorExit()
204 Fixed /etc/profile.d/affa.sh
205
206 * Mon Mar 03 2008 Michael Weinberger 0.9.0-5
207 - delete new style Dovecot's index files dovecot.index*
208 - delete dovecot index files on remote server in --full-restore
209
210 * Fri Feb 29 2008 Michael Weinberger 0.9.0-4
211 set localhost as default remoteHostName in /etc/e-smith/templates//etc/cron.d/affa/00jobs
212
213 * Wed Feb 27 2008 Michael Weinberger 0.9.0-3
214 removed %post from spec file
215
216 * Sat Feb 02 2008 Michael Weinberger 0.9.0-2
217 Bugfix: Report db was not deleted in deleteJob()
218 don't use -q on ssh commands with Debug=yes
219
220 * Fri Feb 1 2008 Shad L. Lords <slords@mail.com> 0.9.0-1
221 - Fix specfile for building in new buildsystem
222
223 * Fri Jan 18 2008 Michael Weinberger
224 Version 0.9.0
225 Bugfix: run cronSetup() after job delete
226 Throw error if nothing was backed up (empty archive)
227 Added rsyncd support for backing up Windows/Cygwin
228 Added option and property remoteOS. Which remoteOS=cgywin the
229 send key and revoke key functions use the right path to the
230 authorized_keys2 file and login as user Administrator
231
232 * Sat Dec 29 2007 Michael Weinberger
233 Version 0.8.1
234 Automount Bugfix [Bug 3165]: Only exit with error on mount failure
235 when in backup run. Otherwise log the error and continue.
236
237 * Thu Dec 20 2007 Michael Weinberger
238 Version 0.8.0
239 added bash completion script
240 added option --kill JOB
241 improved INT and TERM signal handling
242 replaced all scp commands by rsync
243 added poperty BandwidthLimit (unit KBytes/sec)
244 each job write its own known hosts entry using ssh option HostKeyAliasOption
245 affa --send-key w/o arguments sends the keys for all jobs
246 removed Property StrictHostKeyChecking
247 UPDATE FROM VERSIONS<8: run the command 'affa --send-key' to generate
248 the known hosts entries for all jobs
249
250 * Wed Dec 12 2007 Michael Weinberger
251 Version 0.7.0
252 Modified logging: Job run logs to /var/log/affa/JOBNAME.log, all other
253 to /var/log/affa/affa.log
254 Bugfix: Check error status of --send-key and --revoke-key
255 New: Options --show-schedule
256 Modified: Option --list-archives now accepts multiple args or none
257 Fix: install watchdog on source server before every run not only scheduled,
258 to avoid watchdog triggered if a non-scheduled run take to long time.
259
260 * Wed Nov 28 2007 Michael Weinberger
261 Version 0.6.8
262 Bugfix: Automount was done too late. Daily backup never ran.
263
264 * Wed Nov 21 2007 Michael Weinberger
265 Version 0.6.7
266 Bugfix: Size and No. of files were not shown in --status
267 Improved deleting of directories
268 added --check-connections option
269 Increased width of job column in --stats table
270
271 * Sun Nov 11 2007 Michael Weinberger
272 Version 0.6.6
273 Property rsync--modify-window added
274 Modified recursive deleting directories
275
276 * Wed Nov 07 2007 Michael Weinberger
277 Version 0.6.5
278 ssh options added to scp commands
279 added post-backup event
280
281 * Wed Aug 08 2007 Michael Weinberger
282 Version 0.6.4
283 delete dovcot index files after a --rise
284
285 * Thu Jul 05 2007 Michael Weinberger
286 Version 0.6.3
287 Bugfix: with RPMCheck=yes the affa-rpmlist was not found in the
288 archive. Wrong path to schedule.0 instead of scheduled.running.
289 Side effect of changes in version 0.5.0. [Bug 3128]
290
291 * Tue Jul 03 2007 Michael Weinberger
292 Version 0.6.2
293 Bugfix: Filesys::DiskFree requires $ENV{LANG}="en_US" [Bug 3119]
294 Bug reported to bug-Filesys-DiskFree [at] rt.cpan.org
295
296 * Mon Jun 25 2007 Michael Weinberger
297 Version 0.6.1
298 Fix 3080 was not applied.
299
300 * Mon Jun 18 2007 Michael Weinberger
301 Version 0.6.0
302 - Replaced Filesys::DiskSpace by Filesys::DiskFree as the latter
303 supports CIFS file system
304 - using Filesys::DiskFree->mount and ->device instead of scanning /proc/mounts
305 - mkdir RootDir only on job run to avoid making it in an unmounted mountpoint
306
307 * Mon Jun 18 2007 Michael Weinberger
308 Version 0.5.2
309 - Sending ssh key failed. When grep returned an error
310 the mv command was not executed. Using ';' instead of '&&'
311 for chaining commands. [Bug 3080]
312 - /root/.ssh/authorized_keys2: No such file or directory warning.
313 Run a touch to guarantee, that the file exists. [Bug 3080]
314 - same issue with --revoke-key
315
316 * Thu Jun 14 2007 Michael Weinberger
317 Version 0.5.1
318 - Bugfix automount: getStatus() unmounts the device while a job is running
319 - Status table: Last=never, if there are no archives at all
320
321 * Tue Jun 12 2007 Michael Weinberger
322 Version 0.5.0
323 - New property AutomountOptions
324 - status table: grouped disabled jobs. Show Last='-' for disabled jobs
325 instead of 'failed'
326 - unlink lockfile in getLock()
327 - Changes to improve robustness in case of network outage:
328 - writing to a temporary archive scheduled.running and linkdest
329 against the latest existing archive (usually scheduled.0). Then
330 shift archives and rename scheduled.running to scheduled.0
331 - scheduledKeep=1 is now allowed
332 - also check connection in daily,weekly etc., not only in scheduled run
333 - don't run daily, weekly, monthly or yearly, when scheduled.0 doesn't exist.
334 - new option --revoke-key
335 - added optional option --revoke-key to --delete-job
336 - avoid multiple adding public key to authorized_keys2 on source server
337
338 * Wed Jun 06 2007 Michael Weinberger
339 Version 0.4.7
340 - use StrictHostKeyChecking=no in sendKeys()
341
342 * Tue Jun 05 2007 Michael Weinberger
343 Version 0.4.6
344 - mailtest: Send also a testmail from the remotehost, when property Watchdog=yes
345 - removed useless code in mailTestWatchdogRemote()
346
347 * Mon Jun 04 2007 Michael Weinberger
348 Version 0.4.5
349 write job config file to the archive dir
350
351 * Thu May 31 2007 Michael Weinberger
352 Version 0.4.4
353 - added property StrictHostKeyChecking (ssh option)
354 - string comparison instead of numric for $job{'doneYearly'} ne $thisYear etc.
355
356 * Wed May 30 2007 Michael Weinberger
357 Version 0.4.3
358 - Minor bugfixes:
359 calculation of RootDirFilesystemUsage in .AFFA-REPORT
360 improved error handling with rsync status and df in DiskspaceWarn()
361
362 * Thu May 29 2007 Michael Weinberger
363 - Version 0.4.2
364 Infinite loop in execPostJobCommand() if command could not be executed:
365 Don't call execPostJobCommand() in affaErrorExit() if err==115
366 - RPMCheck property was ignored
367 - added Property chattyOnSuccess
368 - modified jobconfig-sample.pl to preserve 'doneDaily','doneWeekly',
369 'doneMonthly','doneYearly' and 'chattyOnSuccess'
370 - write error codes of affaErrorExit() to log
371
372 * Thu May 24 2007 Michael Weinberger
373 - Version 0.4.1
374 - fixed bug in disk usage calculation
375
376 * Tue May 22 2007 Michael Weinberger
377 - Version 0.4.0
378 - added option --rename-job
379 - changed syntax of --send-keys
380 - added option --move-archive
381
382 * Sun May 20 2007 Michael Weinberger
383 - Version 0.3.3
384 - rebuild cronjobs after rise/undorise
385 - ignore job of own backup, when creating cronjobs (job appears after a rise run)
386
387 * Sun May 20 2007 Michael Weinberger
388 - Version 0.3.2
389 - man: added sshPort propperty
390 - chdir /tmp to avoid cwd warnings when the cwd disappears while
391 running rise or undo rise
392 - bugfix: undorise() did not found own backup archive. Was searching for a wrong name
393
394 * Wed May 16 2007 Michael Weinberger
395 - Version 0.3.1 minor bugfixes
396 - checkCrossFS() did not work (used in --rise)
397 - jobconfig-sample.pl: deleting record before setting props
398 - Perl errors with --status before a job run
399
400 * Thu May 10 2007 Michael Weinberger
401 - Version 0.3.0
402 - man page completed
403 - mark archives with indices > keep setting with '*' in --list-acrchive output
404 - Option --delete-job
405 - Option --cleanup
406 - added --job=JOB alternative to --send-keys
407
408 * Wed May 09 2007 Michael Weinberger
409 - Version 0.2.0
410 - added --mailtest option
411
412 * Tue May 08 2007 Michael Weinberger
413 - Version 0.1.5
414 - improved --status output
415 - removed options --report and --send-report
416 - added option --show-archives
417 - added --csv for status and show-archives output in CSV format
418 - added property 'sshPort'
419
420 * Mon May 07 2007 Michael Weinberger
421 - Version 0.1.4
422 - don't install the remote watchdog, when remotehost is eq localhost
423 - improved check for remoteHostName eq localhost using DNS
424 - ssh -o PasswordAuthentication=no in checkConnection()
425 - added --full-restore
426 - missing check for HOSTNAME argument in --send-keys added
427 improved error check
428 - prevent run of --rise of localhost from own backup
429
430 * Mon Apr 30 2007 Michael Weinberger
431 - Version 0.1.3
432 modified 'use constant* syntax in watchdog script for compatibility
433 with perl 5.6 on SME6
434
435 * Fri Apr 27 2007 Michael Weinberger
436 - Version 0.1.2
437 Bugfix: Preserve of ethernet driver setting with --rise did not work.
438 Also preserve NIC bonding.
439
440 * Mon Apr 23 2007 Michael Weinberger
441 - Version 0.1.1
442 scheduledKeep must be>=2 for --link-dest
443 set scheduledKeep to 2 if <2
444 - get lastrun date from affa-report rather than from report file
445 - added auto mount function
446 - added AutomountDevice and AutomountPoint to jobconfig-sample.pl
447
448 * Wed Apr 18 2007 Michael Weinberger
449 - Version 0.0.8
450 dont die if report db does not exist
451
452 * Wed Apr 18 2007 Michael Weinberger
453 - Version 0.0.7
454 run checkConnection() only for scheduled backups
455 added Size and Disk usage information to --status
456
457 * Tue Apr 17 2007 Michael Weinberger
458 - Version 0.0.7
459 print Servername in --status output
460
461 * Thu Apr 12 2007 Michael Weinberger
462 - Version 0.0.5
463 fixed calculation of lastrun-now
464
465 * Thu Apr 12 2007 Michael Weinberger
466 - Version 0.0.4
467 - added --send-status plus templates
468 - fixed format error of times in affa --status
469 - show 'failed', if lastrun is older 1 day in affa --status
470 - fixed typo. default status=disabled (was disable)
471
472 * Fri Apr 06 2007 Michael Weinberger
473 - Version 0.0.3
474 - watchdog reminder was not deleted on soure
475 - wrong version mismatch list in rpm compare
476
477 * Thu Apr 05 2007 Michael Weinberger
478 - added 'rsync--inplace' property
479
480 * Mon Apr 02 2007 Michael Weinberger
481 - initial release
482

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed