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