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