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