]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/redhat/bacula.spec.in
a6367f4e89b7356043cfdfc8b7f2dbc11d60872b
[bacula/bacula] / bacula / platforms / redhat / bacula.spec.in
1 # Bacula RPM spec file
2 # Copyright (C) 2000-2006 Kern Sibbald
3
4 # Platform Build Configuration
5
6 # basic defines for every build
7 %define depkgs ../depkgs
8 %define depkgs_version 28Mar06
9 %define sqlite_bindir /usr/lib/bacula/sqlite
10 %define working_dir /var/bacula
11 %define director_daemon_user bacula
12 %define storage_daemon_user bacula
13 %define file_daemon_user root
14 %define daemon_group bacula
15 # group that has write access to tape devices, usually disk on Linux
16 %define storage_daemon_group disk
17 %define user_file /etc/passwd
18 %define group_file /etc/group
19 %define useradd /usr/sbin/useradd
20 %define groupadd /usr/sbin/groupadd
21 %define usermod /usr/sbin/usermod
22 %define _rescuever 1.8.3
23
24 # platform defines - set one below or define the build_xxx on the command line
25 # RedHat builds
26 %define rh7 0
27 %{?build_rh7:%define rh7 1}
28 %define rh8 0
29 %{?build_rh8:%define rh8 1}
30 %define rh9 0
31 %{?build_rh9:%define rh9 1}
32 # Fedora Core build
33 %define fc1 0
34 %{?build_fc1:%define fc1 1}
35 %define fc3 0
36 %{?build_fc3:%define fc3 1}
37 %define fc4 0
38 %{?build_fc4:%define fc4 1}
39 # Whitebox Enterprise build
40 %define wb3 0
41 %{?build_wb3:%define wb3 1}
42 # RedHat Enterprise builds
43 %define rhel3 0
44 %{?build_rhel3:%define rhel3 1}
45 %{?build_rhel3:%define wb3 1}
46 %define rhel4 0
47 %{?build_rhel4:%define rhel4 1}
48 %{?build_rhel4:%define fc3 1}
49 # CentOS build
50 %define centos3 0
51 %{?build_centos3:%define centos3 1}
52 %{?build_centos3:%define wb3 1}
53 %define centos4 0
54 %{?build_centos4:%define centos4 1}
55 %{?build_centos4:%define fc3 1}
56 # SuSE build
57 %define su9 0
58 %{?build_su9:%define su9 1}
59 %define su10 0
60 %{?build_su10:%define su10 1}
61 # Mandrake builds
62 %define mdk 0
63 %{?build_mdk:%define mdk 1}
64 %define mdv 0
65 %{?build_mdv:%define mdv 1}
66 %{?build_mdv:%define mdk 1}
67
68 # test for a platform definition
69 %if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{mdk}
70 %{error: You must specify a platform. Please examine the spec file.}
71 exit 1
72 %endif
73
74 # database defines
75 # set for database support desired or define the build_xxx on the command line
76 %define mysql 0
77 %{?build_mysql:%define mysql 1}
78 # if using mysql 4.x define this and mysql above
79 # currently: Mandrake 10.1, SuSE 9.2, RHEL4 and Fedora Core 4
80 %define mysql4 0
81 %{?build_mysql4:%define mysql4 1}
82 %{?build_mysql4:%define mysql 1}
83 %define sqlite 0
84 %{?build_sqlite:%define sqlite 1}
85 %define postgresql 0
86 %{?build_postgresql:%define postgresql 1}
87
88 # test for a database definition
89 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql}
90 %{error: You must specify database support. Please examine the spec file.}
91 exit 1
92 %endif
93
94 %if %{mysql}
95 %define db_backend mysql
96 %endif
97 %if %{sqlite}
98 %define db_backend sqlite
99 %endif
100 %if %{postgresql}
101 %define db_backend postgresql
102 %endif
103
104 # 64 bit support
105 %define x86_64 0
106 %{?build_x86_64:%define x86_64 1}
107
108 # check what distribution we are
109 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4}
110 %define _dist %(grep Red /etc/redhat-release)
111 %endif
112 %if %{fc1} || %{fc4}
113 %define _dist %(grep Fedora /etc/redhat-release)
114 %endif
115 %if %{centos4} || %{centos3}
116 %define _dist %(grep CentOS /etc/redhat-release)
117 %endif
118 %if %{fc3} && ! %{rhel4} && ! %{centos4}
119 %define _dist %(grep Fedora /etc/redhat-release)
120 %endif
121 %if %{wb3} && ! %{rhel3} && ! %{centos3}
122 %define _dist %(grep White /etc/whitebox-release)
123 %endif
124 %if %{su9} || %{su10}
125 %define _dist %(grep -i SuSE /etc/SuSE-release)
126 %endif
127 %if %{mdk}
128 %define _dist %(grep Mand /etc/mandrake-release)
129 %endif
130
131 # Should we build gconsole, possible only if gnome >= 2.0 available
132 %if %{rh7}
133 %define gconsole 0
134 %else
135 %define gconsole 1
136 %endif
137 # specifically disallow gconsole if desired
138 %{?nobuild_gconsole:%define gconsole 0}
139
140 # Should we build wxconsole, only wxWidgets >=2.6 is supported
141 # currently only SuSE 10 and FC4
142 %define wxconsole 0
143 %{?build_wxconsole:%define wxconsole 1}
144
145 Summary: Bacula - The Network Backup Solution
146 Name: bacula
147 Version: @VERSION@
148 Release: 1
149 Group: System Environment/Daemons
150 License: GPL v2
151 Source0: http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
152 Source1: http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
153 Source2: Release_Notes-%{version}-%{release}.tar.gz
154 Source3: http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
155 Source4: http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
156 BuildRoot: %{_tmppath}/%{name}-root
157 URL: http://www.bacula.org/
158 Vendor: The Bacula Team
159 Distribution: %{_dist}
160 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
161
162 %define _docsrc ../%{name}-docs-%{version}
163 %define _rescuesrc ../%{name}-rescue-%{_rescuever}
164
165 BuildRequires: atk-devel, ncurses-devel, pango-devel, perl
166 BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel
167 BuildRequires: openssl-devel
168 %if %{gconsole}
169 BuildRequires: pkgconfig
170 %endif
171 %if %{rh7}
172 BuildRequires: libtermcap-devel
173 BuildRequires: glibc-devel >= 2.2
174 %endif
175 %if %{su9}
176 BuildRequires: termcap
177 BuildRequires: glibc-devel >= 2.3
178 %endif
179 %if %{su9} && %{gconsole}
180 BuildRequires: libgnome >= 2.0
181 BuildRequires: gtk2-devel >= 2.0
182 BuildRequires: libgnomeui-devel >= 2.0
183 BuildRequires: ORBit2-devel
184 BuildRequires: libart_lgpl-devel >= 2.0
185 BuildRequires: libbonobo-devel >= 2.0
186 BuildRequires: libbonoboui-devel >= 2.0
187 BuildRequires: bonobo-activation-devel
188 BuildRequires: gconf2-devel
189 BuildRequires: linc-devel
190 BuildRequires: freetype2-devel
191 %endif
192 %if %{su10}
193 BuildRequires: termcap
194 BuildRequires: glibc-devel >= 2.3
195 %endif
196 %if %{su10} && %{gconsole}
197 BuildRequires: libgnome >= 2.12
198 BuildRequires: gtk2-devel >= 2.8
199 BuildRequires: libgnomeui-devel >= 2.12
200 BuildRequires: ORBit2-devel
201 BuildRequires: libart_lgpl-devel >= 2.3
202 BuildRequires: libbonobo-devel >= 2.10
203 BuildRequires: libbonoboui-devel >= 2.10
204 BuildRequires: bonobo-activation-devel
205 BuildRequires: gconf2-devel
206 BuildRequires: freetype2-devel
207 BuildRequires: cairo-devel
208 BuildRequires: fontconfig-devel >= 2.3
209 BuildRequires: gnome-vfs2-devel >= 2.12
210 BuildRequires: libpng-devel
211 %endif
212 %if %{mdk}
213 BuildRequires: libtermcap-devel
214 BuildRequires: libstdc++-static-devel
215 BuildRequires: glibc-static-devel
216 BuildRequires: glibc-devel >= 2.3
217 %endif
218 %if %{mdk} && !%{mdv} && %{gconsole}
219 BuildRequires: gtk2-devel >= 2.0
220 BuildRequires: libgnomeui2-devel >= 2.0
221 BuildRequires: libORBit2-devel
222 BuildRequires: libart_lgpl-devel >= 2.0
223 BuildRequires: libbonobo2_0-devel
224 BuildRequires: libbonoboui2_0-devel
225 BuildRequires: libbonobo-activation-devel
226 BuildRequires: libGConf2-devel
227 BuildRequires: freetype2-devel
228 %endif
229 %if %{mdv} && %{gconsole}
230 BuildRequires: gtk2-devel >= 2.8
231 BuildRequires: libgnomeui2-devel >= 2.10
232 BuildRequires: libORBit2-devel
233 BuildRequires: libart_lgpl-devel >= 2.3
234 BuildRequires: libbonobo2_0-devel
235 BuildRequires: libbonoboui2_0-devel
236 BuildRequires: libbonobo-activation-devel
237 BuildRequires: libGConf2-devel
238 BuildRequires: freetype2-devel
239 %endif
240 %if %{fc3}
241 BuildRequires: libtermcap-devel
242 BuildRequires: glibc-devel >= 2.3
243 %endif
244 %if %{fc3} && %{gconsole}
245 BuildRequires: gtk2-devel >= 2.4
246 BuildRequires: libgnomeui-devel >= 2.8
247 BuildRequires: ORBit2-devel
248 BuildRequires: libart_lgpl-devel >= 2.3
249 BuildRequires: libbonobo-devel >= 2.8
250 BuildRequires: libbonoboui-devel >= 2.8
251 BuildRequires: bonobo-activation-devel
252 BuildRequires: GConf2-devel
253 BuildRequires: freetype-devel
254 %endif
255 %if %{fc4}
256 BuildRequires: libtermcap-devel
257 BuildRequires: glibc-devel >= 2.3
258 %endif
259 %if %{fc4} && %{gconsole}
260 BuildRequires: gtk2-devel >= 2.6
261 BuildRequires: libgnomeui-devel >= 2.10
262 BuildRequires: ORBit2-devel
263 BuildRequires: libart_lgpl-devel >= 2.3
264 BuildRequires: libbonobo-devel >= 2.8
265 BuildRequires: libbonoboui-devel >= 2.8
266 BuildRequires: bonobo-activation-devel
267 BuildRequires: GConf2-devel
268 BuildRequires: freetype-devel
269 %endif
270 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
271 BuildRequires: libtermcap-devel
272 BuildRequires: glibc-devel >= 2.3
273 %endif
274 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && %{gconsole}
275 BuildRequires: gtk2-devel >= 2.0
276 BuildRequires: libgnomeui-devel >= 2.0
277 BuildRequires: ORBit2-devel
278 BuildRequires: libart_lgpl-devel >= 2.0
279 BuildRequires: libbonobo-devel >= 2.0
280 BuildRequires: libbonoboui-devel >= 2.0
281 BuildRequires: bonobo-activation-devel
282 BuildRequires: GConf2-devel
283 BuildRequires: linc-devel
284 BuildRequires: freetype-devel
285 %endif
286
287 %if %{mysql} && ! %{mysql4}
288 BuildRequires: mysql-devel >= 3.23
289 %endif
290
291 %if %{mysql} && %{mysql4}
292 BuildRequires: mysql-devel >= 4.0
293 %endif
294
295 %if %{postgresql} && %{wb3}
296 BuildRequires: rh-postgresql-devel >= 7
297 %endif
298
299 %if %{postgresql} && ! %{wb3}
300 BuildRequires: postgresql-devel >= 7
301 %endif
302
303 %if %{wxconsole}
304 BuildRequires: wxGTK-devel >= 2.6
305 %endif
306
307 %description
308 Bacula - It comes by night and sucks the vital essence from your computers.
309
310 Bacula is a set of computer programs that permit you (or the system 
311 administrator) to manage backup, recovery, and verification of computer 
312 data across a network of computers of different kinds. In technical terms, 
313 it is a network client/server based backup program. Bacula is relatively 
314 easy to use and efficient, while offering many advanced storage management 
315 features that make it easy to find and recover lost or damaged files. 
316 Bacula source code has been released under the GPL version 2 license.
317
318 %if %{mysql}
319 %package mysql
320 %endif
321 %if %{sqlite}
322 %package sqlite
323 %endif
324 %if %{postgresql}
325 %package postgresql
326 %endif
327
328 Summary: Bacula - The Network Backup Solution
329 Group: System Environment/Daemons
330 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
331 Conflicts: bacula-client
332 Obsoletes: bacula-rescue
333 Requires: ncurses, libstdc++, zlib, openssl, mtx
334
335 %if %{rh7}
336 Requires: glibc >= 2.2
337 Requires: libtermcap
338 %endif
339 %if %{su9} || %{su10}
340 Requires: glibc >= 2.3
341 Requires: termcap
342 %endif
343 %if ! %{rh7} && ! %{su9} && ! %{su10}
344 Requires: glibc >= 2.3
345 Requires: libtermcap
346 %endif
347
348 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4}
349 Requires: mysql >= 3.23
350 Requires: mysql-server >= 3.23
351 %endif
352 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{mdk} && %{mysql4}
353 Requires: mysql >= 4.0
354 Requires: mysql-server >= 4.0
355 %endif
356
357 %if %{mysql} && %{su9} && ! %{mysql4}
358 Requires: mysql >= 3.23
359 Requires: mysql-client >= 3.23
360 %endif
361 %if %{mysql} && %{su9} && %{mysql4}
362 Requires: mysql >= 4.0
363 Requires: mysql-client >= 4.0
364 %endif
365 %if %{mysql} && %{su10} && %{mysql4}
366 Requires: mysql >= 4.0
367 Requires: mysql-client >= 4.0
368 %endif
369
370 %if %{mysql} && %{mdk} && ! %{mysql4}
371 Requires: mysql >= 3.23
372 Requires: mysql-client >= 3.23
373 %endif
374 %if %{mysql} && %{mdk} && %{mysql4}
375 Requires: mysql >= 4.0
376 Requires: mysql-client >= 4.0
377 %endif
378
379 %if %{postgresql} && %{wb3}
380 Requires: rh-postgresql >= 7
381 Requires: rh-postgresql-server >= 7
382 %endif
383 %if %{postgresql} && ! %{wb3}
384 Requires: postgresql >= 7
385 Requires: postgresql-server >= 7
386 %endif
387
388 %if %{mysql}
389 %description mysql
390 %endif
391 %if %{sqlite}
392 %description sqlite
393 %endif
394 %if %{postgresql}
395 %description postgresql
396 %endif
397
398 Bacula - It comes by night and sucks the vital essence from your computers.
399
400 Bacula is a set of computer programs that permit you (or the system 
401 administrator) to manage backup, recovery, and verification of computer 
402 data across a network of computers of different kinds. In technical terms, 
403 it is a network client/server based backup program. Bacula is relatively 
404 easy to use and efficient, while offering many advanced storage management 
405 features that make it easy to find and recover lost or damaged files. 
406 Bacula source code has been released under the GPL version 2 license.
407
408 %if %{mysql}
409 This build requires MySQL to be installed separately as the catalog database.
410 %endif
411 %if %{postgresql}
412 This build requires PostgreSQL to be installed separately as the catalog database.
413 %endif
414 %if %{sqlite}
415 This build incorporates sqlite as the catalog database, statically compiled.
416 %endif
417
418 %package mtx
419 Summary: Bacula - The Network Backup Solution
420 Group: System Environment/Daemons
421 Provides: mtx
422
423 %description mtx
424 This is Bacula's version of mtx tape utilities for Linux distributions that
425 do not provide their own mtx package
426
427 %package client
428 Summary: Bacula - The Network Backup Solution
429 Group: System Environment/Daemons
430 Provides: bacula-fd
431 Conflicts: bacula-mysql
432 Conflicts: bacula-sqlite
433 Conflicts: bacula-postgresql
434 Obsoletes: bacula-rescue
435 Requires: libstdc++, zlib, openssl
436
437 %if %{rh7}
438 Requires: glibc >= 2.2
439 Requires: libtermcap
440 %endif
441 %if %{su9} || %{su10}
442 Requires: glibc >= 2.3
443 Requires: termcap
444 %endif
445 %if ! %{rh7} && ! %{su9} && ! %{su10}
446 Requires: glibc >= 2.3
447 Requires: libtermcap
448 %endif
449
450 %description client
451 Bacula - It comes by night and sucks the vital essence from your computers.
452
453 Bacula is a set of computer programs that permit you (or the system 
454 administrator) to manage backup, recovery, and verification of computer 
455 data across a network of computers of different kinds. In technical terms, 
456 it is a network client/server based backup program. Bacula is relatively 
457 easy to use and efficient, while offering many advanced storage management 
458 features that make it easy to find and recover lost or damaged files. 
459 Bacula source code has been released under the GPL version 2 license.
460
461 This is the File daemon (Client) only package. It includes the command line 
462 console program.
463
464 %package updatedb
465
466 Summary: Bacula - The Network Backup Solution
467 Group: System Environment/Daemons
468
469 %description updatedb
470 Bacula - It comes by night and sucks the vital essence from your computers.
471
472 Bacula is a set of computer programs that permit you (or the system 
473 administrator) to manage backup, recovery, and verification of computer 
474 data across a network of computers of different kinds. In technical terms, 
475 it is a network client/server based backup program. Bacula is relatively 
476 easy to use and efficient, while offering many advanced storage management 
477 features that make it easy to find and recover lost or damaged files. 
478 Bacula source code has been released under the GPL version 2 license.
479
480 This package installs scripts for updating older versions of the bacula
481 database.
482
483 %if %{gconsole}
484 %package gconsole
485 Summary: Bacula - The Network Backup Solution
486 Group: System Environment/Daemons
487 Requires: atk, libstdc++, zlib, pango, libxml2, bacula-fd, openssl
488 %endif
489
490 %if %{gconsole} && %{su9}
491 Requires: gtk2 >= 2.0
492 Requires: libgnome >= 2.0
493 Requires: libgnomeui >= 2.0
494 Requires: glibc >= 2.3
495 Requires: ORBit2
496 Requires: libart_lgpl >= 2.0
497 Requires: libbonobo >= 2.0
498 Requires: libbonoboui >= 2.0
499 Requires: bonobo-activation
500 Requires: gconf2
501 Requires: linc
502 Requires: freetype2
503 %endif
504 %if %{gconsole} && %{su10}
505 Requires: gtk2 >= 2.8
506 Requires: libgnome >= 2.12
507 Requires: libgnomeui >= 2.12
508 Requires: glibc >= 2.3
509 Requires: ORBit2
510 Requires: libart_lgpl >= 2.3
511 Requires: libbonobo >= 2.10
512 Requires: libbonoboui >= 2.10
513 Requires: bonobo-activation
514 Requires: gconf2
515 Requires: freetype2
516 Requires: cairo
517 Requires: fontconfig >= 2.3
518 Requires: gnome-vfs2 >= 2.12
519 Requires: libpng
520 %endif
521 %if %{gconsole} && %{mdk} && !%{mdv}
522 Requires: gtk2 >= 2.0
523 Requires: libgnomeui2
524 Requires: glibc >= 2.3
525 Requires: ORBit2
526 Requires: libart_lgpl >= 2.0
527 Requires: libbonobo >= 2.0
528 Requires: libbonoboui >= 2.0
529 Requires: GConf2
530 Requires: freetype2
531 %endif
532 %if %{gconsole} && %{mdv}
533 Requires: gtk2 >= 2.8
534 Requires: libgnomeui2
535 Requires: glibc >= 2.3
536 Requires: ORBit2
537 Requires: libart_lgpl >= 2.3
538 Requires: libbonobo >= 2.10
539 Requires: libbonoboui >= 2.10
540 Requires: GConf2
541 Requires: freetype2
542 %endif
543 %if %{gconsole} && %{fc3}  
544 Requires: gtk2 >= 2.4
545 Requires: libgnomeui >= 2.8
546 Requires: glibc >= 2.3
547 Requires: ORBit2
548 Requires: libart_lgpl >= 2.3
549 Requires: libbonobo >= 2.8
550 Requires: libbonoboui >= 2.8
551 Requires: bonobo-activation
552 Requires: GConf2
553 Requires: freetype
554 %endif
555 %if %{gconsole} && %{fc4}  
556 Requires: gtk2 >= 2.6
557 Requires: libgnomeui >= 2.10
558 Requires: glibc >= 2.3
559 Requires: ORBit2
560 Requires: libart_lgpl >= 2.3
561 Requires: libbonobo >= 2.8
562 Requires: libbonoboui >= 2.8
563 Requires: bonobo-activation
564 Requires: GConf2
565 Requires: freetype
566 %endif
567 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
568 Requires: gtk2 >= 2.0
569 Requires: libgnomeui >= 2.0
570 Requires: glibc >= 2.3
571 Requires: ORBit2
572 Requires: libart_lgpl >= 2.0
573 Requires: libbonobo >= 2.0
574 Requires: libbonoboui >= 2.0
575 Requires: bonobo-activation
576 Requires: GConf2
577 Requires: linc
578 Requires: freetype
579 %endif
580 %if %{gconsole} && %{su9}
581 Requires: xsu
582 %endif
583 %if %{gconsole} && %{su10}
584 Requires: xsu
585 %endif
586 %if %{gconsole} && ! %{su9} && ! %{su10}
587 Requires: usermode
588 %endif
589
590 %if %{gconsole}
591 %description gconsole
592 Bacula - It comes by night and sucks the vital essence from your computers.
593
594 Bacula is a set of computer programs that permit you (or the system 
595 administrator) to manage backup, recovery, and verification of computer 
596 data across a network of computers of different kinds. In technical terms, 
597 it is a network client/server based backup program. Bacula is relatively 
598 easy to use and efficient, while offering many advanced storage management 
599 features that make it easy to find and recover lost or damaged files. 
600 Bacula source code has been released under the GPL version 2 license.
601
602 This is the Gnome Console package. It is an add-on to the client or
603 server packages.
604 %endif
605
606 %if %{wxconsole}
607 %package wxconsole
608 Summary: Bacula - The Network Backup Solution
609 Group: System Environment/Daemons
610 Requires: wxGTK >= 2.6, libstdc++, openssl
611 %endif
612
613 %if %{wxconsole} && %{su10}
614 Requires: gtk2 >= 2.8
615 %endif
616
617 %if %{wxconsole} && %{fc4}  
618 Requires: gtk2 >= 2.6
619 %endif
620
621 %if %{wxconsole}
622 %description wxconsole
623 Bacula - It comes by night and sucks the vital essence from your computers.
624
625 Bacula is a set of computer programs that permit you (or the system 
626 administrator) to manage backup, recovery, and verification of computer 
627 data across a network of computers of different kinds. In technical terms, 
628 it is a network client/server based backup program. Bacula is relatively 
629 easy to use and efficient, while offering many advanced storage management 
630 features that make it easy to find and recover lost or damaged files. 
631 Bacula source code has been released under the GPL version 2 license.
632
633 This is the WXWindows Console package. It is an add-on to the client or
634 server packages.
635 %endif
636
637 %prep
638
639 %setup
640 %setup -T -D -b 1
641 %setup -T -D -b 2
642 %setup -T -D -b 3
643 %setup -T -D -b 4
644
645 %build
646
647 %if %{su9} || %{su10}
648 export LDFLAGS="-L/usr/lib/termcap"
649 %endif
650
651 cwd=${PWD}
652 cd %{depkgs}
653 %if %{sqlite}
654 make sqlite
655 %endif
656 make mtx
657 cd ${cwd}
658
659 # patches for the bundled sqlite scripts
660 # as of 1.38.0 first 3 patches no longer needed
661
662 # patch the make_sqlite_tables script for installation bindir
663 # patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
664
665 # patch the create_sqlite_database script for installation bindir
666 #patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
667
668 # patch the make_catalog_backup script for installation bindir
669 #patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
670
671 # patch the update_sqlite_tables script for installation bindir
672 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
673
674 # patch the bacula-dir init script to remove sqlite service
675 %if %{sqlite} && %{su9}
676 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
677 %endif
678 %if %{sqlite} && %{su10}
679 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
680 %endif
681
682 # 64 bit lib location hacks
683 # this is the location on redhat type platforms, don't know about others yet
684 %if %{x86_64}
685 export LDFLAGS=-L/usr/lib64
686 %endif
687 %if %{mysql} && %{x86_64}
688 export LDFLAGS=-L/usr/lib64/mysql
689 %endif
690
691 %configure \
692         --prefix=/usr \
693         --sbindir=/usr/sbin \
694         --sysconfdir=/etc/bacula \
695         --with-scriptdir=/etc/bacula \
696         --enable-smartalloc \
697         --enable-client-only \
698         %if %{mdk}
699         --disable-nls \
700         %endif
701         --enable-static-fd
702
703 make
704
705 %configure \
706         --prefix=/usr \
707         --sbindir=/usr/sbin \
708         --sysconfdir=/etc/bacula \
709         --with-scriptdir=/etc/bacula \
710         --enable-smartalloc \
711 %if %{gconsole}
712         --enable-gnome \
713 %endif
714 %if %{gconsole} && ! %{rh8}
715         --enable-tray-monitor \
716 %endif
717 %if %{mysql}
718         --with-mysql \
719 %endif
720 %if %{sqlite}
721         --with-sqlite=${cwd}/%{depkgs}/sqlite \
722 %endif
723 %if %{postgresql}
724         --with-postgresql \
725 %endif
726 %if %{wxconsole}
727         --enable-wx-console \
728 %endif
729         --with-working-dir=%{working_dir} \
730         --with-pid-dir=/var/run \
731         --with-subsys-dir=/var/lock/subsys \
732         --with-dir-user=%{director_daemon_user} \
733         --with-dir-group=%{daemon_group} \
734         --with-sd-user=%{storage_daemon_user} \
735         --with-sd-group=%{storage_daemon_group} \
736         --with-fd-user=%{file_daemon_user} \
737         --with-fd-group=%{daemon_group} \
738         --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
739         --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
740         --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
741         --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
742         --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
743         --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
744         --with-openssl
745
746 make
747
748 %install
749  
750 cwd=${PWD}
751 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
752 mkdir -p $RPM_BUILD_ROOT/etc/init.d
753 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
754 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/logfiles
755 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/services
756 mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
757 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
758 %if %{gconsole}
759 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
760 %endif
761 mkdir -p $RPM_BUILD_ROOT/etc/bacula/updatedb
762 %if %{gconsole} && ! %{su9} && ! %{su10}
763 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
764 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
765 mkdir -p $RPM_BUILD_ROOT/usr/bin
766 %endif
767
768 %if %{sqlite}
769 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
770 %endif
771
772 make \
773         prefix=$RPM_BUILD_ROOT/usr \
774         sbindir=$RPM_BUILD_ROOT/usr/sbin \
775         sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
776         scriptdir=$RPM_BUILD_ROOT/etc/bacula \
777         working_dir=$RPM_BUILD_ROOT%{working_dir} \
778         install
779
780 cd %{depkgs}
781 make \
782         prefix=$RPM_BUILD_ROOT/usr \
783         sbindir=$RPM_BUILD_ROOT/usr/sbin \
784         sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
785         working_dir=$RPM_BUILD_ROOT%{working_dir} \
786         mandir=$RPM_BUILD_ROOT/usr/man \
787         mtx-install
788 cd ${cwd}
789
790 # fixme - make installs the mysql scripts for sqlite build
791 %if %{sqlite}
792 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
793 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
794 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
795 %endif
796
797 # fixme - make installs the mysql scripts for postgresql build
798 %if %{postgresql}
799 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
800 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
801 %endif
802
803 # fixme - make installs gconsole script for build without gconsole
804 %if ! %{gconsole}
805 rm -f $RPM_BUILD_ROOT/etc/bacula/gconsole
806 %endif
807
808 rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
809
810 # install the init scripts
811 %if %{su9} || %{su10}
812 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
813 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
814 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
815 %endif
816 %if %{mdk}
817 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
818 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
819 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
820 %endif
821 %if ! %{su9} && ! %{su10} && ! %{mdk}
822 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
823 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
824 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
825 %endif
826 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
827
828 # install the menu stuff
829 %if %{gconsole} && %{su9}
830 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
831 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
832 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
833 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
834 %endif
835 %if %{gconsole} && %{su10}
836 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
837 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
838 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
839 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
840 %endif
841 %if %{wxconsole} && %{su10}
842 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
843 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
844 %endif
845 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{mdk}
846 %define iftrick 1
847 %else
848 %define iftrick 0
849 %endif
850 %if %{gconsole} && %{iftrick}
851 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
852 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
853 cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console
854 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console
855 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console
856 %endif
857 %if %{gconsole} && ! %{rh8}
858 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
859 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
860 %endif
861 %if %{wxconsole} && %{iftrick}
862 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
863 cp -p scripts/wxconsole.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
864 cp -p scripts/wxconsole.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/wxconsole
865 cp -p scripts/wxconsole.pamd $RPM_BUILD_ROOT/etc/pam.d/wxconsole
866 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/wxconsole
867 %endif
868
869 # install sqlite
870 %if %{sqlite}
871 cp -p %{depkgs}/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
872 cp -p %{depkgs}/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
873 cp -p %{depkgs}/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
874 %endif
875
876 # install the logrotate file
877 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
878
879 # install the updatedb scripts
880 cp -p updatedb/* $RPM_BUILD_ROOT/etc/bacula/updatedb/
881
882 # install the logwatch scripts
883 cp -p scripts/logwatch/bacula $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
884 cp -p scripts/logwatch/logfile.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
885 cp -p scripts/logwatch/services.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
886 chmod 755 $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
887 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
888 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
889
890 # install the rescue files
891 mkdir $RPM_BUILD_ROOT/etc/bacula/rescue
892 cp -p %{_rescuesrc}/Makefile* $RPM_BUILD_ROOT/etc/bacula/rescue/
893 cp -p %{_rescuesrc}/README $RPM_BUILD_ROOT/etc/bacula/rescue/
894 cp -p %{_rescuesrc}/configure $RPM_BUILD_ROOT/etc/bacula/rescue/
895 cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT/etc/bacula/rescue/
896 cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT/etc/bacula/rescue/
897 cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT/etc/bacula/rescue/
898 touch $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/rpm_release
899 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/bacula/bin/bacula-fd
900 rm -f src/filed/static-bacula-fd
901
902 %if %{wxconsole}
903 mv $RPM_BUILD_ROOT/usr/sbin/wx-console $RPM_BUILD_ROOT/usr/sbin/wxconsole
904 mv $RPM_BUILD_ROOT/etc/bacula/wx-console.conf $RPM_BUILD_ROOT/etc/bacula/wxconsole.conf
905 %endif
906
907 # now clean up permissions that are left broken by the install
908 chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
909 chmod o-rwx $RPM_BUILD_ROOT/var/bacula
910 %if %{gconsole} && ! %{rh8}
911 chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
912 chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf
913 %endif
914
915 %clean
916 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
917
918 %if %{mysql}
919 # MySQL specific files
920 %files mysql
921 %defattr(-, root, root)
922 %attr(-, root, %{daemon_group}) /etc/bacula/create_mysql_database
923 %attr(-, root, %{daemon_group}) /etc/bacula/drop_mysql_database
924 %attr(-, root, %{daemon_group}) /etc/bacula/make_mysql_tables
925 %attr(-, root, %{daemon_group}) /etc/bacula/drop_mysql_tables
926 %attr(-, root, %{daemon_group}) /etc/bacula/update_mysql_tables
927 %attr(-, root, %{daemon_group}) /etc/bacula/grant_mysql_privileges
928 %attr(-, root, %{daemon_group}) /etc/bacula/startmysql
929 %attr(-, root, %{daemon_group}) /etc/bacula/stopmysql
930 %endif
931
932 %if %{sqlite}
933 %files sqlite
934 %defattr(-,root,root)
935 %attr(-, root, %{daemon_group}) /etc/bacula/create_sqlite_database
936 %attr(-, root, %{daemon_group}) /etc/bacula/drop_sqlite_database
937 %attr(-, root, %{daemon_group}) /etc/bacula/grant_sqlite_privileges
938 %attr(-, root, %{daemon_group}) /etc/bacula/make_sqlite_tables
939 %attr(-, root, %{daemon_group}) /etc/bacula/drop_sqlite_tables
940 %attr(-, root, %{daemon_group}) /etc/bacula/update_sqlite_tables
941 %{sqlite_bindir}/libsqlite.a
942 %{sqlite_bindir}/sqlite.h
943 %{sqlite_bindir}/sqlite
944 %endif
945
946 %if %{postgresql}
947 %files postgresql
948 %defattr(-,root,root)
949 %attr(-, root, %{daemon_group}) /etc/bacula/create_postgresql_database
950 %attr(-, root, %{daemon_group}) /etc/bacula/drop_postgresql_database
951 %attr(-, root, %{daemon_group}) /etc/bacula/make_postgresql_tables
952 %attr(-, root, %{daemon_group}) /etc/bacula/drop_postgresql_tables
953 %attr(-, root, %{daemon_group}) /etc/bacula/update_postgresql_tables
954 %attr(-, root, %{daemon_group}) /etc/bacula/grant_postgresql_privileges
955 %endif
956
957 # The rest is DB backend independent
958 %attr(-, root, %{daemon_group}) %dir /etc/bacula
959 %attr(-, root, %{daemon_group}) /etc/bacula/bacula
960 %attr(-, root, %{daemon_group}) /etc/bacula/bconsole
961 %attr(-, root, %{daemon_group}) /etc/bacula/create_bacula_database
962 %attr(-, root, %{daemon_group}) /etc/bacula/drop_bacula_database
963 %attr(-, root, %{daemon_group}) /etc/bacula/grant_bacula_privileges
964 %attr(-, root, %{daemon_group}) /etc/bacula/make_bacula_tables
965 %attr(-, root, %{daemon_group}) /etc/bacula/drop_bacula_tables
966 %attr(-, root, %{daemon_group}) /etc/bacula/update_bacula_tables
967 %attr(-, root, %{daemon_group}) /etc/bacula/make_catalog_backup
968 %attr(-, root, %{daemon_group}) /etc/bacula/delete_catalog_backup
969 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.dbx
970 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.gdb
971 %attr(-, root, %{daemon_group}) /etc/bacula/rescue
972 %attr(-, root, %{daemon_group}) /etc/bacula/disk-changer
973 %attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-dir
974 %attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-fd
975 %attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-sd
976 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
977 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
978 %attr(-, root, %{storage_daemon_group}) /etc/bacula/dvd-handler
979 %attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
980 %attr(-, root, %{storage_daemon_group}) /etc/bacula/mtx-changer
981
982 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
983 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
984
985 /etc/logrotate.d/bacula
986 /etc/log.d/scripts/services/bacula
987 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bacula-dir.conf
988 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bacula-fd.conf
989 %attr(-, root, %{storage_daemon_group}) %config(noreplace) /etc/bacula/bacula-sd.conf
990 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bconsole.conf
991 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
992 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/services/bacula.conf
993 %attr(-, root, %{daemon_group}) /etc/bacula/query.sql
994 %attr(-, root, %{daemon_group}) %dir %{working_dir}
995
996 /usr/sbin/bacula-dir
997 /usr/sbin/bacula-fd
998 /usr/sbin/bacula-sd
999 /usr/sbin/bcopy
1000 /usr/sbin/bextract
1001 /usr/sbin/bls
1002 /usr/sbin/bscan
1003 /usr/sbin/btape
1004 /usr/sbin/btraceback
1005 /usr/sbin/bconsole
1006 /usr/sbin/dbcheck
1007 /usr/sbin/bsmtp
1008 /usr/sbin/bregex
1009 /usr/sbin/bwild
1010
1011 %if %{mysql}
1012 %pre mysql
1013 # test for bacula database older than version 8
1014 # note: this ASSUMES no password has been set for bacula database
1015 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1016 %endif
1017
1018 %if %{sqlite}
1019 %pre sqlite
1020 # test for bacula database older than version 8
1021 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
1022         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1023 %endif
1024
1025 %if %{postgresql}
1026 %pre postgresql
1027 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1028 %endif
1029
1030 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then
1031         echo "This bacula upgrade will update a bacula database from version 8 to 9."
1032         echo "You appear to be running database version $DB_VER. You must first update"
1033         echo "your database to version 8 and then install this upgrade. The alternative"
1034         echo "is to use /etc/bacula/drop_%{db_backend}_tables to delete all your your current"
1035         echo "catalog information, then do the upgrade. Information on updating a"
1036         echo "database older than version 8 can be found in the release notes."
1037         exit 1
1038 fi
1039
1040 %if %{sqlite}
1041 fi
1042 %endif
1043
1044 # check for and copy /etc/bacula/console.conf to bconsole.conf
1045 if [ -s /etc/bacula/console.conf ];then
1046         cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
1047 fi
1048
1049 # create the daemon users and groups
1050 # first create the groups if they don't exist
1051 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1052 if [ -z "$HAVE_BACULA" ]; then
1053         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1054         echo "The group %{daemon_group} has been added to %{group_file}."
1055         echo "See the manual chapter \"Running Bacula\" for details."
1056 fi
1057 HAVE_BACULA=`grep %{storage_daemon_group} %{group_file} 2>/dev/null`
1058 if [ -z "$HAVE_BACULA" ]; then
1059         %{groupadd} -r %{storage_daemon_group} > /dev/null 2>&1
1060         echo "The group %{storage_daemon_group} has been added to %{group_file}."
1061         echo "See the manual chapter \"Running Bacula\" for details."
1062 fi
1063 # now create the users if they do not exist
1064 # we do not use the -g option allowing the primary group to be set to system default
1065 # this will be a unique group on redhat type systems or the group users on some systems
1066 HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
1067 if [ -z "$HAVE_BACULA" ]; then
1068         %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
1069         echo "The user %{storage_daemon_user} has been added to %{user_file}."
1070         echo "See the manual chapter \"Running Bacula\" for details."
1071 fi
1072 HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
1073 if [ -z "$HAVE_BACULA" ]; then
1074         %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
1075         echo "The user %{director_daemon_user} has been added to %{user_file}."
1076         echo "See the manual chapter \"Running Bacula\" for details."
1077 fi
1078 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1079 if [ -z "$HAVE_BACULA" ]; then
1080         %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1081         echo "The user %{file_daemon_user} has been added to %{user_file}."
1082         echo "See the manual chapter \"Running Bacula\" for details."
1083 fi
1084 # now we add the supplementary groups, this is ok to call even if the users already exist
1085 # we only do this if the user is NOT root
1086 IS_ROOT=%{director_daemon_user}
1087 if [ "$IS_ROOT" != "root" ]; then
1088 %{usermod} %{director_daemon_user} -G %{daemon_group}
1089 fi
1090 IS_ROOT=%{storage_daemon_user}
1091 if [ "$IS_ROOT" != "root" ]; then
1092 %{usermod} %{storage_daemon_user} -G %{daemon_group},%{storage_daemon_group}
1093 fi
1094 IS_ROOT=%{file_daemon_user}
1095 if [ "$IS_ROOT" != "root" ]; then
1096 %{usermod} %{file_daemon_user} -G %{daemon_group}
1097 fi
1098
1099 %if %{mysql}
1100 %post mysql
1101 %endif
1102 %if %{sqlite}
1103 %post sqlite
1104 %endif
1105 %if %{postgresql}
1106 %post postgresql
1107 %endif
1108
1109 # add our links
1110 if [ "$1" -ge 1 ] ; then
1111 /sbin/chkconfig --add bacula-dir
1112 /sbin/chkconfig --add bacula-fd
1113 /sbin/chkconfig --add bacula-sd
1114 fi
1115
1116 %if %{mysql}
1117 # test for an existing database
1118 # note: this ASSUMES no password has been set for bacula database
1119 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1120
1121 # grant privileges and create tables if they do not exist
1122 if [ -z "$DB_VER" ]; then
1123         echo "Hmm, doesn't look like you have an existing database."
1124         echo "Granting privileges for MySQL user bacula..."
1125         /etc/bacula/grant_mysql_privileges
1126         echo "Creating MySQL bacula database..."
1127         /etc/bacula/create_mysql_database
1128         echo "Creating bacula tables..."
1129         /etc/bacula/make_mysql_tables
1130
1131 # check to see if we need to upgrade a 1.36 or lower database
1132 elif [ "$DB_VER" -lt "9" ]; then
1133         echo "This release requires an upgrade to your bacula database."
1134         echo "Backing up your current database..."
1135         mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1136         echo "Upgrading bacula database ..."
1137         /etc/bacula/update_mysql_tables
1138         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1139
1140 fi
1141 %endif
1142
1143 %if %{sqlite}
1144 # test for an existing database
1145 if [ -s %{working_dir}/bacula.db ]; then
1146         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1147         # check to see if we need to upgrade a 1.36 or lower database
1148         if [ "$DB_VER" -lt "9" ] && [ "$DB_VER" -ge "8" ]; then
1149                 echo "This release requires an upgrade to your bacula database."
1150                 echo "Backing up your current database..."
1151                 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1152                 echo "Upgrading bacula database ..."
1153                 /etc/bacula/update_sqlite_tables
1154                 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1155         fi
1156 else
1157         # create the database and tables
1158         echo "Hmm, doesn't look like you have an existing database."
1159         echo "Creating SQLite database..."
1160         /etc/bacula/create_sqlite_database
1161         echo "Creating the SQLite tables..."
1162         /etc/bacula/make_sqlite_tables
1163 fi
1164 %endif
1165
1166 %if %{postgresql}
1167 # test for an existing database
1168 # note: this ASSUMES no password has been set for bacula database
1169 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1170
1171 # grant privileges and create tables if they do not exist
1172 if [ -z "$DB_VER" ]; then
1173         echo "Hmm, doesn't look like you have an existing database."
1174         echo "Creating PostgreSQL bacula database..."
1175         /etc/bacula/create_postgresql_database
1176         echo "Creating bacula tables..."
1177         /etc/bacula/make_postgresql_tables
1178         echo "Granting privileges for PostgreSQL user bacula..."
1179         /etc/bacula/grant_postgresql_privileges
1180
1181 # check to see if we need to upgrade a 1.36 or lower database
1182 elif [ "$DB_VER" -lt "9" ]; then
1183         echo "This release requires an upgrade to your bacula database."
1184         echo "Backing up your current database..."
1185         pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1186         echo "Upgrading bacula database ..."
1187         /etc/bacula/update_postgresql_tables
1188         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1189         
1190 fi
1191 %endif
1192
1193 # generate passwords if needed
1194 if [ -d /etc/bacula ]; then
1195         cd /etc/bacula
1196         for file in *.conf; do
1197                 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
1198                         need_password=`grep $string $file 2>/dev/null`
1199                         if [ -n "$need_password" ]; then
1200                                 pass=`openssl rand -base64 33`
1201                                 sed "s-$string-$pass-g" $file > $file.new
1202                                 cp -f $file.new $file; rm -f $file.new
1203                         fi
1204                 done
1205         done
1206 fi
1207
1208 %if %{mysql}
1209 %preun mysql
1210 %endif
1211 %if %{sqlite}
1212 %preun sqlite
1213 %endif
1214 %if %{postgresql}
1215 %preun postgresql
1216 %endif
1217
1218 # delete our links
1219 if [ $1 = 0 ]; then
1220 /sbin/chkconfig --del bacula-dir
1221 /sbin/chkconfig --del bacula-fd
1222 /sbin/chkconfig --del bacula-sd
1223 fi
1224
1225
1226 %files mtx
1227 %attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
1228 %attr(-, root, %{storage_daemon_group}) /usr/sbin/mtx
1229 %attr(-, root, %{storage_daemon_group}) /usr/sbin/scsitape
1230 %attr(-, root, %{storage_daemon_group}) /usr/sbin/tapeinfo
1231 /usr/man/man1/*
1232
1233
1234 %files client
1235 %defattr(-,root,root)
1236 %attr(-, root, %{daemon_group}) %dir /etc/bacula
1237 %attr(-, root, %{daemon_group}) /etc/bacula/bconsole
1238 /etc/init.d/bacula-fd
1239 %attr(-, root, %{daemon_group}) /etc/bacula/rescue
1240
1241 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
1242 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1243
1244 /etc/logrotate.d/bacula
1245
1246 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bacula-fd.conf
1247 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bconsole.conf
1248 %attr(-, root, %{daemon_group}) %dir %{working_dir}
1249
1250 /usr/sbin/bacula-fd
1251 /usr/sbin/btraceback
1252 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.gdb
1253 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.dbx
1254 /usr/sbin/bsmtp
1255 /usr/sbin/bconsole
1256
1257
1258 %pre client
1259 # create the daemon group and user
1260 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1261 if [ -z "$HAVE_BACULA" ]; then
1262         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1263         echo "The group %{daemon_group} has been added to %{group_file}."
1264         echo "See the manual chapter \"Running Bacula\" for details."
1265 fi
1266 # we do not use the -g option allowing the primary group to be set to system default
1267 # this will be a unique group on redhat type systems or the group users on some systems
1268 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1269 if [ -z "$HAVE_BACULA" ]; then
1270         %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1271         echo "The user %{file_daemon_user} has been added to %{user_file}."
1272         echo "See the manual chapter \"Running Bacula\" for details."
1273 fi
1274 # now we add the supplementary group, this is ok to call even if the user already exists
1275 # we only do this if the user is NOT root
1276 IS_ROOT=%{file_daemon_user}
1277 if [ "$IS_ROOT" != "root" ]; then
1278 %{usermod} %{file_daemon_user} -G %{daemon_group}
1279 fi
1280
1281 %post client
1282 # add our link
1283 if [ "$1" -ge 1 ] ; then
1284 /sbin/chkconfig --add bacula-fd
1285 fi
1286
1287 # generate passwords if needed
1288 if [ -d /etc/bacula ]; then
1289         cd /etc/bacula
1290         for file in *.conf; do
1291                 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
1292                         need_password=`grep $string $file 2>/dev/null`
1293                         if [ -n "$need_password" ]; then
1294                                 pass=`openssl rand -base64 33`
1295                                 sed "s-$string-$pass-g" $file > $file.new
1296                                 cp -f $file.new $file; rm -f $file.new
1297                         fi
1298                 done
1299         done
1300 fi
1301
1302 %preun client
1303 # delete our link
1304 if [ $1 = 0 ]; then
1305 /sbin/chkconfig --del bacula-fd
1306 fi
1307
1308 %files updatedb
1309 %defattr(-,root,%{daemon_group})
1310 /etc/bacula/updatedb/*
1311
1312 %pre updatedb
1313 # create the daemon group
1314 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1315 if [ -z "$HAVE_BACULA" ]; then
1316         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1317         echo "The group %{daemon_group} has been added to %{group_file}."
1318         echo "See the manual chapter \"Running Bacula\" for details."
1319 fi
1320
1321 %post updatedb
1322 echo "The database update scripts were installed to /etc/bacula/updatedb"
1323
1324 %if %{gconsole}
1325 %files gconsole
1326 %defattr(-,root,root)
1327 /usr/sbin/gnome-console
1328 %attr(-, root, %{daemon_group}) %dir /etc/bacula
1329 %attr(-, root, %{daemon_group}) /etc/bacula/gconsole
1330 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/gnome-console.conf
1331 /usr/share/pixmaps/bacula.png
1332 %endif
1333
1334 %if %{gconsole}
1335 /usr/share/applications/bacula.desktop
1336 %endif
1337
1338 %if %{gconsole} && ! %{rh8}
1339 /usr/sbin/bacula-tray-monitor
1340 %config(noreplace) /etc/bacula/tray-monitor.conf
1341 /usr/share/pixmaps/bacula-tray-monitor.xpm
1342 /usr/share/applications/bacula-tray-monitor.desktop
1343 %endif
1344
1345 %if %{gconsole} && ! %{su9} && ! %{su10}
1346 # add the console helper files
1347 %config(noreplace,missingok) /etc/pam.d/gnome-console
1348 %config(noreplace,missingok) /etc/security/console.apps/gnome-console
1349 /usr/bin/gnome-console
1350 %endif
1351
1352 %if %{gconsole}
1353 %pre gconsole
1354 # create the daemon group
1355 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1356 if [ -z "$HAVE_BACULA" ]; then
1357         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1358         echo "The group %{daemon_group} has been added to %{group_file}."
1359         echo "See the manual chapter \"Running Bacula\" for details."
1360 fi
1361
1362 %post gconsole
1363 # generate passwords if needed
1364 if [ -d /etc/bacula ]; then
1365         cd /etc/bacula
1366         for file in *.conf; do
1367                 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
1368                         need_password=`grep $string $file 2>/dev/null`
1369                         if [ -n "$need_password" ]; then
1370                                 pass=`openssl rand -base64 33`
1371                                 sed "s-$string-$pass-g" $file > $file.new
1372                                 cp -f $file.new $file; rm -f $file.new
1373                         fi
1374                 done
1375         done
1376 fi
1377 %endif
1378
1379 %if %{wxconsole}
1380 %files wxconsole
1381 %defattr(-,root,root)
1382 /usr/sbin/wxconsole
1383 %attr(-, root, %{daemon_group}) %dir /etc/bacula
1384 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/wxconsole.conf
1385 /usr/share/pixmaps/wxwin16x16.xpm
1386 %endif
1387
1388 %if %{wxconsole}
1389 /usr/share/applications/wxconsole.desktop
1390 %endif
1391
1392 %if %{wxconsole} && ! %{su9} && ! %{su10}
1393 # add the console helper files
1394 %config(noreplace,missingok) /etc/pam.d/wxconsole
1395 %config(noreplace,missingok) /etc/security/console.apps/wxconsole
1396 /usr/bin/wxconsole
1397 %endif
1398
1399 %if %{wxconsole}
1400 %pre wxconsole
1401 # create the daemon group
1402 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1403 if [ -z "$HAVE_BACULA" ]; then
1404         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1405         echo "The group %{daemon_group} has been added to %{group_file}."
1406         echo "See the manual chapter \"Running Bacula\" for details."
1407 fi
1408
1409 %post wxconsole
1410 # generate passwords if needed
1411 if [ -d /etc/bacula ]; then
1412         cd /etc/bacula
1413         for file in *.conf; do
1414                 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
1415                         need_password=`grep $string $file 2>/dev/null`
1416                         if [ -n "$need_password" ]; then
1417                                 pass=`openssl rand -base64 33`
1418                                 sed "s-$string-$pass-g" $file > $file.new
1419                                 cp -f $file.new $file; rm -f $file.new
1420                         fi
1421                 done
1422         done
1423 fi
1424 %endif
1425
1426 %changelog
1427 * Sun Apr 16 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1428 - add wxconsole package
1429 * Fri Apr 14 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1430 - 1.38.8 release
1431 - dependency update for Mandriva
1432 * Sun Apr 08 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1433 - 1.38.7 release
1434 - remove -n option from useradd scripts
1435 * Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1436 - 1.38.6 release
1437 - fix problem specifying more than one primary group for user bacula
1438 - add build switch to not build gconsole regardless of platform
1439 * Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1440 - add centos3 build tag
1441 - fix link error of static-fd on Mandrake with --disable-nls
1442 * Fri Jan 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1443 - add fc4 dependencies
1444 * Mon Jan 23 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1445 - add SuSE 10.0 build
1446 - remove specific permission in attrib macros
1447 * Sat Jan 21 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1448 - 1.38.5 release
1449 - fix usermode required on suse, suse doesn't have usermode (xsu instead)
1450 - refix compat for _dist on SLES9 which seems to have been removed
1451 - added note regarding Aleksandar's use of specific permissions in attrib macros
1452 - need to review and add specific fc4 build currently using fc3 Requires
1453 * Wed Dec 14 2005 Aleksandar Milivojevic <alex@milivojevic.org>
1454 - 1.38.2 release
1455 - Reorganize files and pre/post sections to remove repetitions
1456 - Always build separate mtx package
1457 - Fix file ownerships for /etc/bacula and Bacula's working dir
1458 * Wed Nov 23 2005 Aleksandar Milivojevic <alex@milivojevic.org>
1459 - Disable GNOME on RH7
1460 * Fri Nov 18 2005 Aleksandar Milivojevic <alex@milivojevic.org>
1461 - Red Hat and look alikes have mtx RPM, do not build/package our version
1462 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1463 - minor edit to _dist for SLES9 compatibility
1464 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1465 - 1.38.0 release
1466 - kern changed location of pdf files and html manual in docs package
1467 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1468 - 1.38.0 release
1469 - add docs (from prebuilt tarball) and rescue packages back in
1470 - remove dvd-freespace and dvd-writepart files, add dvd-handler
1471 - remove 3 of 4 sqlite script patches as not needed
1472 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1473 - changes for 1.38
1474 - remove docs and rescue sections (remove static fd)
1475 - add dvd-freespace and dvd-writepart files
1476 - update depkgs to 22Jun05
1477 - change database update to 8 to 9
1478 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1479 - minor cleanups before 1.38 changes
1480 - add popt and popt-devel build dependencies
1481 - add tetex and tetex-dvips dependencies for doc build
1482 - replace deprecated Copyright tag with License
1483 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1484 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
1485 - conflict with sqlite packages. remove readline dependency.
1486 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1487 - release 1.36.3 update docs
1488 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1489 - add centos4 build tag
1490 - add x86_64 build tag
1491 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1492 - add rhel4 build tag
1493 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
1494 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1495 - add rhel3 build tag
1496 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1497 - fix tray-monitor.conf for noreplace
1498 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1499 - fix distribution check for Fedora and Whitebox
1500 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1501 - add logwatch script
1502 - add dvd scripts
1503 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1504 - add build for Fedora Core 3 (linc now included in ORDit2)
1505 - add mysql4 define for Mandrake 10.1
1506 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1507 - fix {group_file} variable in post scripts
1508 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
1509 - add distribution checking and custom Distribution tag
1510 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1511 - ASSIGNMENT OF COPYRIGHT
1512 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and 
1513 - assigns unto Kern Sibbald, his successors, assigns and personal representatives, 
1514 - all right, title and interest in and to the copyright in this software RPM
1515 - spec file. D. Scott Barninger warrants good title to said copyright, that it is 
1516 - free of all liens, encumbrances or any known claims against said copyright.
1517 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1518 - bug 183 fixes
1519 - thanks to Daniel Widyono
1520 - update description for rescue package to describe cdrom creation
1521 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1522 - update depkgs to 29Oct04
1523 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1524 - add cdrom rescue to bacula-rescue package
1525 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1526 - misc fixes from 1.36.0 suse feedback
1527 - fix situation where sqlite database exists but sqlite has been removed.
1528 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1529 - remove tray-monitor from RH8 build
1530 - fix permissions on tray-monitor files
1531 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1532 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
1533 - change database update to 7 to 8 upgrade,
1534 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
1535 - build in 30Jul04, add freetype dependancy to gnome package.
1536 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1537 - add documentation to console for groupadd
1538 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1539 - add support for running daemons as root.bacula
1540 - correct for change in location of floppy rescue files in 1.35.2
1541 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
1542 - updated depgkgs to 30Jul04
1543 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1544 - really, really fix symlink creation for gconsole
1545 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1546 - fix symlink creation in gconsole post install
1547 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1548 - fixed error in gconsole post script
1549 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1550 - add check for gconsole symlink before trying to create it
1551 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1552 - fix some minor permissions issues on doc files that CVS won't let us fix
1553 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1554 - add pkgconfig to BuildRequires
1555 - clean up gnome1/2 menu entries for appropriate packages
1556 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1557 - tightened up doc distribution
1558 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1559 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
1560 - rpm's horrible bug that prevents nested conditional macros prevents me
1561 - from implementing these 2 separate approaches within the conditionals which
1562 - create the separate server packages.
1563 - the solution adopted is to remove the gnome-console files from the server packages
1564 - so bacula-gconsole is now an add on for both client and server packages.
1565 - this also now allows the server packages to be install on machines without
1566 - an X-server and we can still maintain a single spec file.
1567 - added tests to make sure we have defined platform and database macros.
1568 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1569 - corrected mysql prerequisites for suse
1570 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1571 - replaced all cp commands with cp -p
1572 - removed addition of a+x permissions on gnome-console
1573 - corrected permissions on init scripts
1574 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1575 - corrected creation of sqlite_bindir in install from !mysql to sqlite
1576 -
1577 - various cleanup patches from Michael K. Johnson:
1578 - corrected post install routines for nicer chkconfig
1579 - removed chmod changes in post routines and moved to install section
1580 - removed interactive nature of post routine for rescue package
1581 - added description of building rescue disks to the description of rescue package
1582 - added clean of build root to beginning of install
1583 - removed specifying attr in all file lists
1584 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1585 - added bconsole to client package
1586 - added gconsole package as add-on to client
1587 - removed spurious dependancies on updatedb package (!cut/paste)
1588 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1589 - added updatedb package
1590 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1591 - added postgresql package
1592 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1593 - corrected the if else logic in the dependancy sections
1594 - changes for 1.34 release
1595 - /etc/bacula/console is now /etc/bacula/bconsole
1596 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
1597 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
1598 - /usr/sbin/smtp is now /usr/sbin/bsmtp
1599 - added new /etc/bacula/drop_mysql_database
1600 - added new /etc/bacula/drop_sqlite_database
1601 - added new /etc/bacula/grant_sqlite_privileges
1602 - added new generic bacula database scripts in /etc/bacula
1603 - added pre-install sections to check for database versions older than 6
1604 - added check for /etc/bacula/console.conf and copy to bconsole.conf
1605 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1606 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
1607 - added testing for existing databases before executing any of the database creation scripts
1608 - added defines working_dir and sqlite_bindir in place of hard coded paths
1609 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1610 - added build configuration for SuSE.
1611 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
1612 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1613 - added patch for create_sqlite_database to fix the installed bindir
1614 - added execute of create_sqlite_database to post of sqlite package
1615 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1616 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
1617 - added bacula-fd as Requires for rescue package
1618 - added build tag for Fedora Core 1
1619 - cleaned up dependancies for all builds
1620 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1621 - removed rh_version from package names
1622 - added platform build configuration section to beginning of file
1623 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1624 - removed make_static_bacula script from rescue package install
1625 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1626 - Added define at top of file for depkgs version
1627 - Added rescue sub-package
1628 - Moved requires statements into proper sub-package locations
1629 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1630 - Corrected Requires for Gnome 1.4/2.0 builds
1631 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1632 - Added separate source declaration for depkgs
1633 - added patch for make_catalog_backup script
1634 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1635 - Misc changes to mysql/sqlite build and rh7/8 menu differences
1636 - Added rh_version to sub-package names
1637 - Added installed but missing file /etc/bacula/gconsole
1638 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
1639 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
1640 - Update spec for version 1.31 and combine client
1641 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1642 - Initial spec file