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