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