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