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