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