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