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