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