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