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