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