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