]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/redhat/bsys.spec.in
Add first cut bsys spec
[bacula/bacula] / bacula / platforms / redhat / bsys.spec.in
1 # Bacula RPM spec file
2 # Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
3
4 # Platform Build Configuration
5
6 # basic defines for every build
7 %define _version @VERSION@
8 %define _release 1
9 %define depkgs_version 18Feb09
10 %define _rescuever @VERSION@
11 %define docs_version @VERSION@
12 %define binname baculasystems
13 %define _prefix @prefix@
14 # third party packagers
15 %define _packager Bacula Systems SA
16 %{?contrib_packager:%define _packager %{contrib_packager}}
17 %define downloads http://www.prdownloads.sourceforge.net
18 %define url http://www.baculasystems.com
19 %define vendor The @BACULA@ Team
20
21 # any patches for this release
22 # be sure to check the setup section for patch macros
23
24 #--------------------------------------------------------------------------
25 # it should not be necessary to change anything below here for a release
26 # except for patch macros in the setup section
27 #--------------------------------------------------------------------------
28
29 Summary: Bacula - The Network Backup Solution
30 Name: %{binname}
31 Version: %{_version}
32 Release: %{_release}
33 Group: System Environment/Daemons
34 License: GPL v2
35 Source0: %{downloads}/%{binname}/%{name}-%{version}.tar.gz
36 Source1: %{downloads}/%{binname}/depkgs-%{depkgs_version}.tar.gz
37 Source2: Release_Notes-%{version}-%{release}.tar.gz
38 Source3: %{downloads}/%{binname}/%{name}-docs-%{docs_version}.tar.gz
39 Source4: %{downloads}/%{binname}/%{name}-rescue-%{_rescuever}.tar.gz
40 Source5: bacula-2.2.7-postgresql.patch
41 BuildRoot: %{_tmppath}/%{name}-root
42 URL: %{url}
43 Vendor: %{vendor}
44 Packager: %{_packager}
45 Prefix: %{_prefix}
46
47 # define the basic package description
48 %define blurb Bacula - It comes by night and sucks the vital essence from your computers.
49 %define blurb2 Bacula is a set of computer programs that permit you (or the system
50 %define blurb3 administrator) to manage backup, recovery, and verification of computer
51 %define blurb4 data across a network of computers of different kinds. In technical terms,
52 %define blurb5 it is a network client/server based backup program. Bacula is relatively
53 %define blurb6 easy to use and efficient, while offering many advanced storage management
54 %define blurb7 features that make it easy to find and recover lost or damaged files.
55 %define blurb8 Bacula source code has been released under the GPL version 2 license.
56
57 # source directory locations
58 %define _docsrc ../%{name}-docs-%{docs_version}
59 %define _rescuesrc ../%{name}-rescue-%{_rescuever}
60 %define depkgs ../depkgs
61
62 # directory locations
63 %define _sbindir @sbindir@
64 %define _subsysdir @subsysdir@
65 %define sqlite_bindir %_libdir/bacula/sqlite
66 %define _mandir @mandir@
67 %define sysconf_dir @sysconfdir@
68 %define script_dir @scriptdir@
69 %define working_dir @working_dir@
70 %define pid_dir @piddir@
71
72 # NOTE these defines are used in some rather complex useradd and groupadd
73 # commands. If you change them examine the post scripts for consequences.
74 %define director_daemon_user bacula
75 %define storage_daemon_user bacula
76 %define file_daemon_user root
77 %define daemon_group bacula
78 # group that has write access to tape devices, usually disk on Linux
79 %define storage_daemon_group disk
80 %define user_file /etc/passwd
81 %define group_file /etc/group
82
83 # program locations
84 %define useradd /usr/sbin/useradd
85 %define groupadd /usr/sbin/groupadd
86 %define usermod /usr/sbin/usermod
87
88 # platform defines - set one below or define the build_xxx on the command line
89 # RedHat builds
90 %define rh7 0
91 %{?build_rh7:%define rh7 1}
92 %define rh8 0
93 %{?build_rh8:%define rh8 1}
94 %define rh9 0
95 %{?build_rh9:%define rh9 1}
96 # Fedora Core build
97 %define fc1 0
98 %{?build_fc1:%define fc1 1}
99 %define fc3 0
100 %{?build_fc3:%define fc3 1}
101 %define fc4 0
102 %{?build_fc4:%define fc4 1}
103 %define fc5 0
104 %{?build_fc5:%define fc5 1}
105 %define fc6 0
106 %{?build_fc6:%define fc6 1}
107 %define fc7 0
108 %{?build_fc7:%define fc7 1}
109 %define fc8 0
110 %{?build_fc8:%define fc8 1}
111 %define fc9 0
112 %{?build_fc9:%define fc9 1}
113 # Whitebox Enterprise build
114 %define wb3 0
115 %{?build_wb3:%define wb3 1}
116 # RedHat Enterprise builds
117 %define rhel3 0
118 %{?build_rhel3:%define rhel3 1}
119 %{?build_rhel3:%define wb3 1}
120 %define rhel4 0
121 %{?build_rhel4:%define rhel4 1}
122 %{?build_rhel4:%define fc3 1}
123 %define rhel5 0
124 %{?build_rhel5:%define rhel5 1}
125 %{?build_rhel5:%define fc6 1}
126 # CentOS build
127 %define centos3 0
128 %{?build_centos3:%define centos3 1}
129 %{?build_centos3:%define wb3 1}
130 %define centos4 0
131 %{?build_centos4:%define centos4 1}
132 %{?build_centos4:%define fc3 1}
133 %define centos5 0
134 %{?build_centos5:%define centos5 1}
135 %{?build_centos5:%define fc6 1}
136 # SL build
137 %define sl3 0
138 %{?build_sl3:%define sl3 1}
139 %{?build_sl3:%define wb3 1}
140 %define sl4 0
141 %{?build_sl4:%define sl4 1}
142 %{?build_sl4:%define fc3 1}
143 %define sl5 0
144 %{?build_sl5:%define sl5 1}
145 %{?build_sl5:%define fc6 1}
146 # SuSE build
147 %define su9 0
148 %{?build_su9:%define su9 1}
149 %define su10 0
150 %{?build_su10:%define su10 1}
151 %define su102 0
152 %{?build_su102:%define su102 1}
153 %define su103 0
154 %{?build_su103:%define su103 1}
155 %define su110 0
156 %{?build_su110:%define su110 1}
157 %define su111 0
158 %{?build_su111:%define su111 1}
159 # Mandrake builds
160 %define mdk 0
161 %{?build_mdk:%define mdk 1}
162 %define mdv 0
163 %{?build_mdv:%define mdv 1}
164 %{?build_mdv:%define mdk 1}
165
166 # client only build
167 %define client_only 0
168 %{?build_client_only:%define client_only 1}
169
170 # test for a platform definition
171 %if !%{rh7} && !%{rh8} && !%{rh9} && !%{fc1} && !%{fc3} && !%{fc4} && !%{fc5} && !%{fc6} && !%{fc7} && !%{fc8} && !%{fc9} && !%{wb3} && !%{su9} && !%{su10} && !%{su102} && !%{su103} && !%{su110} && !%{su111} && !%{mdk}
172 %{error: You must specify a platform. Please examine the spec file.}
173 exit 1
174 %endif
175
176 # database defines
177 # set for database support desired or define the build_xxx on the command line
178 %define mysql 0
179 %{?build_mysql:%define mysql 1}
180 # if using mysql 4.x define this and mysql above
181 # currently: Mandrake 10.1, SuSE 9.x & 10.0, RHEL4 and Fedora Core 4
182 %define mysql4 0
183 %{?build_mysql4:%define mysql4 1}
184 %{?build_mysql4:%define mysql 1}
185 # if using mysql 5.x define this and mysql above
186 # currently: SuSE 10.1 and Fedora Core 5
187 %define mysql5 0
188 %{?build_mysql5:%define mysql5 1}
189 %{?build_mysql5:%define mysql 1}
190 %define sqlite 0
191 %{?build_sqlite:%define sqlite 1}
192 %define postgresql 0
193 %{?build_postgresql:%define postgresql 1}
194
195 # test for a database definition
196 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql} && ! %{client_only}
197 %{error: You must specify database support. Please examine the spec file.}
198 exit 1
199 %endif
200
201 %if %{mysql}
202 %define db_backend mysql
203 %endif
204 %if %{sqlite}
205 %define db_backend sqlite3
206 %endif
207 %if %{postgresql}
208 %define db_backend postgresql
209 %endif
210
211 # 64 bit support
212 %define x86_64 0
213 %{?build_x86_64:%define x86_64 1}
214
215 # check what distribution we are
216 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4} || %{rhel5}
217 %define _dist %(grep Red /etc/redhat-release)
218 %endif
219 %if %{fc1} || %{fc4} || %{fc5} || %{fc7} || %{fc8} || %{fc9}
220 %define _dist %(grep Fedora /etc/redhat-release)
221 %endif
222 %if %{centos5} || %{centos4} || %{centos3}
223 %define _dist %(grep CentOS /etc/redhat-release)
224 %endif
225 %if %{sl5} ||%{sl4} || %{sl3}
226 %define _dist %(grep 'Scientific Linux' /etc/redhat-release)
227 %endif
228 %if %{fc3} && ! %{rhel4} && ! %{centos4} && ! %{sl4}
229 %define _dist %(grep Fedora /etc/redhat-release)
230 %endif
231 %if %{fc6} && ! %{rhel5} && ! %{centos5} && ! %{sl5}
232 %define _dist %(grep Fedora /etc/redhat-release)
233 %endif
234 %if %{wb3} && ! %{rhel3} && ! %{centos3} && ! %{sl3}
235 %define _dist %(grep White /etc/whitebox-release)
236 %endif
237 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110} || %{su111}
238 %define _dist %(grep -i SuSE /etc/SuSE-release)
239 %endif
240 %if %{mdk}
241 %define _dist %(grep Mand /etc/mandrake-release)
242 %endif
243 Distribution: %{_dist}
244
245 # Should we build gconsole, possible only if gtk= >= 2.4 available.
246 # leaving all the BuildRequires and Requires in place below for now.
247 # su10, fc3 and fc4 now nobuild, tray monitor fails to build as of 2.2.1 
248 # release as it needs 2.10
249
250 %define gconsole 1
251 %if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{su9} || %{su10}
252 %define gconsole 0
253 %endif
254 %if %{mdk} && ! %{mdv}
255 %define gconsole 0
256 %endif
257
258 # specifically disallow gconsole if desired
259 %{?nobuild_gconsole:%define gconsole 0}
260
261 # specifically disallow rescue files if desired
262 %define rescue 1
263 %{?nobuild_rescue:%define rescue 0}
264
265 # Should we build wxconsole, only wxWidgets >=2.6 is supported
266 # SuSE 10 and FC4 and newer
267 %define wxconsole 0
268 %{?build_wxconsole:%define wxconsole 1}
269
270 # Should we build bat
271 # requires >= Qt-4.2
272 %define bat 0
273 %{?build_bat:%define bat 1}
274
275 # should we turn on python support
276 %define python 0
277 %{?build_python:%define python 1}
278
279 # specifically disallow build of mtx package if desired
280 %define mtx 1
281 %{?nobuild_mtx:%define mtx 0}
282
283 # do we need to patch for old postgresql version?
284 %define old_pgsql 0
285 %{?build_old_pgsql:%define old_pgsql 1}
286
287 # Mandriva somehow forces the manpage file extension to bz2 rather than gz
288 %if %{mdk}
289 %define manpage_ext bz2
290 %else
291 %define manpage_ext gz
292 %endif
293
294 # for client only build
295 %if %{client_only}
296 %define mysql 0
297 %define mysql4 0
298 %define mysql5 0
299 %define postgresql 0
300 %define sqlite 0
301 %define gconsole 0
302 %define wxconsole 0
303 %endif
304
305 %{expand: %%define gccver %(rpm -q --queryformat %%{version} gcc)}
306 %{expand: %%define gccrel %(rpm -q --queryformat %%{release} gcc)}
307
308 #BuildRequires: libattr-devel for 3.0
309 BuildRequires: libacl-devel
310 BuildRequires: gcc, gcc-c++, make, autoconf
311 BuildRequires: ncurses-devel, perl
312 BuildRequires: libstdc++-devel = %{gccver}-%{gccrel}, libxml2-devel, zlib-devel
313 BuildRequires: openssl-devel
314 %if %{python}
315 BuildRequires: python, python-devel
316 %{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
317 %endif
318 %if %{gconsole}
319 BuildRequires: pkgconfig, pango-devel, atk-devel
320 %endif
321 %if %{bat}
322 BuildRequires: pkgconfig
323 %endif
324
325 # Rh qt4 packages don't have a provide for, guess what, qt!
326 # still broken in fc8, ok in fc9
327 # so fix for broken rh
328 %define broken_rh 0
329 %if %{rhel5} || %{centos5} || %{sl5} || %{fc5} || %{fc6} || %{fc7} || %{fc8}
330 %define broken_rh 1
331 %endif
332 %if %{bat} && ! %{broken_rh}
333 BuildRequires: qt-devel >= 4.2
334 %endif
335 %if %{bat} && %{broken_rh}
336 BuildRequires: qt4-devel >= 4.2
337 %endif
338
339 %if %{rh7}
340 BuildRequires: libtermcap-devel
341 BuildRequires: glibc-devel >= 2.2
342 %endif
343 %if %{su9}
344 BuildRequires: termcap
345 BuildRequires: glibc-devel >= 2.3
346 %endif
347 %if %{su9} && %{gconsole}
348 BuildRequires: libgnome >= 2.0
349 BuildRequires: gtk2-devel >= 2.0
350 BuildRequires: libgnomeui-devel >= 2.0
351 BuildRequires: ORBit2-devel
352 BuildRequires: libart_lgpl-devel >= 2.0
353 BuildRequires: libbonobo-devel >= 2.0
354 BuildRequires: libbonoboui-devel >= 2.0
355 BuildRequires: bonobo-activation-devel
356 BuildRequires: gconf2-devel
357 BuildRequires: linc-devel
358 BuildRequires: freetype2-devel
359 %endif
360 %if %{su10}
361 BuildRequires: termcap
362 BuildRequires: glibc-devel >= 2.3
363 %endif
364 %if %{su10} && %{gconsole}
365 BuildRequires: libgnome >= 2.12
366 BuildRequires: gtk2-devel >= 2.8
367 BuildRequires: libgnomeui-devel >= 2.12
368 BuildRequires: ORBit2-devel
369 BuildRequires: libart_lgpl-devel >= 2.3
370 BuildRequires: libbonobo-devel >= 2.10
371 BuildRequires: libbonoboui-devel >= 2.10
372 BuildRequires: bonobo-activation-devel
373 BuildRequires: gconf2-devel
374 BuildRequires: freetype2-devel
375 BuildRequires: cairo-devel
376 BuildRequires: fontconfig-devel >= 2.3
377 BuildRequires: gnome-vfs2-devel >= 2.12
378 BuildRequires: libpng-devel
379 %endif
380 %if %{su102}
381 BuildRequires: termcap
382 BuildRequires: glibc-devel >= 2.5
383 %endif
384 %if %{su102} && %{gconsole}
385 BuildRequires: libgnome >= 2.16
386 BuildRequires: gtk2-devel >= 2.10
387 BuildRequires: libgnomeui-devel >= 2.16
388 BuildRequires: ORBit2-devel
389 BuildRequires: libart_lgpl-devel >= 2.3
390 BuildRequires: libbonobo-devel >= 2.16
391 BuildRequires: libbonoboui-devel >= 2.16
392 BuildRequires: bonobo-activation-devel
393 BuildRequires: gconf2-devel
394 BuildRequires: freetype2-devel
395 BuildRequires: cairo-devel
396 BuildRequires: fontconfig-devel >= 2.4
397 BuildRequires: gnome-vfs2-devel >= 2.16
398 BuildRequires: libpng-devel
399 %endif
400 %if %{su103}
401 BuildRequires: termcap
402 BuildRequires: glibc-devel >= 2.6
403 %endif
404 %if %{su103} && %{gconsole}
405 BuildRequires: libgnome >= 2.20
406 BuildRequires: gtk2-devel >= 2.12
407 BuildRequires: libgnomeui-devel >= 2.20
408 BuildRequires: ORBit2-devel
409 BuildRequires: libart_lgpl-devel >= 2.3
410 BuildRequires: libbonobo-devel >= 2.20
411 BuildRequires: libbonoboui-devel >= 2.20
412 BuildRequires: bonobo-activation-devel
413 BuildRequires: gconf2-devel
414 BuildRequires: freetype2-devel
415 BuildRequires: cairo-devel
416 BuildRequires: fontconfig-devel >= 2.4
417 BuildRequires: gnome-vfs2-devel >= 2.20
418 BuildRequires: libpng-devel
419 %endif
420 %if %{su110}
421 BuildRequires: termcap
422 BuildRequires: glibc-devel >= 2.8
423 %endif
424 %if %{su110} && %{gconsole}
425 BuildRequires: libgnome >= 2.22
426 BuildRequires: gtk2-devel >= 2.12
427 BuildRequires: libgnomeui-devel >= 2.22
428 BuildRequires: ORBit2-devel
429 BuildRequires: libart_lgpl-devel >= 2.3
430 BuildRequires: libbonobo-devel >= 2.22
431 BuildRequires: libbonoboui-devel >= 2.22
432 BuildRequires: bonobo-activation-devel
433 BuildRequires: gconf2-devel
434 BuildRequires: freetype2-devel
435 BuildRequires: cairo-devel
436 BuildRequires: fontconfig-devel >= 2.4
437 BuildRequires: gnome-vfs2-devel >= 2.22
438 BuildRequires: libpng-devel
439 %endif
440 %if %{su111}
441 BuildRequires: termcap
442 BuildRequires: glibc-devel >= 2.9
443 %endif
444 %if %{su111} && %{gconsole}
445 BuildRequires: libgnome >= 2.24
446 BuildRequires: gtk2-devel >= 2.14
447 BuildRequires: libgnomeui-devel >= 2.24
448 BuildRequires: ORBit2-devel
449 BuildRequires: libart_lgpl-devel >= 2.3
450 BuildRequires: libbonobo-devel >= 2.24
451 BuildRequires: libbonoboui-devel >= 2.24
452 BuildRequires: bonobo-activation-devel
453 BuildRequires: gconf2-devel
454 BuildRequires: freetype2-devel
455 BuildRequires: cairo-devel
456 BuildRequires: fontconfig-devel >= 2.6
457 BuildRequires: gnome-vfs2-devel >= 2.24
458 BuildRequires: libpng-devel
459 %endif
460 %if %{mdk}
461 BuildRequires: libtermcap-devel
462 BuildRequires: libstdc++-static-devel
463 BuildRequires: glibc-static-devel
464 BuildRequires: glibc-devel >= 2.3
465 %endif
466 %if %{mdk} && !%{mdv} && %{gconsole}
467 BuildRequires: gtk2-devel >= 2.0
468 BuildRequires: libgnomeui2-devel >= 2.0
469 BuildRequires: libORBit2-devel
470 BuildRequires: libart_lgpl-devel >= 2.0
471 BuildRequires: libbonobo2_0-devel
472 BuildRequires: libbonoboui2_0-devel
473 BuildRequires: libbonobo-activation-devel
474 BuildRequires: libGConf2-devel
475 BuildRequires: freetype2-devel
476 %endif
477 %if %{mdv} && %{gconsole}
478 BuildRequires: gtk2-devel >= 2.8
479 BuildRequires: libgnomeui2-devel >= 2.10
480 BuildRequires: libORBit2-devel
481 BuildRequires: libart_lgpl-devel >= 2.3
482 BuildRequires: libbonobo2_0-devel
483 BuildRequires: libbonoboui2_0-devel
484 BuildRequires: libbonobo-activation-devel
485 BuildRequires: libGConf2-devel
486 BuildRequires: freetype2-devel
487 %endif
488 %if %{fc3}
489 BuildRequires: libtermcap-devel
490 BuildRequires: glibc-devel >= 2.3
491 %endif
492 %if %{fc3} && %{gconsole}
493 BuildRequires: gtk2-devel >= 2.4
494 BuildRequires: libgnomeui-devel >= 2.8
495 BuildRequires: ORBit2-devel
496 BuildRequires: libart_lgpl-devel >= 2.3
497 BuildRequires: libbonobo-devel >= 2.8
498 BuildRequires: libbonoboui-devel >= 2.8
499 BuildRequires: bonobo-activation-devel
500 BuildRequires: GConf2-devel
501 BuildRequires: freetype-devel
502 %endif
503 %if %{fc4}
504 BuildRequires: libtermcap-devel
505 BuildRequires: glibc-devel >= 2.3
506 %endif
507 %if %{fc4} && %{gconsole}
508 BuildRequires: gtk2-devel >= 2.6
509 BuildRequires: libgnomeui-devel >= 2.10
510 BuildRequires: ORBit2-devel
511 BuildRequires: libart_lgpl-devel >= 2.3
512 BuildRequires: libbonobo-devel >= 2.8
513 BuildRequires: libbonoboui-devel >= 2.8
514 BuildRequires: bonobo-activation-devel
515 BuildRequires: GConf2-devel
516 BuildRequires: freetype-devel
517 %endif
518 %if %{fc5}
519 BuildRequires: libtermcap-devel
520 BuildRequires: glibc-devel >= 2.4
521 %endif
522 %if %{fc5} && %{gconsole}
523 BuildRequires: gtk2-devel >= 2.8
524 BuildRequires: libgnomeui-devel >= 2.14
525 BuildRequires: ORBit2-devel
526 BuildRequires: libart_lgpl-devel >= 2.3
527 BuildRequires: libbonobo-devel >= 2.14
528 BuildRequires: libbonoboui-devel >= 2.14
529 BuildRequires: GConf2-devel
530 BuildRequires: freetype-devel
531 %endif
532 %if %{fc6}
533 BuildRequires: libtermcap-devel
534 BuildRequires: glibc-devel >= 2.5
535 %endif
536 %if %{fc6} && %{gconsole}
537 BuildRequires: gtk2-devel >= 2.10
538 BuildRequires: libgnomeui-devel >= 2.16
539 BuildRequires: ORBit2-devel
540 BuildRequires: libart_lgpl-devel >= 2.3
541 BuildRequires: libbonobo-devel >= 2.16
542 BuildRequires: libbonoboui-devel >= 2.16
543 BuildRequires: GConf2-devel
544 BuildRequires: freetype-devel
545 %endif
546 %if %{fc7}
547 BuildRequires: libtermcap-devel
548 BuildRequires: glibc-devel >= 2.5
549 %endif
550 %if %{fc7} && %{gconsole}
551 BuildRequires: gtk2-devel >= 2.10
552 BuildRequires: libgnomeui-devel >= 2.18
553 BuildRequires: ORBit2-devel
554 BuildRequires: libart_lgpl-devel >= 2.3
555 BuildRequires: libbonobo-devel >= 2.18
556 BuildRequires: libbonoboui-devel >= 2.18
557 BuildRequires: GConf2-devel
558 BuildRequires: freetype-devel
559 %endif
560 %if %{fc8}
561 BuildRequires: libtermcap-devel
562 BuildRequires: glibc-devel >= 2.7
563 %endif
564 %if %{fc8} && %{gconsole}
565 BuildRequires: gtk2-devel >= 2.12
566 BuildRequires: libgnomeui-devel >= 2.20
567 BuildRequires: ORBit2-devel
568 BuildRequires: libart_lgpl-devel >= 2.3
569 BuildRequires: libbonobo-devel >= 2.20
570 BuildRequires: libbonoboui-devel >= 2.20
571 BuildRequires: GConf2-devel
572 BuildRequires: freetype-devel
573 %endif
574 %if %{fc9}
575 BuildRequires: glibc-devel >= 2.8
576 BuildRequires: zlib-static
577 %endif
578 %if %{fc9} && %{gconsole}
579 BuildRequires: gtk2-devel >= 2.12
580 BuildRequires: libgnomeui-devel >= 2.22
581 BuildRequires: ORBit2-devel
582 BuildRequires: libart_lgpl-devel >= 2.3
583 BuildRequires: libbonobo-devel >= 2.22
584 BuildRequires: libbonoboui-devel >= 2.22
585 BuildRequires: GConf2-devel
586 BuildRequires: freetype-devel
587 %endif
588 %if !%{rh7} && !%{su9} && !%{su10} && !%{su102} && !%{su103} && !%{su110} && !%{su111} && !%{mdk} && !%{fc3} && !%{fc4} && !%{fc5} && !%{fc6} && !%{fc7} && !%{fc8} && !%{fc9}
589 BuildRequires: libtermcap-devel
590 BuildRequires: glibc-devel >= 2.3
591 %endif
592 %if !%{rh7} && !%{su9} && !%{su10} && !%{su102} && !%{su103} && !%{su110} && !%{su111} && !%{mdk} && !%{fc3} && !%{fc4} && !%{fc5} && !%{fc6} && !%{fc7} && !%{fc8} && !%{fc9} && %{gconsole}
593 BuildRequires: gtk2-devel >= 2.0
594 BuildRequires: libgnomeui-devel >= 2.0
595 BuildRequires: ORBit2-devel
596 BuildRequires: libart_lgpl-devel >= 2.0
597 BuildRequires: libbonobo-devel >= 2.0
598 BuildRequires: libbonoboui-devel >= 2.0
599 BuildRequires: bonobo-activation-devel
600 BuildRequires: GConf2-devel
601 BuildRequires: linc-devel
602 BuildRequires: freetype-devel
603 %endif
604
605 %if %{mysql} && ! %{mysql4} && ! %{mysql5}
606 BuildRequires: mysql-devel >= 3.23
607 %endif
608
609 %if %{mysql} && %{mysql4}
610 BuildRequires: mysql-devel >= 4.0
611 %endif
612
613 %if %{mysql} && %{mysql5}
614 BuildRequires: mysql-devel >= 5.0
615 %endif
616
617 %if %{postgresql} && %{wb3}
618 BuildRequires: rh-postgresql-devel >= 7
619 %endif
620
621 %if %{postgresql} && ! %{wb3}
622 BuildRequires: postgresql-devel >= 7
623 %endif
624
625 %if %{wxconsole}
626 BuildRequires: wxGTK-devel >= 2.6
627 %endif
628
629 %description
630 %{blurb}
631
632 %{blurb2}
633 %{blurb3}
634 %{blurb4}
635 %{blurb5}
636 %{blurb6}
637 %{blurb7}
638 %{blurb8}
639
640 %if %{mysql}
641 %package mysql
642 %endif
643 %if %{sqlite}
644 %package sqlite
645 %endif
646 %if %{postgresql}
647 %package postgresql
648 %endif
649
650 Summary: Bacula - The Network Backup Solution
651 Group: System Environment/Daemons
652 Provides: %{binname}-dir, %{binname}-sd, %{binname}-fd, %{binname}-server
653 Conflicts: bacula-client
654
655 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110} || %{su111}
656 Conflicts: bacula
657 %endif
658
659 Requires: ncurses, libstdc++, zlib, openssl, mtx
660
661 %if %{rh7}
662 Requires: glibc >= 2.2
663 Requires: libtermcap
664 %endif
665 %if %{su9} || %{su10}
666 Requires: glibc >= 2.3
667 Requires: termcap
668 %endif
669 %if %{su102}
670 Requires: glibc >= 2.5
671 Requires: termcap
672 %endif
673 %if %{su103}
674 Requires: glibc >= 2.6
675 Requires: termcap
676 %endif
677 %if %{su110}
678 Requires: glibc >= 2.8
679 Requires: termcap
680 %endif
681 %if %{su111}
682 Requires: glibc >= 2.9
683 Requires: termcap
684 %endif
685 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{su111} && ! %{fc5} && ! %{fc6} && ! %{fc7} && ! %{fc8} && ! %{fc9}
686 Requires: glibc >= 2.3
687 Requires: libtermcap
688 %endif
689 %if %{fc5}
690 Requires: glibc >= 2.4
691 Requires: libtermcap
692 %endif
693 %if %{fc6} || %{fc7}
694 Requires: glibc >= 2.5
695 Requires: libtermcap
696 %endif
697 %if %{fc8}
698 Requires: glibc >= 2.7
699 Requires: libtermcap
700 %endif
701 %if %{fc9}
702 Requires: glibc >= 2.8
703 %endif
704
705 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4} && ! %{mysql5}
706 Requires: mysql >= 3.23
707 Requires: mysql-server >= 3.23
708 %endif
709 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{mdk} && %{mysql4}
710 Requires: mysql >= 4.0
711 Requires: mysql-server >= 4.0
712 %endif
713 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{su111} && ! %{mdk} && %{mysql5}
714 Requires: mysql >= 5.0
715 Requires: mysql-server >= 5.0
716 %endif
717
718 %if %{mysql} && %{su9} && ! %{mysql4}
719 Requires: mysql >= 3.23
720 Requires: mysql-client >= 3.23
721 %endif
722 %if %{mysql} && %{su9} && %{mysql4}
723 Requires: mysql >= 4.0
724 Requires: mysql-client >= 4.0
725 %endif
726 %if %{mysql} && %{su10} && %{mysql4}
727 Requires: mysql >= 4.0
728 Requires: mysql-client >= 4.0
729 %endif
730 %if %{mysql} && %{su10} && %{mysql5}
731 Requires: mysql >= 5.0
732 Requires: mysql-client >= 5.0
733 %endif
734 %if %{mysql} && %{su102} && %{mysql5}
735 Requires: mysql >= 5.0
736 Requires: mysql-client >= 5.0
737 %endif
738 %if %{mysql} && %{su103} && %{mysql5}
739 Requires: mysql >= 5.0
740 Requires: mysql-client >= 5.0
741 %endif
742 %if %{mysql} && %{su110} && %{mysql5}
743 Requires: mysql >= 5.0
744 Requires: mysql-client >= 5.0
745 %endif
746 %if %{mysql} && %{su111} && %{mysql5}
747 Requires: mysql >= 5.0
748 Requires: mysql-client >= 5.0
749 %endif
750
751 %if %{mysql} && %{mdk} && ! %{mysql4}
752 Requires: mysql >= 3.23
753 Requires: mysql-client >= 3.23
754 %endif
755 %if %{mysql} && %{mdk} && %{mysql4}
756 Requires: mysql >= 4.0
757 Requires: mysql-client >= 4.0
758 %endif
759
760 %if %{postgresql} && %{wb3}
761 Requires: rh-postgresql >= 7
762 Requires: rh-postgresql-server >= 7
763 %endif
764 %if %{postgresql} && ! %{wb3}
765 Requires: postgresql >= 7
766 Requires: postgresql-server >= 7
767 %endif
768
769 %if %{mysql}
770 %description mysql
771 %endif
772 %if %{sqlite}
773 %description sqlite
774 %endif
775 %if %{postgresql}
776 %description postgresql
777 %endif
778
779 %if %{python}
780 Requires: python >= %{pyver}
781 %endif
782
783 %{blurb}
784
785 %{blurb2}
786 %{blurb3}
787 %{blurb4}
788 %{blurb5}
789 %{blurb6}
790 %{blurb7}
791 %{blurb8}
792
793 %if %{mysql}
794 This build requires MySQL to be installed separately as the catalog database.
795 %endif
796 %if %{postgresql}
797 This build requires PostgreSQL to be installed separately as the catalog database.
798 %endif
799 %if %{sqlite}
800 This build incorporates sqlite3 as the catalog database, statically compiled.
801 %endif
802 %if %{python}
803 This build includes python scripting support.
804 %endif
805
806 %if ! %{client_only} && %{mtx}
807 %package mtx
808 Summary: Bacula - The Network Backup Solution
809 Group: System Environment/Daemons
810 Provides: mtx
811
812 %description mtx
813 This is Bacula's version of mtx tape utilities for Linux distributions that
814 do not provide their own mtx package
815 %endif
816
817 %package client
818 Summary: Bacula - The Network Backup Solution
819 Group: System Environment/Daemons
820 Provides: %{binname}-fd
821 Conflicts: bacula-mysql
822 Conflicts: bacula-sqlite
823 Conflicts: bacula-postgresql
824
825 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110} || %{su111}
826 Provides: bacula
827 %endif
828
829 Requires: libstdc++, zlib, openssl
830
831 %if %{rh7}
832 Requires: glibc >= 2.2
833 Requires: libtermcap
834 %endif
835 %if %{su9} || %{su10}
836 Requires: glibc >= 2.3
837 Requires: termcap
838 %endif
839 %if %{su102}
840 Requires: glibc >= 2.5
841 Requires: termcap
842 %endif
843 %if %{su103}
844 Requires: glibc >= 2.6
845 Requires: termcap
846 %endif
847 %if %{su110}
848 Requires: glibc >= 2.8
849 Requires: termcap
850 %endif
851 %if %{su111}
852 Requires: glibc >= 2.9
853 Requires: termcap
854 %endif
855 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{su111} && ! %{fc5} && ! %{fc6} && ! %{fc7} && ! %{fc8} && ! %{fc9}
856 Requires: glibc >= 2.3
857 Requires: libtermcap
858 %endif
859 %if %{fc5}
860 Requires: glibc >= 2.4
861 Requires: libtermcap
862 %endif
863 %if %{fc6} || %{fc7}
864 Requires: glibc >= 2.5
865 Requires: libtermcap
866 %endif
867 %if %{fc8}
868 Requires: glibc >= 2.7
869 Requires: libtermcap
870 %endif
871 %if %{fc9}
872 Requires: glibc >= 2.8
873 %endif
874
875 %if %{python}
876 Requires: python >= %{pyver}
877 %endif
878
879 %description client
880 %{blurb}
881
882 %{blurb2}
883 %{blurb3}
884 %{blurb4}
885 %{blurb5}
886 %{blurb6}
887 %{blurb7}
888 %{blurb8}
889
890 This is the File daemon (Client) only package. It includes the command line 
891 console program.
892 %if %{python}
893 This build includes python scripting support.
894 %endif
895
896 %if ! %{client_only}
897 %package updatedb
898
899 Summary: Bacula - The Network Backup Solution
900 Group: System Environment/Daemons
901
902 %description updatedb
903 %{blurb}
904
905 %{blurb2}
906 %{blurb3}
907 %{blurb4}
908 %{blurb5}
909 %{blurb6}
910 %{blurb7}
911 %{blurb8}
912
913 This package installs scripts for updating older versions of the bacula
914 database.
915 %endif
916
917 %if %{rescue}
918 %package rescue
919
920 Summary: Bacula - The Network Backup Solution
921 Group: System Environment/Daemons
922
923 %description rescue
924 %{blurb}
925
926 %{blurb2}
927 %{blurb3}
928 %{blurb4}
929 %{blurb5}
930 %{blurb6}
931 %{blurb7}
932 %{blurb8}
933
934 This package installs scripts for creating a rescue USB key.
935 %endif
936
937 %package docs
938
939 Summary: Bacula - The Network Backup Solution
940 Group: System Environment/Daemons
941
942 %description docs
943 %{blurb}
944
945 %{blurb2}
946 %{blurb3}
947 %{blurb4}
948 %{blurb5}
949 %{blurb6}
950 %{blurb7}
951 %{blurb8}
952
953 This package installs the Bacula pdf and html documentation.
954
955 %if %{gconsole}
956 %package gconsole
957 Summary: Bacula - The Network Backup Solution
958 Group: System Environment/Daemons
959 Requires: atk, libstdc++, zlib, pango, libxml2, bacula-fd, openssl
960 %endif
961
962 %if %{gconsole} && %{su9}
963 Requires: gtk2 >= 2.0
964 Requires: libgnome >= 2.0
965 Requires: libgnomeui >= 2.0
966 Requires: glibc >= 2.3
967 Requires: ORBit2
968 Requires: libart_lgpl >= 2.0
969 Requires: libbonobo >= 2.0
970 Requires: libbonoboui >= 2.0
971 Requires: bonobo-activation
972 Requires: gconf2
973 Requires: linc
974 Requires: freetype2
975 %endif
976 %if %{gconsole} && %{su10}
977 Requires: gtk2 >= 2.8
978 Requires: libgnome >= 2.12
979 Requires: libgnomeui >= 2.12
980 Requires: glibc >= 2.3
981 Requires: ORBit2
982 Requires: libart_lgpl >= 2.3
983 Requires: libbonobo >= 2.10
984 Requires: libbonoboui >= 2.10
985 Requires: bonobo-activation
986 Requires: gconf2
987 Requires: freetype2
988 Requires: cairo
989 Requires: fontconfig >= 2.3
990 Requires: gnome-vfs2 >= 2.12
991 Requires: libpng
992 %endif
993 %if %{gconsole} && %{su102}
994 Requires: gtk2 >= 2.10
995 Requires: libgnome >= 2.16
996 Requires: libgnomeui >= 2.16
997 Requires: glibc >= 2.5
998 Requires: ORBit2
999 Requires: libart_lgpl >= 2.3
1000 Requires: libbonobo >= 2.16
1001 Requires: libbonoboui >= 2.16
1002 Requires: bonobo-activation
1003 Requires: gconf2
1004 Requires: freetype2
1005 Requires: cairo
1006 Requires: fontconfig >= 2.4
1007 Requires: gnome-vfs2 >= 2.16
1008 Requires: libpng
1009 %endif
1010 %if %{gconsole} && %{su103}
1011 Requires: gtk2 >= 2.12
1012 Requires: libgnome >= 2.20
1013 Requires: libgnomeui >= 2.20
1014 Requires: glibc >= 2.6
1015 Requires: ORBit2
1016 Requires: libart_lgpl >= 2.3
1017 Requires: libbonobo >= 2.20
1018 Requires: libbonoboui >= 2.20
1019 Requires: bonobo-activation
1020 Requires: gconf2
1021 Requires: freetype2
1022 Requires: cairo
1023 Requires: fontconfig >= 2.4
1024 Requires: gnome-vfs2 >= 2.20
1025 Requires: libpng
1026 %endif
1027 %if %{gconsole} && %{su110}
1028 Requires: gtk2 >= 2.12
1029 Requires: libgnome >= 2.22
1030 Requires: libgnomeui >= 2.22
1031 Requires: glibc >= 2.8
1032 Requires: ORBit2
1033 Requires: libart_lgpl >= 2.3
1034 Requires: libbonobo >= 2.22
1035 Requires: libbonoboui >= 2.22
1036 Requires: bonobo-activation
1037 Requires: gconf2
1038 Requires: freetype2
1039 Requires: cairo
1040 Requires: fontconfig >= 2.4
1041 Requires: gnome-vfs2 >= 2.22
1042 Requires: libpng
1043 %endif
1044 %if %{gconsole} && %{su111}
1045 Requires: gtk2 >= 2.14
1046 Requires: libgnome >= 2.24
1047 Requires: libgnomeui >= 2.24
1048 Requires: glibc >= 2.9
1049 Requires: ORBit2
1050 Requires: libart_lgpl >= 2.3
1051 Requires: libbonobo >= 2.24
1052 Requires: libbonoboui >= 2.24
1053 Requires: bonobo-activation
1054 Requires: gconf2
1055 Requires: freetype2
1056 Requires: cairo
1057 Requires: fontconfig >= 2.6
1058 Requires: gnome-vfs2 >= 2.24
1059 Requires: libpng
1060 %endif
1061 %if %{gconsole} && %{mdk} && !%{mdv}
1062 Requires: gtk2 >= 2.0
1063 Requires: libgnomeui2
1064 Requires: glibc >= 2.3
1065 Requires: ORBit2
1066 Requires: libart_lgpl >= 2.0
1067 Requires: libbonobo >= 2.0
1068 Requires: libbonoboui >= 2.0
1069 Requires: GConf2
1070 Requires: freetype2
1071 %endif
1072 %if %{gconsole} && %{mdv}
1073 Requires: gtk2 >= 2.8
1074 Requires: libgnomeui2
1075 Requires: glibc >= 2.3
1076 Requires: ORBit2
1077 Requires: libart_lgpl >= 2.3
1078 Requires: libbonobo >= 2.10
1079 Requires: libbonoboui >= 2.10
1080 Requires: GConf2
1081 Requires: freetype2
1082 %endif
1083 %if %{gconsole} && %{fc3}  
1084 Requires: gtk2 >= 2.4
1085 Requires: libgnomeui >= 2.8
1086 Requires: glibc >= 2.3
1087 Requires: ORBit2
1088 Requires: libart_lgpl >= 2.3
1089 Requires: libbonobo >= 2.8
1090 Requires: libbonoboui >= 2.8
1091 Requires: bonobo-activation
1092 Requires: GConf2
1093 Requires: freetype
1094 %endif
1095 %if %{gconsole} && %{fc4}  
1096 Requires: gtk2 >= 2.6
1097 Requires: libgnomeui >= 2.10
1098 Requires: glibc >= 2.3
1099 Requires: ORBit2
1100 Requires: libart_lgpl >= 2.3
1101 Requires: libbonobo >= 2.8
1102 Requires: libbonoboui >= 2.8
1103 Requires: bonobo-activation
1104 Requires: GConf2
1105 Requires: freetype
1106 %endif
1107 %if %{gconsole} && %{fc5}  
1108 Requires: gtk2 >= 2.8
1109 Requires: libgnomeui >= 2.14
1110 Requires: glibc >= 2.4
1111 Requires: ORBit2
1112 Requires: libart_lgpl >= 2.3
1113 Requires: libbonobo >= 2.14
1114 Requires: libbonoboui >= 2.14
1115 Requires: GConf2
1116 Requires: freetype
1117 %endif
1118 %if %{gconsole} && %{fc6}  
1119 Requires: gtk2 >= 2.10
1120 Requires: libgnomeui >= 2.16
1121 Requires: glibc >= 2.5
1122 Requires: ORBit2
1123 Requires: libart_lgpl >= 2.3
1124 Requires: libbonobo >= 2.16
1125 Requires: libbonoboui >= 2.16
1126 Requires: GConf2
1127 Requires: freetype
1128 %endif
1129 %if %{gconsole} && %{fc7}  
1130 Requires: gtk2 >= 2.10
1131 Requires: libgnomeui >= 2.18
1132 Requires: glibc >= 2.5
1133 Requires: ORBit2
1134 Requires: libart_lgpl >= 2.3
1135 Requires: libbonobo >= 2.18
1136 Requires: libbonoboui >= 2.18
1137 Requires: GConf2
1138 Requires: freetype
1139 %endif
1140 %if %{gconsole} && %{fc8}  
1141 Requires: gtk2 >= 2.12
1142 Requires: libgnomeui >= 2.20
1143 Requires: glibc >= 2.7
1144 Requires: ORBit2
1145 Requires: libart_lgpl >= 2.3
1146 Requires: libbonobo >= 2.20
1147 Requires: libbonoboui >= 2.20
1148 Requires: GConf2
1149 Requires: freetype
1150 %endif
1151 %if %{gconsole} && %{fc9}  
1152 Requires: gtk2 >= 2.12
1153 Requires: libgnomeui >= 2.22
1154 Requires: glibc >= 2.8
1155 Requires: ORBit2
1156 Requires: libart_lgpl >= 2.3
1157 Requires: libbonobo >= 2.22
1158 Requires: libbonoboui >= 2.22
1159 Requires: GConf2
1160 Requires: freetype
1161 %endif
1162 %if %{gconsole} && !%{su9} && !%{su10} && !%{su102} && !%{su103} && !%{su110} && !%{su111} && !%{mdk} && !%{fc3} && !%{fc4} && !%{fc5} && !%{fc6} && !%{fc7} && !%{fc8} && !%{fc9}
1163 Requires: gtk2 >= 2.0
1164 Requires: libgnomeui >= 2.0
1165 Requires: glibc >= 2.3
1166 Requires: ORBit2
1167 Requires: libart_lgpl >= 2.0
1168 Requires: libbonobo >= 2.0
1169 Requires: libbonoboui >= 2.0
1170 Requires: bonobo-activation
1171 Requires: GConf2
1172 Requires: linc
1173 Requires: freetype
1174 %endif
1175 %if %{gconsole} && %{su9}
1176 Requires: xsu
1177 %endif
1178 %if %{gconsole} && %{su10}
1179 Requires: xsu
1180 %endif
1181 %if %{gconsole} && %{su102}
1182 Requires: xsu
1183 %endif
1184 %if %{gconsole} && %{su103}
1185 Requires: xsu
1186 %endif
1187 %if %{gconsole} && %{su110}
1188 Requires: xsu
1189 %endif
1190 %if %{gconsole} && %{su111}
1191 Requires: xsu
1192 %endif
1193 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{su111}
1194 Requires: usermode
1195 %endif
1196
1197 %if %{gconsole}
1198 %description gconsole
1199 %{blurb}
1200
1201 %{blurb2}
1202 %{blurb3}
1203 %{blurb4}
1204 %{blurb5}
1205 %{blurb6}
1206 %{blurb7}
1207 %{blurb8}
1208
1209 This is the Gnome Console package. It is an add-on to the client or
1210 server packages.
1211 %endif
1212
1213 %if %{wxconsole}
1214 %package wxconsole
1215 Summary: Bacula - The Network Backup Solution
1216 Group: System Environment/Daemons
1217 Requires: wxGTK >= 2.6, libstdc++, openssl
1218 %endif
1219
1220 %if %{wxconsole} && %{su10}
1221 Requires: gtk2 >= 2.8
1222 %endif
1223
1224 %if %{wxconsole} && %{su102}
1225 Requires: gtk2 >= 2.10
1226 %endif
1227
1228 %if %{wxconsole} && %{su103}
1229 Requires: gtk2 >= 2.12
1230 %endif
1231
1232 %if %{wxconsole} && %{su110}
1233 Requires: gtk2 >= 2.12
1234 %endif
1235
1236 %if %{wxconsole} && %{su111}
1237 Requires: gtk2 >= 2.14
1238 %endif
1239
1240 %if %{wxconsole} && %{fc3}  
1241 Requires: gtk2 >= 2.4
1242 %endif
1243
1244 %if %{wxconsole} && %{fc4}  
1245 Requires: gtk2 >= 2.6
1246 %endif
1247
1248 %if %{wxconsole} && %{fc5}  
1249 Requires: gtk2 >= 2.8
1250 %endif
1251
1252 %if %{wxconsole} && %{fc6}  
1253 Requires: gtk2 >= 2.10
1254 %endif
1255
1256 %if %{wxconsole} && %{fc7}  
1257 Requires: gtk2 >= 2.10
1258 %endif
1259
1260 %if %{wxconsole} && %{fc8}  
1261 Requires: gtk2 >= 2.12
1262 %endif
1263
1264 %if %{wxconsole} && %{fc9}  
1265 Requires: gtk2 >= 2.12
1266 %endif
1267
1268 %if %{wxconsole}
1269 %description wxconsole
1270 %{blurb}
1271
1272 %{blurb2}
1273 %{blurb3}
1274 %{blurb4}
1275 %{blurb5}
1276 %{blurb6}
1277 %{blurb7}
1278 %{blurb8}
1279
1280 This is the WXWindows Console package. It is an add-on to the client or
1281 server packages.
1282 %endif
1283
1284 %if %{bat}
1285 %package bat
1286 Summary: Bacula - The Network Backup Solution
1287 Group: System Environment/Daemons
1288 %endif
1289
1290 %if %{bat} && %{su10}
1291 Requires: openssl
1292 Requires: glibc >= 2.4
1293 Requires: fontconfig
1294 Requires: freetype2
1295 Requires: libgcc
1296 Requires: libpng
1297 Requires: qt >= 4.2
1298 Requires: libstdc++
1299 Requires: zlib
1300 %endif
1301
1302 %if %{bat} && %{su102}
1303 Requires: openssl
1304 Requires: glibc >= 2.5
1305 Requires: fontconfig
1306 Requires: freetype2
1307 Requires: libgcc
1308 Requires: libpng
1309 Requires: qt >= 4.2
1310 Requires: libstdc++
1311 Requires: zlib
1312 %endif
1313
1314 %if %{bat} && %{su103}
1315 Requires: openssl
1316 Requires: glibc >= 2.6
1317 Requires: fontconfig
1318 Requires: freetype2
1319 Requires: libgcc
1320 Requires: libpng
1321 Requires: qt >= 4.2
1322 Requires: libstdc++
1323 Requires: zlib
1324 %endif
1325
1326 %if %{bat} && %{su110}
1327 Requires: openssl
1328 Requires: glibc >= 2.8
1329 Requires: fontconfig
1330 Requires: freetype2
1331 Requires: libgcc
1332 Requires: libpng
1333 Requires: qt >= 4.2
1334 Requires: libstdc++
1335 Requires: zlib
1336 %endif
1337
1338 %if %{bat} && %{su111}
1339 Requires: openssl
1340 Requires: glibc >= 2.9
1341 Requires: fontconfig
1342 Requires: freetype2
1343 Requires: libgcc
1344 Requires: libpng
1345 Requires: qt >= 4.2
1346 Requires: libstdc++
1347 Requires: zlib
1348 %endif
1349
1350 %if %{bat} && %{fc5}
1351 Requires: openssl
1352 Requires: glibc >= 2.4
1353 Requires: fontconfig
1354 Requires: freetype
1355 Requires: libgcc
1356 Requires: libpng
1357 Requires: qt4 >= 4.2
1358 Requires: libstdc++
1359 Requires: zlib
1360 %endif
1361
1362 %if %{bat} && %{fc6}
1363 Requires: openssl
1364 Requires: glibc >= 2.5
1365 Requires: fontconfig
1366 Requires: freetype
1367 Requires: libgcc
1368 Requires: libpng
1369 Requires: qt4 >= 4.2
1370 Requires: libstdc++
1371 Requires: zlib
1372 %endif
1373
1374 %if %{bat} && %{fc7}
1375 Requires: openssl
1376 Requires: glibc >= 2.5
1377 Requires: fontconfig
1378 Requires: freetype
1379 Requires: libgcc
1380 Requires: libpng
1381 Requires: qt4 >= 4.2
1382 Requires: libstdc++
1383 Requires: zlib
1384 %endif
1385
1386 %if %{bat} && %{fc8}
1387 Requires: openssl
1388 Requires: glibc >= 2.7
1389 Requires: fontconfig
1390 Requires: freetype
1391 Requires: libgcc
1392 Requires: libpng
1393 Requires: qt4 >= 4.2
1394 Requires: libstdc++
1395 Requires: zlib
1396 %endif
1397
1398 %if %{bat} && %{fc9}
1399 Requires: openssl
1400 Requires: glibc >= 2.8
1401 Requires: fontconfig
1402 Requires: freetype
1403 Requires: libgcc
1404 Requires: libpng
1405 Requires: qt4 >= 4.3
1406 Requires: libstdc++
1407 Requires: zlib
1408 %endif
1409
1410 %if %{bat}
1411 %description bat
1412 %{blurb}
1413
1414 %{blurb2}
1415 %{blurb3}
1416 %{blurb4}
1417 %{blurb5}
1418 %{blurb6}
1419 %{blurb7}
1420 %{blurb8}
1421
1422 This is the Bacula Administration Tool (bat) graphical user interface package. 
1423 It is an add-on to the client or server packages.
1424 %endif
1425
1426 # SuSE turns off stripping of binaries by default. In order to get
1427 # stripped packages we must generate debug package. RedHat and Mandriva
1428 # turn debug packages on by default but strip binaries regardless.
1429 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110} || %{su111}
1430 %debug_package
1431 %endif
1432
1433 %prep
1434
1435 %setup
1436 %setup -T -D -b 1
1437 %setup -T -D -b 2
1438 %setup -T -D -b 3
1439 %setup -T -D -b 4
1440
1441 %build
1442
1443 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110} || %{su111}
1444 export LDFLAGS="${LDFLAGS} -L/usr/lib/termcap"
1445 %endif
1446
1447 %if %{bat}
1448 export QTDIR=$(pkg-config --variable=prefix QtCore)
1449 export QTINC=$(pkg-config --variable=includedir QtCore)
1450 export QTLIB=$(pkg-config --variable=libdir QtCore)
1451 export PATH=${QTDIR}/bin/:${PATH}
1452 %endif
1453
1454 cwd=${PWD}
1455 cd %{depkgs}
1456 %if %{sqlite}
1457 make sqlite3
1458 %endif
1459 %if ! %{client_only} && %{mtx}
1460 make mtx
1461 %endif
1462 %if %{bat}
1463 #make qwt
1464 %endif
1465 cd ${cwd}
1466
1467 %if %{wb3} || %{old_pgsql}
1468 patch -p3 src/cats/postgresql.c < %SOURCE5
1469 %endif
1470
1471 # patches for the bundled sqlite scripts
1472
1473 # patch the make_sqlite_tables script for installation bindir
1474 #patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
1475 #patch src/cats/make_sqlite3_tables.in src/cats/make_sqlite3_tables.in.patch
1476
1477 # patch the create_sqlite_database script for installation bindir
1478 #patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
1479 #patch src/cats/create_sqlite3_database.in src/cats/create_sqlite3_database.in.patch
1480
1481 # patch the make_catalog_backup script for installation bindir
1482 #patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
1483
1484 # patch the update_sqlite_tables script for installation bindir
1485 #patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
1486 #patch src/cats/update_sqlite3_tables.in src/cats/update_sqlite3_tables.in.patch
1487
1488 # patch the bacula-dir init script to remove sqlite service
1489 %if %{sqlite} && %{su9}
1490 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1491 %endif
1492 %if %{sqlite} && %{su10}
1493 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1494 %endif
1495 %if %{sqlite} && %{su102}
1496 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1497 %endif
1498 %if %{sqlite} && %{su103}
1499 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1500 %endif
1501 %if %{sqlite} && %{su110}
1502 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1503 %endif
1504 %if %{sqlite} && %{su111}
1505 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1506 %endif
1507
1508 # 64 bit lib location hacks
1509 # as of 1.39.18 it should not be necessary to enable x86_64 as configure is
1510 # reported to be fixed to properly detect lib locations.
1511 %if %{x86_64}
1512 export LDFLAGS="${LDFLAGS} -L/usr/lib64"
1513 %endif
1514 %if %{mysql} && %{x86_64}
1515 export LDFLAGS="${LDFLAGS} -L/usr/lib64/mysql"
1516 %endif
1517 %if %{python} && %{x86_64}
1518 export LDFLAGS="${LDFLAGS} -L/usr/lib64/python%{pyver}"
1519 %endif
1520
1521 # Red Hat's 64 bit installation of QT4 appears to be broken so:
1522 %define qt_path 0
1523 %if %{rhel5} || %{centos5} || %{sl5}
1524 %define qt_path 1
1525 %endif
1526 %if %{bat} && %{qt_path} && %{x86_64}
1527 export PATH=/usr/lib64/qt4/bin/:$PATH
1528 export QTDIR=/usr/lib64/qt4/
1529 export QTINC=/usr/lib64/qt4/include/
1530 export QTLIB=/usr/lib64/qt4/
1531 %endif
1532
1533 %if %{rescue}
1534 echo "Doing rescue configure"
1535 %configure \
1536         --prefix=%{_prefix} \
1537         --sbindir=%{_sbindir} \
1538         --sysconfdir=%{sysconf_dir} \
1539         --with-scriptdir=%{script_dir} \
1540         --with-working-dir=%{working_dir} \
1541         --with-pid-dir=%{pid_dir} \
1542         --enable-smartalloc \
1543         --enable-client-only \
1544         %if %{mdk}
1545         --disable-nls \
1546         %endif
1547         --enable-static-fd \
1548         --disable-libtool
1549
1550 echo "Doing rescue make"
1551 make
1552 %endif
1553
1554 echo "Doing full configure"
1555 %configure \
1556         --prefix=%{_prefix} \
1557         --sbindir=%{_sbindir} \
1558         --sysconfdir=%{sysconf_dir} \
1559         --with-scriptdir=%{script_dir} \
1560         --with-working-dir=%{working_dir} \
1561         --with-pid-dir=%{pid_dir} \
1562         --enable-smartalloc \
1563         --disable-libtool \
1564 %if %{gconsole}
1565         --enable-gnome \
1566 %endif
1567 %if %{gconsole} && ! %{rh8}
1568         --enable-tray-monitor \
1569 %endif
1570 %if %{mysql}
1571         --with-mysql \
1572 %endif
1573 %if %{sqlite}
1574         --with-sqlite3 \
1575 %endif
1576 %if %{postgresql}
1577         --with-postgresql \
1578 %endif
1579 %if %{wxconsole}
1580         --enable-bwx-console \
1581 %endif
1582 %if %{bat}
1583         --enable-bat \
1584         --without-qwt \
1585 %endif
1586 %if %{python}
1587         --with-python \
1588 %endif
1589 %if %{client_only}
1590         --enable-client-only \
1591 %endif
1592 %if %{rh7} || %{rh8} || %{rh9} || %{fc1} || %{fc3} || %{wb3} 
1593         --disable-batch-insert \
1594 %endif
1595         --mandir=%{_mandir} \
1596         --with-subsys-dir=%{_subsysdir} \
1597         --with-dir-user=%{director_daemon_user} \
1598         --with-dir-group=%{daemon_group} \
1599         --with-sd-user=%{storage_daemon_user} \
1600         --with-sd-group=%{storage_daemon_group} \
1601         --with-fd-user=%{file_daemon_user} \
1602         --with-fd-group=%{daemon_group} \
1603         --with-basename="XXX_HOSTNAME_XXX" \
1604         --with-hostname="XXX_HOSTNAME_XXX" \
1605         --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
1606         --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
1607         --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
1608         --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
1609         --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
1610         --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
1611         --with-openssl
1612
1613 echo "Doing Full make"
1614 make
1615
1616 echo "Doing Full install"
1617 %install
1618  
1619 cwd=${PWD}
1620 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1621 mkdir -p $RPM_BUILD_ROOT/etc/init.d
1622 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
1623 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/logfiles
1624 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/services
1625 mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
1626 mkdir -p $RPM_BUILD_ROOT%{script_dir}/updatedb
1627
1628 %if %{gconsole} || %{wxconsole} || %{bat}
1629 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
1630 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
1631 %endif
1632
1633 %if %{gconsole} || %{wxconsole} || %{bat}
1634 %define usermode_iftrick 1
1635 %else
1636 %define usermode_iftrick 0
1637 %endif
1638
1639 %if %{usermode_iftrick} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{su111}
1640 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
1641 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
1642 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
1643 %endif
1644
1645 %if %{sqlite}
1646 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
1647 %endif
1648
1649 make \
1650         prefix=$RPM_BUILD_ROOT%{_prefix} \
1651         sbindir=$RPM_BUILD_ROOT%{_sbindir} \
1652         sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1653         scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1654         working_dir=$RPM_BUILD_ROOT%{working_dir} \
1655         piddir=$RPM_BUILD_ROOT%{pid_dir} \
1656         mandir=$RPM_BUILD_ROOT%{_mandir} \
1657         install
1658
1659 %if ! %{client_only} && %{mtx}
1660 cd %{depkgs}
1661 make \
1662         prefix=$RPM_BUILD_ROOT%{_prefix} \
1663         sbindir=$RPM_BUILD_ROOT%{_sbindir} \
1664         sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1665         scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1666         working_dir=$RPM_BUILD_ROOT%{working_dir} \
1667         piddir=$RPM_BUILD_ROOT%{pid_dir} \
1668         mandir=$RPM_BUILD_ROOT%{_mandir} \
1669         mtx-install
1670 cd ${cwd}
1671 %endif
1672
1673 # make install in manpages installs _everything_ shotgun style
1674 # so now delete what we will not be packaging
1675 %if ! %{wxconsole}
1676 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
1677 %endif
1678 %if ! %{bat}
1679 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bat.1.%{manpage_ext}
1680 %endif
1681 %if ! %{gconsole}
1682 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
1683 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
1684 %endif
1685 %if %{client_only}
1686 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bsmtp.1.%{manpage_ext}
1687 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1688 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1689 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bcopy.8.%{manpage_ext}
1690 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bextract.8.%{manpage_ext}
1691 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bls.8.%{manpage_ext}
1692 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bscan.8.%{manpage_ext}
1693 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/btape.8.%{manpage_ext}
1694 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/dbcheck.8.%{manpage_ext}
1695 %endif
1696
1697 # fixme - make installs the mysql scripts for sqlite build
1698 %if %{sqlite}
1699 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1700 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1701 rm -f $RPM_BUILD_ROOT%{script_dir}/grant_mysql_privileges
1702 %endif
1703
1704 # fixme - make installs the mysql scripts for postgresql build
1705 %if %{postgresql}
1706 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1707 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1708 %endif
1709
1710 # fixme - make installs gconsole script for build without gconsole
1711 %if ! %{gconsole}
1712 rm -f $RPM_BUILD_ROOT%{script_dir}/gconsole
1713 %endif
1714
1715 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
1716
1717 # install the init scripts
1718 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110} || %{su111}
1719 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1720 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1721 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1722 %endif
1723
1724 %if %{mdk}
1725 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1726 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1727 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1728 %endif
1729
1730 %if ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{su111} && ! %{mdk}
1731 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1732 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1733 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1734 %endif
1735
1736 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
1737
1738 %if %{client_only}
1739 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1740 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1741 %endif
1742
1743 # install the menu stuff
1744 %if %{gconsole} && %{su9}
1745 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1746 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1747 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1748 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1749 %endif
1750 %if %{gconsole} && %{su10}
1751 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1752 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1753 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1754 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1755 %endif
1756 %if %{gconsole} && %{su102}
1757 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1758 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1759 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1760 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1761 %endif
1762 %if %{gconsole} && %{su103}
1763 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1764 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1765 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1766 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1767 %endif
1768 %if %{gconsole} && %{su110}
1769 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1770 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1771 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1772 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1773 %endif
1774 %if %{gconsole} && %{su111}
1775 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1776 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1777 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1778 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1779 %endif
1780 %if %{wxconsole} && %{su10}
1781 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1782 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1783 %endif
1784 %if %{wxconsole} && %{su102}
1785 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1786 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1787 %endif
1788 %if %{wxconsole} && %{su103}
1789 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1790 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1791 %endif
1792 %if %{wxconsole} && %{su110}
1793 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1794 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1795 %endif
1796 %if %{wxconsole} && %{su111}
1797 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1798 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1799 %endif
1800 %if %{bat} && %{su102}
1801 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1802 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1803 %endif
1804 %if %{bat} && %{su103}
1805 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1806 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1807 %endif
1808 %if %{bat} && %{su110}
1809 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1810 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1811 %endif
1812 %if %{bat} && %{su111}
1813 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1814 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1815 %endif
1816 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{fc6} || %{fc7} || %{fc8} || %{fc9} || %{mdk}
1817 %define iftrick 1
1818 %else
1819 %define iftrick 0
1820 %endif
1821 %if %{gconsole} && %{iftrick}
1822 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1823 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1824 cp -p scripts/bgnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bgnome-console
1825 cp -p scripts/bgnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/bgnome-console
1826 #ln -sf consolehelper $RPM_BUILD_ROOT%{_sbindir}/bgnome-console
1827 %endif
1828 %if %{gconsole} && ! %{rh8}
1829 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1830 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1831 %endif
1832 %if %{wxconsole} && %{iftrick}
1833 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1834 cp -p scripts/wxconsole.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1835 cp -p scripts/wxconsole.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bwx-console
1836 cp -p scripts/wxconsole.pamd $RPM_BUILD_ROOT/etc/pam.d/bwx-console
1837 #ln -sf consolehelper $RPM_BUILD_ROOT%{_sbindir}/bwx-console
1838 %endif
1839 %if %{bat} && %{iftrick}
1840 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1841 cp -p scripts/bat.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1842 cp -p scripts/bat.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bat
1843 cp -p scripts/bat.pamd $RPM_BUILD_ROOT/etc/pam.d/bat
1844 #ln -sf consolehelper $RPM_BUILD_ROOT/%{_sbindir}/bat
1845 %endif
1846
1847 # install sqlite
1848 %if %{sqlite}
1849 cp -p %{depkgs}/sqlite3/sqlite3 $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite3
1850 cp -p %{depkgs}/sqlite3/sqlite3.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite3.h
1851 cp -p %{depkgs}/sqlite3/libsqlite3.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite3.a
1852 %endif
1853
1854 # install the logrotate file
1855 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
1856
1857 # install the updatedb scripts
1858 cp -p updatedb/* $RPM_BUILD_ROOT%{script_dir}/updatedb/
1859
1860 # install the logwatch scripts
1861 %if ! %{client_only}
1862 cp -p scripts/logwatch/bacula $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1863 cp -p scripts/logwatch/logfile.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1864 cp -p scripts/logwatch/services.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1865 chmod 755 $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1866 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1867 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1868 %endif
1869
1870 # install the rescue files
1871 %if %{rescue}
1872 mkdir $RPM_BUILD_ROOT%{script_dir}/rescue
1873 mkdir $RPM_BUILD_ROOT%{script_dir}/rescue/freebsd
1874 mkdir $RPM_BUILD_ROOT%{script_dir}/rescue/solaris
1875 cp -p %{_rescuesrc}/Makefile* $RPM_BUILD_ROOT%{script_dir}/rescue/
1876 cp -p %{_rescuesrc}/freebsd/Makefile* $RPM_BUILD_ROOT%{script_dir}/rescue/freebsd/
1877 cp -p %{_rescuesrc}/solaris/Makefile* $RPM_BUILD_ROOT%{script_dir}/rescue/solaris/
1878 cp -p %{_rescuesrc}/README $RPM_BUILD_ROOT%{script_dir}/rescue/
1879 cp -p %{_rescuesrc}/configure $RPM_BUILD_ROOT%{script_dir}/rescue/
1880 cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT%{script_dir}/rescue/
1881 cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT%{script_dir}/rescue/
1882 cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT%{script_dir}/rescue/
1883 cp -pr %{_rescuesrc}/knoppix $RPM_BUILD_ROOT%{script_dir}/rescue/
1884 touch $RPM_BUILD_ROOT%{script_dir}/rescue/linux/cdrom/rpm_release
1885 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT%{script_dir}/rescue/linux/cdrom/bacula/bin/bacula-fd
1886 rm -f src/filed/static-bacula-fd
1887 %endif
1888
1889 # install bat 
1890 %if %{bat}
1891 cp -p src/qt-console/bat $RPM_BUILD_ROOT%{_sbindir}/bat
1892 cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
1893 %endif
1894
1895 # now clean up permissions that are left broken by the install
1896 chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
1897 %if %{gconsole} && ! %{rh8}
1898 chmod 755 $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor
1899 chmod 644 $RPM_BUILD_ROOT%{sysconf_dir}/tray-monitor.conf
1900 %endif
1901
1902 # fix me - building enable-client-only installs files not included in bacula-client package
1903 %if %{client_only}
1904 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula
1905 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-dir
1906 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-sd
1907 rm -f $RPM_BUILD_ROOT%{script_dir}/disk-changer
1908 rm -f $RPM_BUILD_ROOT%{script_dir}/dvd-handler
1909 rm -f $RPM_BUILD_ROOT%{script_dir}/mtx-changer
1910 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1911 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1912 rm -rf $RPM_BUILD_ROOT%{script_dir}/updatedb
1913 %endif
1914
1915 %clean
1916 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1917 rm -rf $RPM_BUILD_DIR/%{name}-docs-%{docs_version}
1918 rm -rf $RPM_BUILD_DIR/%{name}-rescue-%{_rescuever}
1919 rm -rf $RPM_BUILD_DIR/depkgs
1920 rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
1921
1922 %if %{mysql}
1923 # MySQL specific files
1924 %files mysql
1925 %defattr(-, root, %{daemon_group})
1926 %attr(-, root, %{daemon_group}) %{script_dir}/create_mysql_database
1927 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_database
1928 %attr(-, root, %{daemon_group}) %{script_dir}/make_mysql_tables
1929 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_tables
1930 %attr(-, root, %{daemon_group}) %{script_dir}/update_mysql_tables
1931 %attr(-, root, %{daemon_group}) %{script_dir}/grant_mysql_privileges
1932 %attr(-, root, %{daemon_group}) %{script_dir}/startmysql
1933 %attr(-, root, %{daemon_group}) %{script_dir}/stopmysql
1934 %endif
1935
1936 %if %{sqlite}
1937 %files sqlite
1938 %defattr(-, root, %{daemon_group})
1939 %attr(-, root, %{daemon_group}) %{script_dir}/create_sqlite3_database
1940 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite3_database
1941 %attr(-, root, %{daemon_group}) %{script_dir}/grant_sqlite3_privileges
1942 %attr(-, root, %{daemon_group}) %{script_dir}/make_sqlite3_tables
1943 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite3_tables
1944 %attr(-, root, %{daemon_group}) %{script_dir}/update_sqlite3_tables
1945 %{sqlite_bindir}/libsqlite3.a
1946 %{sqlite_bindir}/sqlite3.h
1947 %{sqlite_bindir}/sqlite3
1948 %endif
1949
1950 %if %{postgresql}
1951 %files postgresql
1952 %defattr(-, root, %{daemon_group})
1953 %attr(-, root, %{daemon_group}) %{script_dir}/create_postgresql_database
1954 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_database
1955 %attr(-, root, %{daemon_group}) %{script_dir}/make_postgresql_tables
1956 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_tables
1957 %attr(-, root, %{daemon_group}) %{script_dir}/update_postgresql_tables
1958 %attr(-, root, %{daemon_group}) %{script_dir}/grant_postgresql_privileges
1959 %endif
1960
1961 # The rest is DB backend independent
1962 %if ! %{client_only}
1963 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1964 %attr(-, root, %{daemon_group}) %{script_dir}/bacula
1965 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1966 %attr(-, root, %{daemon_group}) %{script_dir}/create_bacula_database
1967 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_database
1968 %attr(-, root, %{daemon_group}) %{script_dir}/grant_bacula_privileges
1969 %attr(-, root, %{daemon_group}) %{script_dir}/make_bacula_tables
1970 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_tables
1971 %attr(-, root, %{daemon_group}) %{script_dir}/update_bacula_tables
1972 %attr(-, root, %{daemon_group}) %{script_dir}/make_catalog_backup
1973 %attr(-, root, %{daemon_group}) %{script_dir}/delete_catalog_backup
1974 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1975 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1976 %attr(-, root, %{daemon_group}) %{script_dir}/disk-changer
1977 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-dir
1978 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
1979 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-sd
1980 %attr(-, root, %{daemon_group}) %{script_dir}/bpipe-fd.so
1981 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
1982 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-sd
1983 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
1984 %attr(-, root, %{storage_daemon_group}) %{script_dir}/dvd-handler
1985 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
1986 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer.conf
1987
1988
1989 /etc/logrotate.d/bacula
1990 /etc/log.d/scripts/services/bacula
1991
1992 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
1993 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-dir.conf
1994 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1995 %attr(-, root, %{storage_daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-sd.conf
1996 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1997 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
1998 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/services/bacula.conf
1999 %attr(-, root, %{daemon_group}) %config(noreplace) %{script_dir}/query.sql
2000
2001 %attr(-, %{storage_daemon_user}, %{daemon_group}) %dir %{working_dir}
2002
2003 %attr(-, root, %{daemon_group}) %dir %{_sbindir}
2004 %attr(-, root, %{daemon_group}) %{_sbindir}/bacula-dir
2005 %attr(-, root, %{daemon_group}) %{_sbindir}/bacula-fd
2006 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/bacula-sd
2007 %attr(-, root, %{daemon_group}) %{_sbindir}/bcopy
2008 %attr(-, root, %{daemon_group}) %{_sbindir}/bextract
2009 %attr(-, root, %{daemon_group}) %{_sbindir}/bls
2010 %attr(-, root, %{daemon_group}) %{_sbindir}/bscan
2011 %attr(-, root, %{daemon_group}) %{_sbindir}/btape
2012 %attr(-, root, %{daemon_group}) %{_sbindir}/btraceback
2013 %attr(-, root, %{daemon_group}) %{_sbindir}/bconsole
2014 %attr(-, root, %{daemon_group}) %{_sbindir}/dbcheck
2015 %attr(-, root, %{daemon_group}) %{_sbindir}/bsmtp
2016 %attr(-, root, %{daemon_group}) %{_sbindir}/bregex
2017 %attr(-, root, %{daemon_group}) %{_sbindir}/bwild
2018
2019
2020 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
2021 %{_mandir}/man8/bacula-dir.8.%{manpage_ext}
2022 %{_mandir}/man8/bacula-sd.8.%{manpage_ext}
2023 %{_mandir}/man8/bacula.8.%{manpage_ext}
2024 %{_mandir}/man8/bconsole.8.%{manpage_ext}
2025 %{_mandir}/man8/bcopy.8.%{manpage_ext}
2026 %{_mandir}/man8/bextract.8.%{manpage_ext}
2027 %{_mandir}/man8/bls.8.%{manpage_ext}
2028 %{_mandir}/man8/bscan.8.%{manpage_ext}
2029 %{_mandir}/man8/btape.8.%{manpage_ext}
2030 %{_mandir}/man8/btraceback.8.%{manpage_ext}
2031 %{_mandir}/man8/dbcheck.8.%{manpage_ext}
2032 %{_mandir}/man1/bsmtp.1.%{manpage_ext}
2033 %{_libdir}/libbac*
2034 %endif
2035
2036 %doc COPYING LICENSE ChangeLog ReleaseNotes VERIFYING kernstodo 
2037 %doc ../Release_Notes-%{version}-%{release}.txt
2038
2039 %if %{mysql}
2040 %pre mysql
2041 # test for bacula database older than version 9
2042 # note: this ASSUMES no password has been set for bacula database
2043 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
2044 %endif
2045
2046 %if %{sqlite}
2047 %pre sqlite
2048 # are we upgrading from sqlite to sqlite3?
2049 if [ -f %{working_dir}/bacula.db ] && [ -f %{sqlite_bindir}/sqlite ];then
2050         echo "This version of bacula-sqlite involves an upgrade to sqlite3."
2051         echo "Your catalog database file is not compatible with sqlite3, thus"
2052         echo "you will need to dump the data, delete the old file, and re-run"
2053         echo "this rpm upgrade."
2054         echo ""
2055         echo "Backing up your current database..."
2056         echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db > %{working_dir}/bacula_backup.sql
2057         mv %{working_dir}/bacula.db %{working_dir}/bacula.db.old
2058         echo "Your catalog data has been saved in %{working_dir}/bacula_backup.sql and your"
2059         echo "catalog file has been renamed %{working_dir}/bacula.db.old."
2060         echo ""
2061         echo "Please re-run this rpm package upgrade."
2062         echo "After the upgrade is complete, restore your catalog"
2063         echo "with the following commands:"
2064         echo "%{script_dir}/drop_sqlite3_tables"
2065         echo "cd %{working_dir}"
2066         echo "%{sqlite_bindir}/sqlite3 $* bacula.db < bacula_backup.sql"
2067         echo "chown bacula:bacula bacula.db"
2068         exit 1
2069 fi
2070 # test for bacula database older than version 9 and sqlite3
2071 if [ -f %{working_dir}/bacula.db ] && [ -f %{sqlite_bindir}/sqlite3 ];then
2072         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite3 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
2073 %endif
2074
2075 %if %{postgresql}
2076 %pre postgresql
2077 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
2078 %endif
2079
2080 %if ! %{client_only}
2081 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "10" ]; then
2082         echo "This bacula upgrade will update a bacula database from version 10 to 11."
2083         echo "You appear to be running database version $DB_VER. You must first update"
2084         echo "your database to version 10 and then install this upgrade. The alternative"
2085         echo "is to use %{script_dir}/drop_%{db_backend}_tables to delete all your your current"
2086         echo "catalog information, then do the upgrade. Information on updating a"
2087         echo "database older than version 9 can be found in the release notes."
2088         exit 1
2089 fi
2090 %endif
2091
2092 %if %{sqlite}
2093 fi
2094 %endif
2095
2096 %if ! %{client_only}
2097 # check for and copy %{sysconf_dir}/console.conf to bconsole.conf
2098 if [ -f %{sysconf_dir}/console.conf ];then
2099         cp -p %{sysconf_dir}/console.conf %{sysconf_dir}/bconsole.conf
2100 fi
2101
2102 # create the daemon users and groups
2103 # first create the groups if they don't exist
2104 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2105 if [ -z "$HAVE_BACULA" ]; then
2106         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2107         echo "The group %{daemon_group} has been added to %{group_file}."
2108         echo "See the manual chapter \"Running Bacula\" for details."
2109 fi
2110 HAVE_BACULA=`grep %{storage_daemon_group} %{group_file} 2>/dev/null`
2111 if [ -z "$HAVE_BACULA" ]; then
2112         %{groupadd} -r %{storage_daemon_group} > /dev/null 2>&1
2113         echo "The group %{storage_daemon_group} has been added to %{group_file}."
2114         echo "See the manual chapter \"Running Bacula\" for details."
2115 fi
2116 # now create the users if they do not exist
2117 # we do not use the -g option allowing the primary group to be set to system default
2118 # this will be a unique group on redhat type systems or the group users on some systems
2119 HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
2120 if [ -z "$HAVE_BACULA" ]; then
2121         %{useradd} -r -c "Bacula" -d %{working_dir} -g %{storage_daemon_group} -M -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
2122         echo "The user %{storage_daemon_user} has been added to %{user_file}."
2123         echo "See the manual chapter \"Running Bacula\" for details."
2124 fi
2125 HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
2126 if [ -z "$HAVE_BACULA" ]; then
2127         %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
2128         echo "The user %{director_daemon_user} has been added to %{user_file}."
2129         echo "See the manual chapter \"Running Bacula\" for details."
2130 fi
2131 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
2132 if [ -z "$HAVE_BACULA" ]; then
2133         %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
2134         echo "The user %{file_daemon_user} has been added to %{user_file}."
2135         echo "See the manual chapter \"Running Bacula\" for details."
2136 fi
2137 # now we add the supplementary groups, this is ok to call even if the users already exist
2138 # we only do this if the user is NOT root
2139 IS_ROOT=%{director_daemon_user}
2140 if [ "$IS_ROOT" != "root" ]; then
2141 %{usermod} -G %{daemon_group} %{director_daemon_user}
2142 fi
2143 IS_ROOT=%{storage_daemon_user}
2144 if [ "$IS_ROOT" != "root" ]; then
2145 %{usermod} -G %{daemon_group},%{storage_daemon_group} %{storage_daemon_user}
2146 fi
2147 IS_ROOT=%{file_daemon_user}
2148 if [ "$IS_ROOT" != "root" ]; then
2149 %{usermod} -G %{daemon_group} %{file_daemon_user}
2150 fi
2151 %endif
2152
2153 %if %{mysql}
2154 %post mysql
2155 %endif
2156 %if %{sqlite}
2157 %post sqlite
2158 %endif
2159 %if %{postgresql}
2160 %post postgresql
2161 %endif
2162
2163 %if ! %{client_only}
2164 # add our links
2165 if [ "$1" -ge 1 ] ; then
2166   /sbin/chkconfig --add bacula-dir
2167   /sbin/chkconfig --add bacula-fd
2168   /sbin/chkconfig --add bacula-sd
2169 fi
2170 %endif
2171
2172 %if %{mysql}
2173 # test for an existing database
2174 # note: this ASSUMES no password has been set for bacula database
2175 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
2176
2177 # grant privileges and create tables if they do not exist
2178 if [ -z "$DB_VER" ]; then
2179         echo "Hmm, it doesn't look like you have an existing database."
2180         echo "Granting privileges for MySQL user bacula..."
2181         %{script_dir}/grant_mysql_privileges
2182         echo "Creating MySQL bacula database..."
2183         %{script_dir}/create_mysql_database
2184         echo "Creating bacula tables..."
2185         %{script_dir}/make_mysql_tables
2186
2187 # check to see if we need to upgrade a 2.x or lower database
2188 elif [ "$DB_VER" -lt "11" ]; then
2189         echo "This release requires an upgrade to your bacula database."
2190         echo "Backing up your current database..."
2191         mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
2192         echo "Upgrading bacula database ..."
2193         %{script_dir}/update_mysql_tables
2194         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
2195
2196 fi
2197 %endif
2198
2199 %if %{sqlite}
2200 # test for an existing database
2201 if [ -f %{working_dir}/bacula.db ]; then
2202         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite3 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
2203         # check to see if we need to upgrade a 2.x or lower database
2204         if [ "$DB_VER" -lt "10" ] && [ "$DB_VER" -ge "10" ]; then
2205                 echo "This release requires an upgrade to your bacula database."
2206                 echo "Backing up your current database..."
2207                 echo ".dump" | %{sqlite_bindir}/sqlite3 %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
2208                 echo "Upgrading bacula database ..."
2209                 %{script_dir}/update_sqlite3_tables
2210                 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
2211         fi
2212 else
2213         # create the database and tables
2214         echo "Hmm, it doesn't look like you have an existing database."
2215         echo "Creating SQLite database..."
2216         %{script_dir}/create_sqlite3_database
2217         echo "Creating the SQLite tables..."
2218         %{script_dir}/make_sqlite3_tables
2219         chown %{director_daemon_user}:%{daemon_group} %{working_dir}/bacula.db
2220 fi
2221 %endif
2222
2223 %if %{postgresql}
2224 # test for an existing database
2225 # note: this ASSUMES no password has been set for bacula database
2226 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
2227
2228 # grant privileges and create tables if they do not exist
2229 if [ -z "$DB_VER" ]; then
2230         echo "Hmm, it doesn't look like you have an existing database."
2231         echo "Creating PostgreSQL bacula database..."
2232         %{script_dir}/create_postgresql_database
2233         echo "Creating bacula tables..."
2234         %{script_dir}/make_postgresql_tables
2235         echo "Granting privileges for PostgreSQL user bacula..."
2236         %{script_dir}/grant_postgresql_privileges
2237
2238 # check to see if we need to upgrade a 2.x or lower database
2239 elif [ "$DB_VER" -lt "11" ]; then
2240         echo "This release requires an upgrade to your bacula database."
2241         echo "Backing up your current database..."
2242         pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
2243         echo "Upgrading bacula database ..."
2244         %{script_dir}/update_postgresql_tables
2245         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
2246         
2247 fi
2248 %endif
2249
2250 %if ! %{client_only}
2251 # generate passwords if needed
2252 if [ -d %{sysconf_dir} ]; then
2253    cd %{sysconf_dir}
2254    for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
2255       pass=`openssl rand -base64 33`
2256       for file in *.conf; do
2257          need_password=`grep ${string} $file 2>/dev/null`
2258          if [ -n "$need_password" ]; then
2259             sed "s@${string}@${pass}@g" $file > $file.new
2260             cp -f $file.new $file; rm -f $file.new
2261          fi
2262       done
2263    done
2264 # put actual hostname in conf file
2265    host=`hostname`
2266    string="XXX_HOSTNAME_XXX"
2267    for file in *.conf; do
2268       need_host=`grep ${string} $file 2>/dev/null`
2269       if [ -n "$need_host" ]; then
2270          sed "s@${string}@${host}@g" $file >$file.new
2271          cp -f $file.new $file; rm -f $file.new
2272       fi
2273    done
2274 fi
2275 %endif
2276
2277
2278
2279 %if %{mysql}
2280 %preun mysql
2281 %endif
2282 %if %{sqlite}
2283 %preun sqlite
2284 %endif
2285 %if %{postgresql}
2286 %preun postgresql
2287 %endif
2288
2289 %if ! %{client_only}
2290 # delete our links
2291 if [ $1 = 0 ]; then
2292   /sbin/chkconfig --del bacula-dir
2293   /sbin/chkconfig --del bacula-fd
2294   /sbin/chkconfig --del bacula-sd
2295 fi
2296 %endif
2297
2298
2299 %if ! %{client_only} && %{mtx}
2300 %files mtx
2301 %defattr(-,root,root)
2302 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/loaderinfo
2303 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/mtx
2304 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/scsitape
2305 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/tapeinfo
2306 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/scsieject
2307 %{_mandir}/man1/loaderinfo.1.%{manpage_ext}
2308 %{_mandir}/man1/mtx.1.%{manpage_ext}
2309 %{_mandir}/man1/scsitape.1.%{manpage_ext}
2310 %{_mandir}/man1/tapeinfo.1.%{manpage_ext}
2311 %{_mandir}/man1/scsieject.1.%{manpage_ext}
2312 %endif
2313
2314
2315 %files client
2316 %defattr(-,root,root)
2317 %attr(-, root, %{daemon_group}) %dir %{script_dir}
2318 %{script_dir}/bacula-ctl-fd
2319 /etc/init.d/bacula-fd
2320
2321
2322 %doc COPYING ChangeLog LICENSE ReleaseNotes VERIFYING kernstodo 
2323 %doc ../Release_Notes-%{version}-%{release}.txt
2324
2325 /etc/logrotate.d/bacula
2326
2327 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
2328 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
2329
2330 %attr(-, root, %{daemon_group}) %dir %{working_dir}
2331
2332 %{_sbindir}/bacula-fd
2333 %{_sbindir}/btraceback
2334 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
2335 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
2336 %{_sbindir}/bconsole
2337 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
2338 %{_mandir}/man8/bacula.8.%{manpage_ext}
2339 %{_mandir}/man8/bconsole.8.%{manpage_ext}
2340 %{_mandir}/man8/btraceback.8.%{manpage_ext}
2341 %{_libdir}/libbac*
2342
2343 %pre client
2344 # create the daemon group and user
2345 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2346 if [ -z "$HAVE_BACULA" ]; then
2347         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2348         echo "The group %{daemon_group} has been added to %{group_file}."
2349         echo "See the manual chapter \"Running Bacula\" for details."
2350 fi
2351 # we do not use the -g option allowing the primary group to be set to system default
2352 # this will be a unique group on redhat type systems or the group users on some systems
2353 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
2354 if [ -z "$HAVE_BACULA" ]; then
2355         %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
2356         echo "The user %{file_daemon_user} has been added to %{user_file}."
2357         echo "See the manual chapter \"Running Bacula\" for details."
2358 fi
2359 # now we add the supplementary group, this is ok to call even if the user already exists
2360 # we only do this if the user is NOT root
2361 IS_ROOT=%{file_daemon_user}
2362 if [ "$IS_ROOT" != "root" ]; then
2363   %{usermod} -G %{daemon_group} %{file_daemon_user}
2364 fi
2365
2366 %post client
2367
2368 # generate passwords if needed
2369 if [ -d %{sysconf_dir} ]; then
2370    cd %{sysconf_dir}
2371    for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
2372       pass=`openssl rand -base64 33`
2373       for file in *.conf; do
2374          need_password=`grep $string $file 2>/dev/null`
2375          if [ -n "$need_password" ]; then
2376             sed "s@${string}@${pass}@g" $file > $file.new
2377             cp -f $file.new $file; rm -f $file.new
2378          fi
2379       done
2380    done
2381 # put actual hostname in conf file
2382    host=`hostname`
2383    string="XXX_HOSTNAME_XXX"
2384    for file in *.conf; do
2385       need_host=`grep $string $file 2>/dev/null`
2386       if [ -n "$need_host" ]; then
2387          sed "s@${string}@${host}@g" $file >$file.new
2388          cp -f $file.new $file; rm -f $file.new
2389       fi
2390    done
2391 fi
2392
2393 # add our link
2394 if [ "$1" -ge 1 ] ; then
2395   /sbin/chkconfig --off bacula-fd
2396   /sbin/chkconfig --add bacula-fd
2397   /sbin/chkconfig --on bacula-fd
2398 fi
2399
2400
2401
2402 %preun client
2403 # delete our link
2404 if [ $1 = 0 ]; then
2405   /sbin/chkconfig --del bacula-fd
2406 fi
2407
2408 %if ! %{client_only}
2409 %files updatedb
2410 %defattr(-,root,%{daemon_group})
2411 %{script_dir}/updatedb/*
2412
2413 %pre updatedb
2414 # create the daemon group
2415 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2416 if [ -z "$HAVE_BACULA" ]; then
2417         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2418         echo "The group %{daemon_group} has been added to %{group_file}."
2419         echo "See the manual chapter \"Running Bacula\" for details."
2420 fi
2421
2422 %post updatedb
2423 echo "The database update scripts were installed in %{script_dir}/updatedb"
2424 %endif
2425
2426 %if %{rescue}
2427 %files rescue
2428 %defattr(-,root,root)
2429 %attr(-, root, %{daemon_group}) %{script_dir}/rescue
2430 %endif
2431
2432 %files docs
2433 %defattr(-,root,root)
2434 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
2435
2436 %if %{gconsole}
2437 %files gconsole
2438 %defattr(-, root, %{daemon_group})
2439 %{_sbindir}/bgnome-console
2440 %attr(-, root, %{daemon_group}) %dir %{script_dir}
2441 %attr(-, root, %{daemon_group}) %{script_dir}/gconsole
2442 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bgnome-console.conf
2443 /usr/share/pixmaps/bacula.png
2444 /usr/share/applications/bacula.desktop
2445 %{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
2446 %endif
2447
2448 %if %{gconsole} && ! %{rh8}
2449 %{_sbindir}/bacula-tray-monitor
2450 %config(noreplace) %{sysconf_dir}/tray-monitor.conf
2451 /usr/share/pixmaps/bacula-tray-monitor.xpm
2452 /usr/share/applications/bacula-tray-monitor.desktop
2453 %{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
2454 %endif
2455
2456 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{su111}
2457 # add the console helper files
2458 %config(noreplace,missingok) /etc/pam.d/bgnome-console
2459 %config(noreplace,missingok) /etc/security/console.apps/bgnome-console
2460 %{_sbindir}/bgnome-console
2461 %endif
2462
2463 %if %{gconsole}
2464 %pre gconsole
2465 # create the daemon group
2466 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2467 if [ -z "$HAVE_BACULA" ]; then
2468         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2469         echo "The group %{daemon_group} has been added to %{group_file}."
2470         echo "See the manual chapter \"Running Bacula\" for details."
2471 fi
2472
2473 %post gconsole
2474 # generate passwords if needed
2475 if [ -d %{sysconf_dir} ]; then
2476    cd %{sysconf_dir}
2477    for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
2478       pass=`openssl rand -base64 33`
2479       for file in *.conf; do
2480          need_password=`grep $string $file 2>/dev/null`
2481          if [ -n "$need_password" ]; then
2482             sed "s@${string}@${pass}@g" $file > $file.new
2483             cp -f $file.new $file; rm -f $file.new
2484          fi
2485       done
2486    done
2487 # put actual hostname in conf file
2488    host=`hostname`
2489    string="XXX_HOSTNAME_XXX"
2490    for file in *.conf; do
2491       need_host=`grep $string $file 2>/dev/null`
2492       if [ -n "$need_host" ]; then
2493          sed "s@${string}@${host}@g" $file >$file.new
2494          cp -f $file.new $file; rm -f $file.new
2495       fi
2496    done
2497 fi
2498
2499
2500 %endif
2501
2502 %if %{wxconsole}
2503 %files wxconsole
2504 %defattr(-, root, %{daemon_group})
2505 %defattr(-,root,root)
2506 %{_sbindir}/bwx-console
2507 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
2508 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bwx-console.conf
2509 /usr/share/pixmaps/wxwin16x16.xpm
2510 /usr/share/applications/wxconsole.desktop
2511 %{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
2512 %endif
2513
2514 %if %{wxconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{su111}
2515 # add the console helper files
2516 %config(noreplace,missingok) /etc/pam.d/bwx-console
2517 %config(noreplace,missingok) /etc/security/console.apps/bwx-console
2518 %{_sbindir}/bwx-console
2519 %endif
2520
2521 %if %{wxconsole}
2522 %pre wxconsole
2523 # create the daemon group
2524 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2525 if [ -z "$HAVE_BACULA" ]; then
2526         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2527         echo "The group %{daemon_group} has been added to %{group_file}."
2528         echo "See the manual chapter \"Running Bacula\" for details."
2529 fi
2530
2531 %post wxconsole
2532 # generate passwords if needed
2533 if [ -d %{sysconf_dir} ]; then
2534    cd %{sysconf_dir}
2535    for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
2536       pass=`openssl rand -base64 33`
2537       for file in *.conf; do
2538          need_password=`grep $string $file 2>/dev/null`
2539          if [ -n "$need_password" ]; then
2540             sed "s@${string}@${pass}@g" $file > $file.new
2541             cp -f $file.new $file; rm -f $file.new
2542          fi
2543       done
2544    done
2545 # put actual hostname in conf file
2546    host=`hostname`
2547    string="XXX_HOSTNAME_XXX"
2548    for file in *.conf; do
2549       need_host=`grep $string $file 2>/dev/null`
2550       if [ -n "$need_host" ]; then
2551          sed "s@${string}@${host}@g" $file >$file.new
2552          cp -f $file.new $file; rm -f $file.new
2553       fi
2554    done
2555 fi
2556
2557
2558 %endif
2559
2560 %if %{bat}
2561 %files bat
2562 %defattr(-,root,%{daemon_group})
2563 %{_sbindir}/bat
2564 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
2565 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
2566 /usr/share/pixmaps/bat_icon.png
2567 /usr/share/applications/bat.desktop
2568 %{_mandir}/man1/bat.1.%{manpage_ext}
2569 %endif
2570
2571 %if %{bat} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{su111}
2572 # add the console helper files
2573 %config(noreplace,missingok) /etc/pam.d/bat
2574 %config(noreplace,missingok) /etc/security/console.apps/bat
2575 %endif
2576
2577 %if %{bat}
2578 %pre bat
2579 # create the daemon group
2580 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2581 if [ -z "$HAVE_BACULA" ]; then
2582         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2583         echo "The group %{daemon_group} has been added to %{group_file}."
2584         echo "See the manual chapter \"Running Bacula\" for details."
2585 fi
2586
2587 %post bat
2588 # generate passwords if needed
2589 if [ -d %{sysconf_dir} ]; then
2590    cd %{sysconf_dir}
2591    for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
2592       pass=`openssl rand -base64 33`
2593       for file in *.conf; do
2594          need_password=`grep $string $file 2>/dev/null`
2595          if [ -n "$need_password" ]; then
2596             sed "s@${string}@${pass}@g" $file > $file.new
2597             cp -f $file.new $file; rm -f $file.new
2598          fi
2599       done
2600    done
2601 # put actual hostname in conf file
2602    host=`hostname`
2603    string="XXX_HOSTNAME_XXX"
2604    for file in *.conf; do
2605       need_host=`grep $string $file 2>/dev/null`
2606       if [ -n "$need_host" ]; then
2607          sed "s@${string}@${host}@g" $file >$file.new
2608          cp -f $file.new $file; rm -f $file.new
2609       fi
2610    done
2611 fi
2612
2613
2614 %endif
2615
2616 %changelog
2617 * Sun Jul 19 2009 Kern Sibbald <kern@sibbald.com>
2618 - Merge in Scott's 3.0 changes
2619 * Sat Apr 25 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
2620 - add switch to pass Distribution tag
2621 * Sun Apr 5 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
2622 - 3.0.0 release
2623 - database update version 10 to 11
2624 - make now installs docs so we rm from buildroot
2625 - add shared libs in %_libdir and other misc new files
2626 * Sun Jun 14 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
2627 - some corrections to %if logic
2628 * Fri May 29 2009 Kern Sibbald <kern@sibbald.com>
2629 - Make bacula.spec.in more configurable
2630 - Split out rescue and docs
2631 * Wed Dec 31 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2632 - add su111 target
2633 * Sat Nov 08 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2634 - set paths for QT using pkgconfig
2635 * Sat Oct 11 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2636 - release 2.4.3 update depkgs to 11Sep08 remove file nmshack from mtx package
2637 * Sun Sep 07 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2638 - adjust /opt/bacula install
2639 - add build switch to supress rescue package
2640 * Sun Aug 24 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2641 - add support for install to /opt/bacula
2642 * Sun Aug 17 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2643 - remove libtermcap dependancy for FC9
2644 * Mon Aug 04 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2645 - fix bat dependencies
2646 * Sat Jun 28 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2647 - add su110 target
2648 * Sat May 24 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2649 - add fc9 target
2650 * Sun Mar 30 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2651 - FHS compatibility changes
2652 * Sat Feb 16 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2653 - remove fix for false buffer overflow detection with glibc >= 2.7
2654 * Sat Feb 09 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2655 - fix for false buffer overflow detection with glibc >= 2.7
2656 * Sun Jan 27 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2657 - 2.2.8 release
2658 - add debug package for SuSE
2659 * Sat Jan 12 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2660 - 2.2.8 beta release  
2661 - fix bug 1037
2662 - add fc8 target
2663 * Sun Dec 30 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2664 - fix typo on su103 client package requirements
2665 * Fri Dec 28 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2666 - add nobuild_mtx switch
2667 - add patch for postgresql.c for old postgresql versions
2668 * Sat Nov 17 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2669 - switch to sqlite3
2670 * Sun Nov 11 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2671 - add new files required by rescue makefile
2672 * Sat Nov 10 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2673 - add su103 build target
2674 * Sun Nov 04 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2675 - fix dist defines for rhel5 and clones
2676 - fix rhel broken 64 bit QT4 paths
2677 - rh qt4 packages don't provide qt so fix that too
2678 * Mon Oct 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2679 - correct ownership when creating sqlite db file in post script
2680 * Sun Sep 16 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2681 - fix disable-batch-insert
2682 * Fri Sep 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2683 - 2.2.4 release
2684 - turn off gconsole build for fc3, tray monitor fails to build
2685 - add new files for mtx package (09Sep07 depkgs update)
2686 * Sat Sep 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2687 - add --disable-batch-insert for older platforms
2688 - add build targets for rhel5 and clones
2689 * Mon Sep 03 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2690 - 2.2.1 release
2691 - turn off gconsole build for su10 & fc4, tray monitor fails to build
2692 * Sat Jul 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2693 - 2.1.26 add make of qwt in depkgs for bat
2694 * Sat Jun 02 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2695 - upgrade Qt requirement for bat to 4.2
2696 * Sun May 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2697 - add fc7 build target
2698 * Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2699 - 2.1.8
2700 - gnome-console now bgnome-console
2701 - wxconsole now bwx-console
2702 - add build option for bat
2703 * Sat Apr 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2704 - merge Otto Mueller's patch but keep script dir set to /etc/bacula
2705 - add build tag for Scientific Linux per Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk>
2706 * Tue Mar 27 2007 Otto Mueller <otto.mueller@bundestag.de>
2707 - adjust directory locations for FHS-compatibility
2708   sysconf_dir (/etc/bacula), script_dir (/usr/lib/bacula),
2709   working_dir (/var/lib/bacula) and pid_dir (/var/run)
2710 * Mon Feb 26 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2711 - add SuSE 10.2 target
2712 * Sat Jan 20 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2713 - correct bug 752
2714 - set query.sql as config file
2715 - correct bug 754
2716 * Sun Jan 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2717 - 2.0.1 release
2718 - change determination of gcc version per patch from Marc Hennes
2719 - move BuildRequire for atk-devel to gnome only builds
2720 - add fc6 build tag
2721 * Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2722 - 2.0.0 release
2723 * Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2724 - 1.39.26 remove create_sqlite_database.in.patch
2725 * Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2726 - change ownership of working_dir on server packages to bacula.bacula so that
2727 - bacula-sd can create bootstrap files
2728 * Sat Sep 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2729 - 1.39.22 remove separate cd and make of manpages the main Makefile does it now
2730 * Sun Aug 06 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2731 - fix manpages file extension for mdk
2732 * Sat Aug 05 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2733 - bug 648 re-enable and update sqlite patches
2734 - 1.39.18 changes
2735 - updatedb 9 to 10
2736 - install man pages
2737 - lock out gconsole build for gtk+ < 2.4
2738 * Mon Jul 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2739 - move pango-devel BuildRequires into gconsole only build
2740 * Sat Jul 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2741 - add provides and conflicts for standard suse packages
2742 - add third party packager tag support
2743 - add build_client_only tag
2744 - remove bsmtp from client package
2745 - add bacula-ctl-fd to client package
2746 * Thu Jul 13 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2747 - fix directory creation when wxconsole and not gconsole
2748 * Tue Jul 04 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2749 - add check to buildrequires to make sure libstdc++ version matches gcc
2750 * Mon Jul 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2751 - add python build support
2752 - fix LDFLAGS declarations
2753 * Sun Jul 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2754 - add requires for standard compiler toolchain
2755 - move version and release tags up
2756 - move patches up
2757 - add docs_version tag
2758 * Sat Jul 01 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2759 - update rescuever to 1.8.6
2760 * Sun Jun 25 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2761 - update depkgs to 25Jun06
2762 - add mysql5 build tag
2763 * Mon Jun 12 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2764 - 1.38.10 bump rescue version
2765 * Sun Jun 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2766 - fix usermod statements
2767 - add fc5 target
2768 * Thu Apr 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2769 - add -g param back to useradd statements Bug 605
2770 * Mon Apr 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2771 - redundant code cleanup
2772 * Sun Apr 16 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2773 - add wxconsole package
2774 * Fri Apr 14 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2775 - 1.38.8 release
2776 - dependency update for Mandriva
2777 * Sun Apr 08 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2778 - 1.38.7 release
2779 - remove -n option from useradd scripts
2780 * Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2781 - 1.38.6 release
2782 - fix problem specifying more than one primary group for user bacula
2783 - add build switch to not build gconsole regardless of platform
2784 * Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2785 - add centos3 build tag
2786 - fix link error of static-fd on Mandrake with --disable-nls
2787 * Fri Jan 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2788 - add fc4 dependencies
2789 * Mon Jan 23 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2790 - add SuSE 10.0 build
2791 - remove specific permission in attrib macros
2792 * Sat Jan 21 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2793 - 1.38.5 release
2794 - fix usermode required on suse, suse doesn't have usermode (xsu instead)
2795 - refix compat for _dist on SLES9 which seems to have been removed
2796 - added note regarding Aleksandar's use of specific permissions in attrib macros
2797 - need to review and add specific fc4 build currently using fc3 Requires
2798 * Wed Dec 14 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2799 - 1.38.2 release
2800 - Reorganize files and pre/post sections to remove repetitions
2801 - Always build separate mtx package
2802 - Fix file ownerships for /etc/bacula and Bacula's working dir
2803 * Wed Nov 23 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2804 - Disable GNOME on RH7
2805 * Fri Nov 18 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2806 - Red Hat and look alikes have mtx RPM, do not build/package our version
2807 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2808 - minor edit to _dist for SLES9 compatibility
2809 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2810 - 1.38.0 release
2811 - kern changed location of pdf files and html manual in docs package
2812 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2813 - 1.38.0 release
2814 - add docs (from prebuilt tarball) and rescue packages back in
2815 - remove dvd-freespace and dvd-writepart files, add dvd-handler
2816 - remove 3 of 4 sqlite script patches as not needed
2817 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2818 - changes for 1.38
2819 - remove docs and rescue sections (remove static fd)
2820 - add dvd-freespace and dvd-writepart files
2821 - update depkgs to 22Jun05
2822 - change database update to 8 to 9
2823 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2824 - minor cleanups before 1.38 changes
2825 - add popt and popt-devel build dependencies
2826 - add tetex and tetex-dvips dependencies for doc build
2827 - replace deprecated Copyright tag with License
2828 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2829 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
2830 - conflict with sqlite packages. remove readline dependency.
2831 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2832 - release 1.36.3 update docs
2833 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2834 - add centos4 build tag
2835 - add x86_64 build tag
2836 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2837 - add rhel4 build tag
2838 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
2839 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2840 - add rhel3 build tag
2841 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2842 - fix tray-monitor.conf for noreplace
2843 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2844 - fix distribution check for Fedora and Whitebox
2845 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2846 - add logwatch script
2847 - add dvd scripts
2848 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2849 - add build for Fedora Core 3 (linc now included in ORDit2)
2850 - add mysql4 define for Mandrake 10.1
2851 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2852 - fix {group_file} variable in post scripts
2853 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
2854 - add distribution checking and custom Distribution tag
2855 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2856 - ASSIGNMENT OF COPYRIGHT
2857 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and 
2858 - assigns unto Kern Sibbald, his successors, assigns and personal representatives, 
2859 - all right, title and interest in and to the copyright in this software RPM
2860 - spec file. D. Scott Barninger warrants good title to said copyright, that it is 
2861 - free of all liens, encumbrances or any known claims against said copyright.
2862 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2863 - bug 183 fixes
2864 - thanks to Daniel Widyono
2865 - update description for rescue package to describe cdrom creation
2866 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2867 - update depkgs to 29Oct04
2868 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2869 - add cdrom rescue to bacula-rescue package
2870 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2871 - misc fixes from 1.36.0 suse feedback
2872 - fix situation where sqlite database exists but sqlite has been removed.
2873 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2874 - remove tray-monitor from RH8 build
2875 - fix permissions on tray-monitor files
2876 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2877 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
2878 - change database update to 7 to 8 upgrade,
2879 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
2880 - build in 30Jul04, add freetype dependancy to gnome package.
2881 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2882 - add documentation to console for groupadd
2883 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2884 - add support for running daemons as root.bacula
2885 - correct for change in location of floppy rescue files in 1.35.2
2886 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
2887 - updated depgkgs to 30Jul04
2888 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2889 - really, really fix symlink creation for gconsole
2890 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2891 - fix symlink creation in gconsole post install
2892 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2893 - fixed error in gconsole post script
2894 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2895 - add check for gconsole symlink before trying to create it
2896 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2897 - fix some minor permissions issues on doc files that CVS won't let us fix
2898 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2899 - add pkgconfig to BuildRequires
2900 - clean up gnome1/2 menu entries for appropriate packages
2901 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2902 - tightened up doc distribution
2903 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2904 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
2905 - rpm's horrible bug that prevents nested conditional macros prevents me
2906 - from implementing these 2 separate approaches within the conditionals which
2907 - create the separate server packages.
2908 - the solution adopted is to remove the gnome-console files from the server packages
2909 - so bacula-gconsole is now an add on for both client and server packages.
2910 - this also now allows the server packages to be install on machines without
2911 - an X-server and we can still maintain a single spec file.
2912 - added tests to make sure we have defined platform and database macros.
2913 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2914 - corrected mysql prerequisites for suse
2915 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2916 - replaced all cp commands with cp -p
2917 - removed addition of a+x permissions on gnome-console
2918 - corrected permissions on init scripts
2919 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2920 - corrected creation of sqlite_bindir in install from !mysql to sqlite
2921 -
2922 - various cleanup patches from Michael K. Johnson:
2923 - corrected post install routines for nicer chkconfig
2924 - removed chmod changes in post routines and moved to install section
2925 - removed interactive nature of post routine for rescue package
2926 - added description of building rescue disks to the description of rescue package
2927 - added clean of build root to beginning of install
2928 - removed specifying attr in all file lists
2929 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2930 - added bconsole to client package
2931 - added gconsole package as add-on to client
2932 - removed spurious dependancies on updatedb package (!cut/paste)
2933 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2934 - added updatedb package
2935 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2936 - added postgresql package
2937 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2938 - corrected the if else logic in the dependancy sections
2939 - changes for 1.34 release
2940 - /etc/bacula/console is now /etc/bacula/bconsole
2941 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
2942 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
2943 - /usr/sbin/smtp is now /usr/sbin/bsmtp
2944 - added new /etc/bacula/drop_mysql_database
2945 - added new /etc/bacula/drop_sqlite_database
2946 - added new /etc/bacula/grant_sqlite_privileges
2947 - added new generic bacula database scripts in /etc/bacula
2948 - added pre-install sections to check for database versions older than 6
2949 - added check for /etc/bacula/console.conf and copy to bconsole.conf
2950 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2951 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
2952 - added testing for existing databases before executing any of the database creation scripts
2953 - added defines working_dir and sqlite_bindir in place of hard coded paths
2954 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2955 - added build configuration for SuSE.
2956 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
2957 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2958 - added patch for create_sqlite_database to fix the installed bindir
2959 - added execute of create_sqlite_database to post of sqlite package
2960 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2961 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
2962 - added bacula-fd as Requires for rescue package
2963 - added build tag for Fedora Core 1
2964 - cleaned up dependancies for all builds
2965 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2966 - removed rh_version from package names
2967 - added platform build configuration section to beginning of file
2968 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2969 - removed make_static_bacula script from rescue package install
2970 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2971 - Added define at top of file for depkgs version
2972 - Added rescue sub-package
2973 - Moved requires statements into proper sub-package locations
2974 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2975 - Corrected Requires for Gnome 1.4/2.0 builds
2976 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2977 - Added separate source declaration for depkgs
2978 - added patch for make_catalog_backup script
2979 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2980 - Misc changes to mysql/sqlite build and rh7/8 menu differences
2981 - Added rh_version to sub-package names
2982 - Added installed but missing file /etc/bacula/gconsole
2983 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
2984 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
2985 - Update spec for version 1.31 and combine client
2986 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2987 - Initial spec file