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