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