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