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