]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/suse/bacula.spec.in
9764ddc218ef6d8b0966ef8400ed3fbe28585eaf
[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 11Jul07
10 %define _rescuever @VERSION@
11 %define docs_version @VERSION@
12
13 # any patches for this release
14 # be sure to check the setup section for patch macros
15
16
17 #--------------------------------------------------------------------------
18 # it should not be necessary to change anything below here for a release
19 # except for patch macros in the setup section
20 #--------------------------------------------------------------------------
21
22 # third party packagers
23 %define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
24 %{?contrib_packager:%define _packager %{contrib_packager}}
25
26 Summary: Bacula - The Network Backup Solution
27 Name: bacula
28 Version: %{_version}
29 Release: %{_release}
30 Group: System Environment/Daemons
31 License: GPL v2
32 Source0: http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
33 Source1: http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
34 Source2: Release_Notes-%{version}-%{release}.tar.gz
35 Source3: http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{docs_version}.tar.gz
36 Source4: http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
37 BuildRoot: %{_tmppath}/%{name}-root
38 URL: http://www.bacula.org/
39 Vendor: The Bacula Team
40 Packager: %{_packager}
41
42 # define the basic package description
43 %define blurb Bacula - It comes by night and sucks the vital essence from your computers.
44 %define blurb2 Bacula is a set of computer programs that permit you (or the system
45 %define blurb3 administrator) to manage backup, recovery, and verification of computer
46 %define blurb4 data across a network of computers of different kinds. In technical terms,
47 %define blurb5 it is a network client/server based backup program. Bacula is relatively
48 %define blurb6 easy to use and efficient, while offering many advanced storage management
49 %define blurb7 features that make it easy to find and recover lost or damaged files.
50 %define blurb8 Bacula source code has been released under the GPL version 2 license.
51
52 # directory locations
53 %define sqlite_bindir /usr/lib/bacula/sqlite
54 %define _docsrc ../%{name}-docs-%{docs_version}
55 %define _rescuesrc ../%{name}-rescue-%{_rescuever}
56 %define depkgs ../depkgs
57 %define _mandir /usr/share/man
58
59 # directory locations for FHS-compatibility
60 %define sysconf_dir /etc/bacula
61 %define script_dir /etc/bacula
62 %define working_dir /var/lib/bacula
63 %define pid_dir /var/run
64
65 # NOTE these defines are used in some rather complex useradd and groupadd
66 # commands. If you change them examine the post scripts for consequences.
67 %define director_daemon_user bacula
68 %define storage_daemon_user bacula
69 %define file_daemon_user root
70 %define daemon_group bacula
71 # group that has write access to tape devices, usually disk on Linux
72 %define storage_daemon_group disk
73 %define user_file /etc/passwd
74 %define group_file /etc/group
75
76 # program locations
77 %define useradd /usr/sbin/useradd
78 %define groupadd /usr/sbin/groupadd
79 %define usermod /usr/sbin/usermod
80
81 # platform defines - set one below or define the build_xxx on the command line
82 # RedHat builds
83 %define rh7 0
84 %{?build_rh7:%define rh7 1}
85 %define rh8 0
86 %{?build_rh8:%define rh8 1}
87 %define rh9 0
88 %{?build_rh9:%define rh9 1}
89 # Fedora Core build
90 %define fc1 0
91 %{?build_fc1:%define fc1 1}
92 %define fc3 0
93 %{?build_fc3:%define fc3 1}
94 %define fc4 0
95 %{?build_fc4:%define fc4 1}
96 %define fc5 0
97 %{?build_fc5:%define fc5 1}
98 %define fc6 0
99 %{?build_fc6:%define fc6 1}
100 %define fc7 0
101 %{?build_fc7:%define fc7 1}
102 # Whitebox Enterprise build
103 %define wb3 0
104 %{?build_wb3:%define wb3 1}
105 # RedHat Enterprise builds
106 %define rhel3 0
107 %{?build_rhel3:%define rhel3 1}
108 %{?build_rhel3:%define wb3 1}
109 %define rhel4 0
110 %{?build_rhel4:%define rhel4 1}
111 %{?build_rhel4:%define fc3 1}
112 %define rhel5 0
113 %{?build_rhel5:%define rhel5 1}
114 %{?build_rhel5:%define fc6 1}
115 # CentOS build
116 %define centos3 0
117 %{?build_centos3:%define centos3 1}
118 %{?build_centos3:%define wb3 1}
119 %define centos4 0
120 %{?build_centos4:%define centos4 1}
121 %{?build_centos4:%define fc3 1}
122 %define centos5 0
123 %{?build_centos5:%define centos5 1}
124 %{?build_centos5:%define fc6 1}
125 # SL build
126 %define sl3 0
127 %{?build_sl3:%define sl3 1}
128 %{?build_sl3:%define wb3 1}
129 %define sl4 0
130 %{?build_sl4:%define sl4 1}
131 %{?build_sl4:%define fc3 1}
132 %define sl5 0
133 %{?build_sl5:%define sl5 1}
134 %{?build_sl5:%define fc6 1}
135 # SuSE build
136 %define su9 0
137 %{?build_su9:%define su9 1}
138 %define su10 0
139 %{?build_su10:%define su10 1}
140 %define su102 0
141 %{?build_su102:%define su102 1}
142 # Mandrake builds
143 %define mdk 0
144 %{?build_mdk:%define mdk 1}
145 %define mdv 0
146 %{?build_mdv:%define mdv 1}
147 %{?build_mdv:%define mdk 1}
148
149 # client only build
150 %define client_only 0
151 %{?build_client_only:%define client_only 1}
152
153 # test for a platform definition
154 %if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk}
155 %{error: You must specify a platform. Please examine the spec file.}
156 exit 1
157 %endif
158
159 # database defines
160 # set for database support desired or define the build_xxx on the command line
161 %define mysql 0
162 %{?build_mysql:%define mysql 1}
163 # if using mysql 4.x define this and mysql above
164 # currently: Mandrake 10.1, SuSE 9.x & 10.0, RHEL4 and Fedora Core 4
165 %define mysql4 0
166 %{?build_mysql4:%define mysql4 1}
167 %{?build_mysql4:%define mysql 1}
168 # if using mysql 5.x define this and mysql above
169 # currently: SuSE 10.1 and Fedora Core 5
170 %define mysql5 0
171 %{?build_mysql5:%define mysql5 1}
172 %{?build_mysql5:%define mysql 1}
173 %define sqlite 0
174 %{?build_sqlite:%define sqlite 1}
175 %define postgresql 0
176 %{?build_postgresql:%define postgresql 1}
177
178 # test for a database definition
179 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql} && ! %{client_only}
180 %{error: You must specify database support. Please examine the spec file.}
181 exit 1
182 %endif
183
184 %if %{mysql}
185 %define db_backend mysql
186 %endif
187 %if %{sqlite}
188 %define db_backend sqlite
189 %endif
190 %if %{postgresql}
191 %define db_backend postgresql
192 %endif
193
194 # 64 bit support
195 %define x86_64 0
196 %{?build_x86_64:%define x86_64 1}
197
198 # check what distribution we are
199 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4} || %rhel5}
200 %define _dist %(grep Red /etc/redhat-release)
201 %endif
202 %if %{fc1} || %{fc4} || %{fc5} || %{fc6} || %{fc7}
203 %define _dist %(grep Fedora /etc/redhat-release)
204 %endif
205 %if %{centos5} || %{centos4} || %{centos3}
206 %define _dist %(grep CentOS /etc/redhat-release)
207 %endif
208 %if %{sl5} ||%{sl4} || %{sl3}
209 %define _dist %(grep 'Scientific Linux' /etc/redhat-release)
210 %endif
211 %if %{fc3} && ! %{rhel4} && ! %{centos4} && ! %{sl4}
212 %define _dist %(grep Fedora /etc/redhat-release)
213 %endif
214 %if %{wb3} && ! %{rhel3} && ! %{centos3} && ! %{sl3}
215 %define _dist %(grep White /etc/whitebox-release)
216 %endif
217 %if %{su9} || %{su10} || %{su102}
218 %define _dist %(grep -i SuSE /etc/SuSE-release)
219 %endif
220 %if %{mdk}
221 %define _dist %(grep Mand /etc/mandrake-release)
222 %endif
223 Distribution: %{_dist}
224
225 # Should we build gconsole, possible only if gtk= >= 2.4 available.
226 # leaving all the BuildRequires and Requires in place below for now.
227 # su10 and fc4 now nobuild, tray monitor fails to build as of 2.2.1 release
228
229 %define gconsole 1
230 %if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{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 %if %{rh7} || %{rh8} || %{rh9} || %{fc1} || %{fc3} || %{wb3} 
1158         --disable-batch-insert \
1159 %endif
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         echo "Creating the SQLite tables..."
1700         %{script_dir}/make_sqlite_tables
1701 fi
1702 %endif
1703
1704 %if %{postgresql}
1705 # test for an existing database
1706 # note: this ASSUMES no password has been set for bacula database
1707 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1708
1709 # grant privileges and create tables if they do not exist
1710 if [ -z "$DB_VER" ]; then
1711         echo "Hmm, doesn't look like you have an existing database."
1712         echo "Creating PostgreSQL bacula database..."
1713         %{script_dir}/create_postgresql_database
1714         echo "Creating bacula tables..."
1715         %{script_dir}/make_postgresql_tables
1716         echo "Granting privileges for PostgreSQL user bacula..."
1717         %{script_dir}/grant_postgresql_privileges
1718
1719 # check to see if we need to upgrade a 1.38 or lower database
1720 elif [ "$DB_VER" -lt "10" ]; then
1721         echo "This release requires an upgrade to your bacula database."
1722         echo "Backing up your current database..."
1723         pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1724         echo "Upgrading bacula database ..."
1725         %{script_dir}/update_postgresql_tables
1726         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1727         
1728 fi
1729 %endif
1730
1731 %if ! %{client_only}
1732 # generate passwords if needed
1733 if [ -d %{sysconf_dir} ]; then
1734         cd %{sysconf_dir}
1735         for file in *.conf; do
1736                 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
1737                         need_password=`grep $string $file 2>/dev/null`
1738                         if [ -n "$need_password" ]; then
1739                                 pass=`openssl rand -base64 33`
1740                                 sed "s-$string-$pass-g" $file > $file.new
1741                                 cp -f $file.new $file; rm -f $file.new
1742                         fi
1743                 done
1744         done
1745 fi
1746 %endif
1747
1748 %if %{mysql}
1749 %preun mysql
1750 %endif
1751 %if %{sqlite}
1752 %preun sqlite
1753 %endif
1754 %if %{postgresql}
1755 %preun postgresql
1756 %endif
1757
1758 %if ! %{client_only}
1759 # delete our links
1760 if [ $1 = 0 ]; then
1761 /sbin/chkconfig --del bacula-dir
1762 /sbin/chkconfig --del bacula-fd
1763 /sbin/chkconfig --del bacula-sd
1764 fi
1765 %endif
1766
1767
1768 %if ! %{client_only}
1769 %files mtx
1770 %defattr(-,root,root)
1771 %attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
1772 %attr(-, root, %{storage_daemon_group}) /usr/sbin/mtx
1773 %attr(-, root, %{storage_daemon_group}) /usr/sbin/scsitape
1774 %attr(-, root, %{storage_daemon_group}) /usr/sbin/tapeinfo
1775 %{_mandir}/man1/loaderinfo.1.%{manpage_ext}
1776 %{_mandir}/man1/mtx.1.%{manpage_ext}
1777 %{_mandir}/man1/scsitape.1.%{manpage_ext}
1778 %{_mandir}/man1/tapeinfo.1.%{manpage_ext}
1779 %endif
1780
1781 %files client
1782 %defattr(-,root,root)
1783 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1784 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1785 %{script_dir}/bacula-ctl-fd
1786 /etc/init.d/bacula-fd
1787 %attr(-, root, %{daemon_group}) %{sysconf_dir}/rescue
1788
1789 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
1790 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1791
1792 /etc/logrotate.d/bacula
1793
1794 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1795 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1796
1797 %attr(-, root, %{daemon_group}) %dir %{working_dir}
1798
1799 /usr/sbin/bacula-fd
1800 /usr/sbin/btraceback
1801 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1802 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1803 /usr/sbin/bconsole
1804 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1805 %{_mandir}/man8/bacula.8.%{manpage_ext}
1806 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1807 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1808
1809
1810 %pre client
1811 # create the daemon group and user
1812 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1813 if [ -z "$HAVE_BACULA" ]; then
1814         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1815         echo "The group %{daemon_group} has been added to %{group_file}."
1816         echo "See the manual chapter \"Running Bacula\" for details."
1817 fi
1818 # we do not use the -g option allowing the primary group to be set to system default
1819 # this will be a unique group on redhat type systems or the group users on some systems
1820 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1821 if [ -z "$HAVE_BACULA" ]; then
1822         %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1823         echo "The user %{file_daemon_user} has been added to %{user_file}."
1824         echo "See the manual chapter \"Running Bacula\" for details."
1825 fi
1826 # now we add the supplementary group, this is ok to call even if the user already exists
1827 # we only do this if the user is NOT root
1828 IS_ROOT=%{file_daemon_user}
1829 if [ "$IS_ROOT" != "root" ]; then
1830 %{usermod} -G %{daemon_group} %{file_daemon_user}
1831 fi
1832
1833 %post client
1834 # add our link
1835 if [ "$1" -ge 1 ] ; then
1836 /sbin/chkconfig --add bacula-fd
1837 fi
1838
1839 # generate passwords if needed
1840 if [ -d %{sysconf_dir} ]; then
1841         cd %{sysconf_dir}
1842         for file in *.conf; do
1843                 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
1844                         need_password=`grep $string $file 2>/dev/null`
1845                         if [ -n "$need_password" ]; then
1846                                 pass=`openssl rand -base64 33`
1847                                 sed "s-$string-$pass-g" $file > $file.new
1848                                 cp -f $file.new $file; rm -f $file.new
1849                         fi
1850                 done
1851         done
1852 fi
1853
1854 %preun client
1855 # delete our link
1856 if [ $1 = 0 ]; then
1857 /sbin/chkconfig --del bacula-fd
1858 fi
1859
1860 %if ! %{client_only}
1861 %files updatedb
1862 %defattr(-,root,%{daemon_group})
1863 %{script_dir}/updatedb/*
1864
1865 %pre updatedb
1866 # create the daemon group
1867 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1868 if [ -z "$HAVE_BACULA" ]; then
1869         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1870         echo "The group %{daemon_group} has been added to %{group_file}."
1871         echo "See the manual chapter \"Running Bacula\" for details."
1872 fi
1873
1874 %post updatedb
1875 echo "The database update scripts were installed to %{script_dir}/updatedb"
1876 %endif
1877
1878 %if %{gconsole}
1879 %files gconsole
1880 %defattr(-,root,root)
1881 /usr/sbin/bgnome-console
1882 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1883 %attr(-, root, %{daemon_group}) %{script_dir}/gconsole
1884 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bgnome-console.conf
1885 /usr/share/pixmaps/bacula.png
1886 /usr/share/applications/bacula.desktop
1887 %{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
1888 %endif
1889
1890 %if %{gconsole} && ! %{rh8}
1891 /usr/sbin/bacula-tray-monitor
1892 %config(noreplace) %{sysconf_dir}/tray-monitor.conf
1893 /usr/share/pixmaps/bacula-tray-monitor.xpm
1894 /usr/share/applications/bacula-tray-monitor.desktop
1895 %{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
1896 %endif
1897
1898 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102}
1899 # add the console helper files
1900 %config(noreplace,missingok) /etc/pam.d/bgnome-console
1901 %config(noreplace,missingok) /etc/security/console.apps/bgnome-console
1902 /usr/bin/bgnome-console
1903 %endif
1904
1905 %if %{gconsole}
1906 %pre gconsole
1907 # create the daemon group
1908 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1909 if [ -z "$HAVE_BACULA" ]; then
1910         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1911         echo "The group %{daemon_group} has been added to %{group_file}."
1912         echo "See the manual chapter \"Running Bacula\" for details."
1913 fi
1914
1915 %post gconsole
1916 # generate passwords if needed
1917 if [ -d %{sysconf_dir} ]; then
1918         cd %{sysconf_dir}
1919         for file in *.conf; do
1920                 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
1921                         need_password=`grep $string $file 2>/dev/null`
1922                         if [ -n "$need_password" ]; then
1923                                 pass=`openssl rand -base64 33`
1924                                 sed "s-$string-$pass-g" $file > $file.new
1925                                 cp -f $file.new $file; rm -f $file.new
1926                         fi
1927                 done
1928         done
1929 fi
1930 %endif
1931
1932 %if %{wxconsole}
1933 %files wxconsole
1934 %defattr(-,root,root)
1935 /usr/sbin/bwx-console
1936 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
1937 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bwx-console.conf
1938 /usr/share/pixmaps/wxwin16x16.xpm
1939 /usr/share/applications/wxconsole.desktop
1940 %{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
1941 %endif
1942
1943 %if %{wxconsole} && ! %{su9} && ! %{su10} && ! %{su102}
1944 # add the console helper files
1945 %config(noreplace,missingok) /etc/pam.d/bwx-console
1946 %config(noreplace,missingok) /etc/security/console.apps/bwx-console
1947 /usr/bin/bwx-console
1948 %endif
1949
1950 %if %{wxconsole}
1951 %pre wxconsole
1952 # create the daemon group
1953 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1954 if [ -z "$HAVE_BACULA" ]; then
1955         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1956         echo "The group %{daemon_group} has been added to %{group_file}."
1957         echo "See the manual chapter \"Running Bacula\" for details."
1958 fi
1959
1960 %post wxconsole
1961 # generate passwords if needed
1962 if [ -d %{sysconf_dir} ]; then
1963         cd %{sysconf_dir}
1964         for file in *.conf; do
1965                 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
1966                         need_password=`grep $string $file 2>/dev/null`
1967                         if [ -n "$need_password" ]; then
1968                                 pass=`openssl rand -base64 33`
1969                                 sed "s-$string-$pass-g" $file > $file.new
1970                                 cp -f $file.new $file; rm -f $file.new
1971                         fi
1972                 done
1973         done
1974 fi
1975 %endif
1976
1977 %if %{bat}
1978 %files bat
1979 %defattr(-,root,root)
1980 /usr/sbin/bat
1981 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
1982 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
1983 /usr/share/pixmaps/bat_icon.png
1984 /usr/share/applications/bat.desktop
1985 %{_mandir}/man1/bat.1.%{manpage_ext}
1986 %endif
1987
1988 %if %{bat} && ! %{su9} && ! %{su10} && ! %{su102}
1989 # add the console helper files
1990 %config(noreplace,missingok) /etc/pam.d/bat
1991 %config(noreplace,missingok) /etc/security/console.apps/bat
1992 /usr/bin/bat
1993 %endif
1994
1995 %if %{bat}
1996 %pre bat
1997 # create the daemon group
1998 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1999 if [ -z "$HAVE_BACULA" ]; then
2000         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2001         echo "The group %{daemon_group} has been added to %{group_file}."
2002         echo "See the manual chapter \"Running Bacula\" for details."
2003 fi
2004
2005 %post bat
2006 # generate passwords if needed
2007 if [ -d %{sysconf_dir} ]; then
2008         cd %{sysconf_dir}
2009         for file in *.conf; do
2010                 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
2011                         need_password=`grep $string $file 2>/dev/null`
2012                         if [ -n "$need_password" ]; then
2013                                 pass=`openssl rand -base64 33`
2014                                 sed "s-$string-$pass-g" $file > $file.new
2015                                 cp -f $file.new $file; rm -f $file.new
2016                         fi
2017                 done
2018         done
2019 fi
2020 %endif
2021
2022 %changelog
2023 * Sat Sep 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2024 - add --disable-batch-insert for older platforms
2025 - add build targets for rhel5 and clones
2026 * Mon Sep 03 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2027 - 2.2.1 release
2028 - turn off gconsole build for su10 & fc4, tray monitor fails to build
2029 * Sat Jul 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2030 - 2.1.26 add make of qwt in depkgs for bat
2031 * Sat Jun 02 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2032 - upgrade Qt requirement for bat to 4.2
2033 * Sun May 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2034 - add fc7 build target
2035 * Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2036 - 2.1.8
2037 - gnome-console now bgnome-console
2038 - wxconsole now bwx-console
2039 - add build option for bat
2040 * Sat Apr 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2041 - merge Otto Mueller's patch but keep script dir set to /etc/bacula
2042 - add build tag for Scientific Linux per Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk>
2043 * Tue Mar 27 2007 Otto Mueller <otto.mueller@bundestag.de>
2044 - adjust directory locations for FHS-compatibility
2045   sysconf_dir (/etc/bacula), script_dir (/usr/lib/bacula),
2046   working_dir (/var/lib/bacula) and pid_dir (/var/run)
2047 * Mon Feb 26 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2048 - add SuSE 10.2 target
2049 * Sat Jan 20 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2050 - correct bug 752
2051 - set query.sql as config file
2052 - correct bug 754
2053 * Sun Jan 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2054 - 2.0.1 release
2055 - change determination of gcc version per patch from Marc Hennes
2056 - move BuildRequire for atk-devel to gnome only builds
2057 - add fc6 build tag
2058 * Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2059 - 2.0.0 release
2060 * Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2061 - 1.39.26 remove create_sqlite_database.in.patch
2062 * Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2063 - change ownership of working_dir on server packages to bacula.bacula so that
2064 - bacula-sd can create bootstrap files
2065 * Sat Sep 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2066 - 1.39.22 remove separate cd and make of manpages the main Makefile does it now
2067 * Sun Aug 06 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2068 - fix manpages file extension for mdk
2069 * Sat Aug 05 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2070 - bug 648 re-enable and update sqlite patches
2071 - 1.39.18 changes
2072 - updatedb 9 to 10
2073 - install man pages
2074 - lock out gconsole build for gtk+ < 2.4
2075 * Mon Jul 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2076 - move pango-devel BuildRequires into gconsole only build
2077 * Sat Jul 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2078 - add provides and conflicts for standard suse packages
2079 - add third party packager tag support
2080 - add build_client_only tag
2081 - remove bsmtp from client package
2082 - add bacula-ctl-fd to client package
2083 * Thu Jul 13 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2084 - fix directory creation when wxconsole and not gconsole
2085 * Tue Jul 04 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2086 - add check to buildrequires to make sure libstdc++ version matches gcc
2087 * Mon Jul 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2088 - add python build support
2089 - fix LDFLAGS declarations
2090 * Sun Jul 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2091 - add requires for standard compiler toolchain
2092 - move version and release tags up
2093 - move patches up
2094 - add docs_version tag
2095 * Sat Jul 01 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2096 - update rescuever to 1.8.6
2097 * Sun Jun 25 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2098 - update depkgs to 25Jun06
2099 - add mysql5 build tag
2100 * Mon Jun 12 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2101 - 1.38.10 bump rescue version
2102 * Sun Jun 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2103 - fix usermod statements
2104 - add fc5 target
2105 * Thu Apr 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2106 - add -g param back to useradd statements Bug 605
2107 * Mon Apr 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2108 - redundant code cleanup
2109 * Sun Apr 16 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2110 - add wxconsole package
2111 * Fri Apr 14 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2112 - 1.38.8 release
2113 - dependency update for Mandriva
2114 * Sun Apr 08 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2115 - 1.38.7 release
2116 - remove -n option from useradd scripts
2117 * Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2118 - 1.38.6 release
2119 - fix problem specifying more than one primary group for user bacula
2120 - add build switch to not build gconsole regardless of platform
2121 * Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2122 - add centos3 build tag
2123 - fix link error of static-fd on Mandrake with --disable-nls
2124 * Fri Jan 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2125 - add fc4 dependencies
2126 * Mon Jan 23 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2127 - add SuSE 10.0 build
2128 - remove specific permission in attrib macros
2129 * Sat Jan 21 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2130 - 1.38.5 release
2131 - fix usermode required on suse, suse doesn't have usermode (xsu instead)
2132 - refix compat for _dist on SLES9 which seems to have been removed
2133 - added note regarding Aleksandar's use of specific permissions in attrib macros
2134 - need to review and add specific fc4 build currently using fc3 Requires
2135 * Wed Dec 14 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2136 - 1.38.2 release
2137 - Reorganize files and pre/post sections to remove repetitions
2138 - Always build separate mtx package
2139 - Fix file ownerships for /etc/bacula and Bacula's working dir
2140 * Wed Nov 23 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2141 - Disable GNOME on RH7
2142 * Fri Nov 18 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2143 - Red Hat and look alikes have mtx RPM, do not build/package our version
2144 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2145 - minor edit to _dist for SLES9 compatibility
2146 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2147 - 1.38.0 release
2148 - kern changed location of pdf files and html manual in docs package
2149 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2150 - 1.38.0 release
2151 - add docs (from prebuilt tarball) and rescue packages back in
2152 - remove dvd-freespace and dvd-writepart files, add dvd-handler
2153 - remove 3 of 4 sqlite script patches as not needed
2154 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2155 - changes for 1.38
2156 - remove docs and rescue sections (remove static fd)
2157 - add dvd-freespace and dvd-writepart files
2158 - update depkgs to 22Jun05
2159 - change database update to 8 to 9
2160 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2161 - minor cleanups before 1.38 changes
2162 - add popt and popt-devel build dependencies
2163 - add tetex and tetex-dvips dependencies for doc build
2164 - replace deprecated Copyright tag with License
2165 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2166 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
2167 - conflict with sqlite packages. remove readline dependency.
2168 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2169 - release 1.36.3 update docs
2170 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2171 - add centos4 build tag
2172 - add x86_64 build tag
2173 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2174 - add rhel4 build tag
2175 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
2176 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2177 - add rhel3 build tag
2178 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2179 - fix tray-monitor.conf for noreplace
2180 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2181 - fix distribution check for Fedora and Whitebox
2182 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2183 - add logwatch script
2184 - add dvd scripts
2185 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2186 - add build for Fedora Core 3 (linc now included in ORDit2)
2187 - add mysql4 define for Mandrake 10.1
2188 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2189 - fix {group_file} variable in post scripts
2190 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
2191 - add distribution checking and custom Distribution tag
2192 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2193 - ASSIGNMENT OF COPYRIGHT
2194 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and 
2195 - assigns unto Kern Sibbald, his successors, assigns and personal representatives, 
2196 - all right, title and interest in and to the copyright in this software RPM
2197 - spec file. D. Scott Barninger warrants good title to said copyright, that it is 
2198 - free of all liens, encumbrances or any known claims against said copyright.
2199 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2200 - bug 183 fixes
2201 - thanks to Daniel Widyono
2202 - update description for rescue package to describe cdrom creation
2203 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2204 - update depkgs to 29Oct04
2205 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2206 - add cdrom rescue to bacula-rescue package
2207 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2208 - misc fixes from 1.36.0 suse feedback
2209 - fix situation where sqlite database exists but sqlite has been removed.
2210 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2211 - remove tray-monitor from RH8 build
2212 - fix permissions on tray-monitor files
2213 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2214 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
2215 - change database update to 7 to 8 upgrade,
2216 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
2217 - build in 30Jul04, add freetype dependancy to gnome package.
2218 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2219 - add documentation to console for groupadd
2220 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2221 - add support for running daemons as root.bacula
2222 - correct for change in location of floppy rescue files in 1.35.2
2223 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
2224 - updated depgkgs to 30Jul04
2225 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2226 - really, really fix symlink creation for gconsole
2227 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2228 - fix symlink creation in gconsole post install
2229 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2230 - fixed error in gconsole post script
2231 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2232 - add check for gconsole symlink before trying to create it
2233 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2234 - fix some minor permissions issues on doc files that CVS won't let us fix
2235 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2236 - add pkgconfig to BuildRequires
2237 - clean up gnome1/2 menu entries for appropriate packages
2238 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2239 - tightened up doc distribution
2240 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2241 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
2242 - rpm's horrible bug that prevents nested conditional macros prevents me
2243 - from implementing these 2 separate approaches within the conditionals which
2244 - create the separate server packages.
2245 - the solution adopted is to remove the gnome-console files from the server packages
2246 - so bacula-gconsole is now an add on for both client and server packages.
2247 - this also now allows the server packages to be install on machines without
2248 - an X-server and we can still maintain a single spec file.
2249 - added tests to make sure we have defined platform and database macros.
2250 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2251 - corrected mysql prerequisites for suse
2252 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2253 - replaced all cp commands with cp -p
2254 - removed addition of a+x permissions on gnome-console
2255 - corrected permissions on init scripts
2256 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2257 - corrected creation of sqlite_bindir in install from !mysql to sqlite
2258 -
2259 - various cleanup patches from Michael K. Johnson:
2260 - corrected post install routines for nicer chkconfig
2261 - removed chmod changes in post routines and moved to install section
2262 - removed interactive nature of post routine for rescue package
2263 - added description of building rescue disks to the description of rescue package
2264 - added clean of build root to beginning of install
2265 - removed specifying attr in all file lists
2266 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2267 - added bconsole to client package
2268 - added gconsole package as add-on to client
2269 - removed spurious dependancies on updatedb package (!cut/paste)
2270 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2271 - added updatedb package
2272 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2273 - added postgresql package
2274 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2275 - corrected the if else logic in the dependancy sections
2276 - changes for 1.34 release
2277 - /etc/bacula/console is now /etc/bacula/bconsole
2278 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
2279 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
2280 - /usr/sbin/smtp is now /usr/sbin/bsmtp
2281 - added new /etc/bacula/drop_mysql_database
2282 - added new /etc/bacula/drop_sqlite_database
2283 - added new /etc/bacula/grant_sqlite_privileges
2284 - added new generic bacula database scripts in /etc/bacula
2285 - added pre-install sections to check for database versions older than 6
2286 - added check for /etc/bacula/console.conf and copy to bconsole.conf
2287 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2288 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
2289 - added testing for existing databases before executing any of the database creation scripts
2290 - added defines working_dir and sqlite_bindir in place of hard coded paths
2291 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2292 - added build configuration for SuSE.
2293 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
2294 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2295 - added patch for create_sqlite_database to fix the installed bindir
2296 - added execute of create_sqlite_database to post of sqlite package
2297 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2298 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
2299 - added bacula-fd as Requires for rescue package
2300 - added build tag for Fedora Core 1
2301 - cleaned up dependancies for all builds
2302 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2303 - removed rh_version from package names
2304 - added platform build configuration section to beginning of file
2305 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2306 - removed make_static_bacula script from rescue package install
2307 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2308 - Added define at top of file for depkgs version
2309 - Added rescue sub-package
2310 - Moved requires statements into proper sub-package locations
2311 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2312 - Corrected Requires for Gnome 1.4/2.0 builds
2313 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2314 - Added separate source declaration for depkgs
2315 - added patch for make_catalog_backup script
2316 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2317 - Misc changes to mysql/sqlite build and rh7/8 menu differences
2318 - Added rh_version to sub-package names
2319 - Added installed but missing file /etc/bacula/gconsole
2320 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
2321 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
2322 - Update spec for version 1.31 and combine client
2323 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2324 - Initial spec file