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