2 # Copyright (C) 2000-2006 Kern Sibbald
4 # Platform Build Configuration
6 # basic defines for every build
7 %define _version @VERSION@
9 %define depkgs_version 09Sep07
10 %define _rescuever @VERSION@
11 %define docs_version @VERSION@
13 # any patches for this release
14 # be sure to check the setup section for patch macros
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 #--------------------------------------------------------------------------
21 # third party packagers
22 %define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
23 %{?contrib_packager:%define _packager %{contrib_packager}}
25 Summary: Bacula - The Network Backup Solution
29 Group: System Environment/Daemons
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}
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.
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
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
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
76 %define useradd /usr/sbin/useradd
77 %define groupadd /usr/sbin/groupadd
78 %define usermod /usr/sbin/usermod
80 # platform defines - set one below or define the build_xxx on the command line
83 %{?build_rh7:%define rh7 1}
85 %{?build_rh8:%define rh8 1}
87 %{?build_rh9:%define rh9 1}
90 %{?build_fc1:%define fc1 1}
92 %{?build_fc3:%define fc3 1}
94 %{?build_fc4:%define fc4 1}
96 %{?build_fc5:%define fc5 1}
98 %{?build_fc6:%define fc6 1}
100 %{?build_fc7:%define fc7 1}
101 # Whitebox Enterprise build
103 %{?build_wb3:%define wb3 1}
104 # RedHat Enterprise builds
106 %{?build_rhel3:%define rhel3 1}
107 %{?build_rhel3:%define wb3 1}
109 %{?build_rhel4:%define rhel4 1}
110 %{?build_rhel4:%define fc3 1}
112 %{?build_rhel5:%define rhel5 1}
113 %{?build_rhel5:%define fc6 1}
116 %{?build_centos3:%define centos3 1}
117 %{?build_centos3:%define wb3 1}
119 %{?build_centos4:%define centos4 1}
120 %{?build_centos4:%define fc3 1}
122 %{?build_centos5:%define centos5 1}
123 %{?build_centos5:%define fc6 1}
126 %{?build_sl3:%define sl3 1}
127 %{?build_sl3:%define wb3 1}
129 %{?build_sl4:%define sl4 1}
130 %{?build_sl4:%define fc3 1}
132 %{?build_sl5:%define sl5 1}
133 %{?build_sl5:%define fc6 1}
136 %{?build_su9:%define su9 1}
138 %{?build_su10:%define su10 1}
140 %{?build_su102:%define su102 1}
143 %{?build_mdk:%define mdk 1}
145 %{?build_mdv:%define mdv 1}
146 %{?build_mdv:%define mdk 1}
149 %define client_only 0
150 %{?build_client_only:%define client_only 1}
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.}
159 # set for database support desired or define the build_xxx on the command line
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
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
170 %{?build_mysql5:%define mysql5 1}
171 %{?build_mysql5:%define mysql 1}
173 %{?build_sqlite:%define sqlite 1}
175 %{?build_postgresql:%define postgresql 1}
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.}
184 %define db_backend mysql
187 %define db_backend sqlite
190 %define db_backend postgresql
195 %{?build_x86_64:%define x86_64 1}
197 # check what distribution we are
198 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4} || %{rhel5}
199 %define _dist %(grep Red /etc/redhat-release)
201 %if %{fc1} || %{fc4} || %{fc5} || %{fc6} || %{fc7}
202 %define _dist %(grep Fedora /etc/redhat-release)
204 %if %{centos5} || %{centos4} || %{centos3}
205 %define _dist %(grep CentOS /etc/redhat-release)
207 %if %{sl5} ||%{sl4} || %{sl3}
208 %define _dist %(grep 'Scientific Linux' /etc/redhat-release)
210 %if %{fc3} && ! %{rhel4} && ! %{centos4} && ! %{sl4}
211 %define _dist %(grep Fedora /etc/redhat-release)
213 %if %{wb3} && ! %{rhel3} && ! %{centos3} && ! %{sl3}
214 %define _dist %(grep White /etc/whitebox-release)
216 %if %{su9} || %{su10} || %{su102}
217 %define _dist %(grep -i SuSE /etc/SuSE-release)
220 %define _dist %(grep Mand /etc/mandrake-release)
222 Distribution: %{_dist}
224 # Should we build gconsole, possible only if gtk= >= 2.4 available.
225 # leaving all the BuildRequires and Requires in place below for now.
226 # su10, fc3 and fc4 now nobuild, tray monitor fails to build as of 2.2.1
227 # release as it needs 2.10
230 %if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{su9} || %{su10}
233 %if %{mdk} && ! %{mdv}
237 # specifically disallow gconsole if desired
238 %{?nobuild_gconsole:%define gconsole 0}
240 # Should we build wxconsole, only wxWidgets >=2.6 is supported
241 # currently only SuSE 10 and FC4/FC5
243 %{?build_wxconsole:%define wxconsole 1}
245 # Should we build bat
248 %{?build_bat:%define bat 1}
250 # should we turn on python support
252 %{?build_python:%define python 1}
254 # Mandriva somehow forces the manpage file extension to bz2 rather than gz
256 %define manpage_ext bz2
258 %define manpage_ext gz
261 # for client only build
272 %{expand: %%define gccver %(rpm -q --queryformat %%{version} gcc)}
273 %{expand: %%define gccrel %(rpm -q --queryformat %%{release} gcc)}
275 BuildRequires: gcc, gcc-c++, make, autoconf
276 BuildRequires: ncurses-devel, perl
277 BuildRequires: libstdc++-devel = %{gccver}-%{gccrel}, libxml2-devel, zlib-devel
278 BuildRequires: openssl-devel
280 BuildRequires: python, python-devel
281 %{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
284 BuildRequires: pkgconfig, pango-devel, atk-devel
287 BuildRequires: qt-devel >= 4.2
290 BuildRequires: libtermcap-devel
291 BuildRequires: glibc-devel >= 2.2
294 BuildRequires: termcap
295 BuildRequires: glibc-devel >= 2.3
297 %if %{su9} && %{gconsole}
298 BuildRequires: libgnome >= 2.0
299 BuildRequires: gtk2-devel >= 2.0
300 BuildRequires: libgnomeui-devel >= 2.0
301 BuildRequires: ORBit2-devel
302 BuildRequires: libart_lgpl-devel >= 2.0
303 BuildRequires: libbonobo-devel >= 2.0
304 BuildRequires: libbonoboui-devel >= 2.0
305 BuildRequires: bonobo-activation-devel
306 BuildRequires: gconf2-devel
307 BuildRequires: linc-devel
308 BuildRequires: freetype2-devel
311 BuildRequires: termcap
312 BuildRequires: glibc-devel >= 2.3
314 %if %{su10} && %{gconsole}
315 BuildRequires: libgnome >= 2.12
316 BuildRequires: gtk2-devel >= 2.8
317 BuildRequires: libgnomeui-devel >= 2.12
318 BuildRequires: ORBit2-devel
319 BuildRequires: libart_lgpl-devel >= 2.3
320 BuildRequires: libbonobo-devel >= 2.10
321 BuildRequires: libbonoboui-devel >= 2.10
322 BuildRequires: bonobo-activation-devel
323 BuildRequires: gconf2-devel
324 BuildRequires: freetype2-devel
325 BuildRequires: cairo-devel
326 BuildRequires: fontconfig-devel >= 2.3
327 BuildRequires: gnome-vfs2-devel >= 2.12
328 BuildRequires: libpng-devel
331 BuildRequires: termcap
332 BuildRequires: glibc-devel >= 2.5
334 %if %{su102} && %{gconsole}
335 BuildRequires: libgnome >= 2.16
336 BuildRequires: gtk2-devel >= 2.10
337 BuildRequires: libgnomeui-devel >= 2.16
338 BuildRequires: ORBit2-devel
339 BuildRequires: libart_lgpl-devel >= 2.3
340 BuildRequires: libbonobo-devel >= 2.16
341 BuildRequires: libbonoboui-devel >= 2.16
342 BuildRequires: bonobo-activation-devel
343 BuildRequires: gconf2-devel
344 BuildRequires: freetype2-devel
345 BuildRequires: cairo-devel
346 BuildRequires: fontconfig-devel >= 2.4
347 BuildRequires: gnome-vfs2-devel >= 2.16
348 BuildRequires: libpng-devel
351 BuildRequires: libtermcap-devel
352 BuildRequires: libstdc++-static-devel
353 BuildRequires: glibc-static-devel
354 BuildRequires: glibc-devel >= 2.3
356 %if %{mdk} && !%{mdv} && %{gconsole}
357 BuildRequires: gtk2-devel >= 2.0
358 BuildRequires: libgnomeui2-devel >= 2.0
359 BuildRequires: libORBit2-devel
360 BuildRequires: libart_lgpl-devel >= 2.0
361 BuildRequires: libbonobo2_0-devel
362 BuildRequires: libbonoboui2_0-devel
363 BuildRequires: libbonobo-activation-devel
364 BuildRequires: libGConf2-devel
365 BuildRequires: freetype2-devel
367 %if %{mdv} && %{gconsole}
368 BuildRequires: gtk2-devel >= 2.8
369 BuildRequires: libgnomeui2-devel >= 2.10
370 BuildRequires: libORBit2-devel
371 BuildRequires: libart_lgpl-devel >= 2.3
372 BuildRequires: libbonobo2_0-devel
373 BuildRequires: libbonoboui2_0-devel
374 BuildRequires: libbonobo-activation-devel
375 BuildRequires: libGConf2-devel
376 BuildRequires: freetype2-devel
379 BuildRequires: libtermcap-devel
380 BuildRequires: glibc-devel >= 2.3
382 %if %{fc3} && %{gconsole}
383 BuildRequires: gtk2-devel >= 2.4
384 BuildRequires: libgnomeui-devel >= 2.8
385 BuildRequires: ORBit2-devel
386 BuildRequires: libart_lgpl-devel >= 2.3
387 BuildRequires: libbonobo-devel >= 2.8
388 BuildRequires: libbonoboui-devel >= 2.8
389 BuildRequires: bonobo-activation-devel
390 BuildRequires: GConf2-devel
391 BuildRequires: freetype-devel
394 BuildRequires: libtermcap-devel
395 BuildRequires: glibc-devel >= 2.3
397 %if %{fc4} && %{gconsole}
398 BuildRequires: gtk2-devel >= 2.6
399 BuildRequires: libgnomeui-devel >= 2.10
400 BuildRequires: ORBit2-devel
401 BuildRequires: libart_lgpl-devel >= 2.3
402 BuildRequires: libbonobo-devel >= 2.8
403 BuildRequires: libbonoboui-devel >= 2.8
404 BuildRequires: bonobo-activation-devel
405 BuildRequires: GConf2-devel
406 BuildRequires: freetype-devel
409 BuildRequires: libtermcap-devel
410 BuildRequires: glibc-devel >= 2.4
412 %if %{fc5} && %{gconsole}
413 BuildRequires: gtk2-devel >= 2.8
414 BuildRequires: libgnomeui-devel >= 2.14
415 BuildRequires: ORBit2-devel
416 BuildRequires: libart_lgpl-devel >= 2.3
417 BuildRequires: libbonobo-devel >= 2.14
418 BuildRequires: libbonoboui-devel >= 2.14
419 BuildRequires: GConf2-devel
420 BuildRequires: freetype-devel
423 BuildRequires: libtermcap-devel
424 BuildRequires: glibc-devel >= 2.5
426 %if %{fc6} && %{gconsole}
427 BuildRequires: gtk2-devel >= 2.10
428 BuildRequires: libgnomeui-devel >= 2.16
429 BuildRequires: ORBit2-devel
430 BuildRequires: libart_lgpl-devel >= 2.3
431 BuildRequires: libbonobo-devel >= 2.16
432 BuildRequires: libbonoboui-devel >= 2.16
433 BuildRequires: GConf2-devel
434 BuildRequires: freetype-devel
437 BuildRequires: libtermcap-devel
438 BuildRequires: glibc-devel >= 2.5
440 %if %{fc7} && %{gconsole}
441 BuildRequires: gtk2-devel >= 2.10
442 BuildRequires: libgnomeui-devel >= 2.18
443 BuildRequires: ORBit2-devel
444 BuildRequires: libart_lgpl-devel >= 2.3
445 BuildRequires: libbonobo-devel >= 2.18
446 BuildRequires: libbonoboui-devel >= 2.18
447 BuildRequires: GConf2-devel
448 BuildRequires: freetype-devel
450 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7}
451 BuildRequires: libtermcap-devel
452 BuildRequires: glibc-devel >= 2.3
454 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7} && %{gconsole}
455 BuildRequires: gtk2-devel >= 2.0
456 BuildRequires: libgnomeui-devel >= 2.0
457 BuildRequires: ORBit2-devel
458 BuildRequires: libart_lgpl-devel >= 2.0
459 BuildRequires: libbonobo-devel >= 2.0
460 BuildRequires: libbonoboui-devel >= 2.0
461 BuildRequires: bonobo-activation-devel
462 BuildRequires: GConf2-devel
463 BuildRequires: linc-devel
464 BuildRequires: freetype-devel
467 %if %{mysql} && ! %{mysql4} && ! %{mysql5}
468 BuildRequires: mysql-devel >= 3.23
471 %if %{mysql} && %{mysql4}
472 BuildRequires: mysql-devel >= 4.0
475 %if %{mysql} && %{mysql5}
476 BuildRequires: mysql-devel >= 5.0
479 %if %{postgresql} && %{wb3}
480 BuildRequires: rh-postgresql-devel >= 7
483 %if %{postgresql} && ! %{wb3}
484 BuildRequires: postgresql-devel >= 7
488 BuildRequires: wxGTK-devel >= 2.6
512 Summary: Bacula - The Network Backup Solution
513 Group: System Environment/Daemons
514 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
515 Conflicts: bacula-client
516 Obsoletes: bacula-rescue
518 %if %{su9} || %{su10} || %{su102}
522 Requires: ncurses, libstdc++, zlib, openssl, mtx
525 Requires: glibc >= 2.2
528 %if %{su9} || %{su10}
529 Requires: glibc >= 2.3
533 Requires: glibc >= 2.5
536 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{fc5} && ! %{fc6} && ! %{fc7}
537 Requires: glibc >= 2.3
541 Requires: glibc >= 2.4
545 Requires: glibc >= 2.5
549 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4} && ! %{mysql5}
550 Requires: mysql >= 3.23
551 Requires: mysql-server >= 3.23
553 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{mdk} && %{mysql4}
554 Requires: mysql >= 4.0
555 Requires: mysql-server >= 4.0
557 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && %{mysql5}
558 Requires: mysql >= 5.0
559 Requires: mysql-server >= 5.0
562 %if %{mysql} && %{su9} && ! %{mysql4}
563 Requires: mysql >= 3.23
564 Requires: mysql-client >= 3.23
566 %if %{mysql} && %{su9} && %{mysql4}
567 Requires: mysql >= 4.0
568 Requires: mysql-client >= 4.0
570 %if %{mysql} && %{su10} && %{mysql4}
571 Requires: mysql >= 4.0
572 Requires: mysql-client >= 4.0
574 %if %{mysql} && %{su10} && %{mysql5}
575 Requires: mysql >= 5.0
576 Requires: mysql-client >= 5.0
578 %if %{mysql} && %{su102} && %{mysql5}
579 Requires: mysql >= 5.0
580 Requires: mysql-client >= 5.0
583 %if %{mysql} && %{mdk} && ! %{mysql4}
584 Requires: mysql >= 3.23
585 Requires: mysql-client >= 3.23
587 %if %{mysql} && %{mdk} && %{mysql4}
588 Requires: mysql >= 4.0
589 Requires: mysql-client >= 4.0
592 %if %{postgresql} && %{wb3}
593 Requires: rh-postgresql >= 7
594 Requires: rh-postgresql-server >= 7
596 %if %{postgresql} && ! %{wb3}
597 Requires: postgresql >= 7
598 Requires: postgresql-server >= 7
608 %description postgresql
612 Requires: python >= %{pyver}
626 This build requires MySQL to be installed separately as the catalog database.
629 This build requires PostgreSQL to be installed separately as the catalog database.
632 This build incorporates sqlite as the catalog database, statically compiled.
635 This build includes python scripting support.
640 Summary: Bacula - The Network Backup Solution
641 Group: System Environment/Daemons
645 This is Bacula's version of mtx tape utilities for Linux distributions that
646 do not provide their own mtx package
650 Summary: Bacula - The Network Backup Solution
651 Group: System Environment/Daemons
653 Conflicts: bacula-mysql
654 Conflicts: bacula-sqlite
655 Conflicts: bacula-postgresql
656 Obsoletes: bacula-rescue
658 %if %{su9} || %{su10} || %{su102}
662 Requires: libstdc++, zlib, openssl
665 Requires: glibc >= 2.2
668 %if %{su9} || %{su10}
669 Requires: glibc >= 2.3
673 Requires: glibc >= 2.5
676 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{fc5} && ! %{fc6}
677 Requires: glibc >= 2.3
681 Requires: glibc >= 2.4
685 Requires: glibc >= 2.5
690 Requires: python >= %{pyver}
704 This is the File daemon (Client) only package. It includes the command line
707 This build includes python scripting support.
713 Summary: Bacula - The Network Backup Solution
714 Group: System Environment/Daemons
716 %description updatedb
727 This package installs scripts for updating older versions of the bacula
733 Summary: Bacula - The Network Backup Solution
734 Group: System Environment/Daemons
735 Requires: atk, libstdc++, zlib, pango, libxml2, bacula-fd, openssl
738 %if %{gconsole} && %{su9}
739 Requires: gtk2 >= 2.0
740 Requires: libgnome >= 2.0
741 Requires: libgnomeui >= 2.0
742 Requires: glibc >= 2.3
744 Requires: libart_lgpl >= 2.0
745 Requires: libbonobo >= 2.0
746 Requires: libbonoboui >= 2.0
747 Requires: bonobo-activation
752 %if %{gconsole} && %{su10}
753 Requires: gtk2 >= 2.8
754 Requires: libgnome >= 2.12
755 Requires: libgnomeui >= 2.12
756 Requires: glibc >= 2.3
758 Requires: libart_lgpl >= 2.3
759 Requires: libbonobo >= 2.10
760 Requires: libbonoboui >= 2.10
761 Requires: bonobo-activation
765 Requires: fontconfig >= 2.3
766 Requires: gnome-vfs2 >= 2.12
769 %if %{gconsole} && %{su102}
770 Requires: gtk2 >= 2.10
771 Requires: libgnome >= 2.16
772 Requires: libgnomeui >= 2.16
773 Requires: glibc >= 2.5
775 Requires: libart_lgpl >= 2.3
776 Requires: libbonobo >= 2.16
777 Requires: libbonoboui >= 2.16
778 Requires: bonobo-activation
782 Requires: fontconfig >= 2.4
783 Requires: gnome-vfs2 >= 2.16
786 %if %{gconsole} && %{mdk} && !%{mdv}
787 Requires: gtk2 >= 2.0
788 Requires: libgnomeui2
789 Requires: glibc >= 2.3
791 Requires: libart_lgpl >= 2.0
792 Requires: libbonobo >= 2.0
793 Requires: libbonoboui >= 2.0
797 %if %{gconsole} && %{mdv}
798 Requires: gtk2 >= 2.8
799 Requires: libgnomeui2
800 Requires: glibc >= 2.3
802 Requires: libart_lgpl >= 2.3
803 Requires: libbonobo >= 2.10
804 Requires: libbonoboui >= 2.10
808 %if %{gconsole} && %{fc3}
809 Requires: gtk2 >= 2.4
810 Requires: libgnomeui >= 2.8
811 Requires: glibc >= 2.3
813 Requires: libart_lgpl >= 2.3
814 Requires: libbonobo >= 2.8
815 Requires: libbonoboui >= 2.8
816 Requires: bonobo-activation
820 %if %{gconsole} && %{fc4}
821 Requires: gtk2 >= 2.6
822 Requires: libgnomeui >= 2.10
823 Requires: glibc >= 2.3
825 Requires: libart_lgpl >= 2.3
826 Requires: libbonobo >= 2.8
827 Requires: libbonoboui >= 2.8
828 Requires: bonobo-activation
832 %if %{gconsole} && %{fc5}
833 Requires: gtk2 >= 2.8
834 Requires: libgnomeui >= 2.14
835 Requires: glibc >= 2.4
837 Requires: libart_lgpl >= 2.3
838 Requires: libbonobo >= 2.14
839 Requires: libbonoboui >= 2.14
843 %if %{gconsole} && %{fc6}
844 Requires: gtk2 >= 2.10
845 Requires: libgnomeui >= 2.16
846 Requires: glibc >= 2.5
848 Requires: libart_lgpl >= 2.3
849 Requires: libbonobo >= 2.16
850 Requires: libbonoboui >= 2.16
854 %if %{gconsole} && %{fc7}
855 Requires: gtk2 >= 2.10
856 Requires: libgnomeui >= 2.18
857 Requires: glibc >= 2.5
859 Requires: libart_lgpl >= 2.3
860 Requires: libbonobo >= 2.18
861 Requires: libbonoboui >= 2.18
865 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7}
866 Requires: gtk2 >= 2.0
867 Requires: libgnomeui >= 2.0
868 Requires: glibc >= 2.3
870 Requires: libart_lgpl >= 2.0
871 Requires: libbonobo >= 2.0
872 Requires: libbonoboui >= 2.0
873 Requires: bonobo-activation
878 %if %{gconsole} && %{su9}
881 %if %{gconsole} && %{su10}
884 %if %{gconsole} && %{su102}
887 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102}
892 %description gconsole
903 This is the Gnome Console package. It is an add-on to the client or
909 Summary: Bacula - The Network Backup Solution
910 Group: System Environment/Daemons
911 Requires: wxGTK >= 2.6, libstdc++, openssl
914 %if %{wxconsole} && %{su10}
915 Requires: gtk2 >= 2.8
918 %if %{wxconsole} && %{su102}
919 Requires: gtk2 >= 2.10
922 %if %{wxconsole} && %{fc3}
923 Requires: gtk2 >= 2.4
926 %if %{wxconsole} && %{fc4}
927 Requires: gtk2 >= 2.6
930 %if %{wxconsole} && %{fc5}
931 Requires: gtk2 >= 2.8
934 %if %{wxconsole} && %{fc6}
935 Requires: gtk2 >= 2.10
938 %if %{wxconsole} && %{fc7}
939 Requires: gtk2 >= 2.10
943 %description wxconsole
954 This is the WXWindows Console package. It is an add-on to the client or
960 Summary: Bacula - The Network Backup Solution
961 Group: System Environment/Daemons
964 %if %{bat} && %{su10}
966 Requires: glibc >= 2.4
976 %if %{bat} && %{su102}
978 Requires: glibc >= 2.5
990 Requires: glibc >= 2.4
1000 %if %{bat} && %{fc6}
1002 Requires: glibc >= 2.5
1003 Requires: fontconfig
1012 %if %{bat} && %{fc7}
1014 Requires: glibc >= 2.5
1015 Requires: fontconfig
1036 This is the Bacula Administration Tool package. It is an add-on to
1037 the client or server packages.
1050 %if %{su9} || %{su10} || %{su102}
1051 export LDFLAGS="${LDFLAGS} -L/usr/lib/termcap"
1059 %if ! %{client_only}
1067 # patches for the bundled sqlite scripts
1069 # patch the make_sqlite_tables script for installation bindir
1070 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
1072 # patch the create_sqlite_database script for installation bindir
1073 # not necessary after 1.39.26 no longer references sqlite binary
1074 #patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
1076 # patch the make_catalog_backup script for installation bindir
1077 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
1079 # patch the update_sqlite_tables script for installation bindir
1080 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
1082 # patch the bacula-dir init script to remove sqlite service
1083 %if %{sqlite} && %{su9}
1084 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1086 %if %{sqlite} && %{su10}
1087 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1089 %if %{sqlite} && %{su102}
1090 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1093 # 64 bit lib location hacks
1094 # as of 1.39.18 it should not be necessary to enable x86_64 as configure is
1095 # reported to be fixed to properly detect lib locations.
1097 export LDFLAGS="${LDFLAGS} -L/usr/lib64"
1099 %if %{mysql} && %{x86_64}
1100 export LDFLAGS="${LDFLAGS} -L/usr/lib64/mysql"
1102 %if %{python} && %{x86_64}
1103 export LDFLAGS="${LDFLAGS} -L/usr/lib64/python%{pyver}"
1108 --sbindir=/usr/sbin \
1109 --sysconfdir=%{sysconf_dir} \
1110 --with-scriptdir=%{script_dir} \
1111 --with-working-dir=%{working_dir} \
1112 --with-pid-dir=%{pid_dir} \
1113 --enable-smartalloc \
1114 --enable-client-only \
1124 --sbindir=/usr/sbin \
1125 --sysconfdir=%{sysconf_dir} \
1126 --with-scriptdir=%{script_dir} \
1127 --with-working-dir=%{working_dir} \
1128 --with-pid-dir=%{pid_dir} \
1129 --enable-smartalloc \
1133 %if %{gconsole} && ! %{rh8}
1134 --enable-tray-monitor \
1140 --with-sqlite=${cwd}/%{depkgs}/sqlite \
1146 --enable-bwx-console \
1150 --with-qwt=${cwd}/%{depkgs}/qwt \
1156 --enable-client-only \
1158 %if %{rh7} || %{rh8} || %{rh9} || %{fc1} || %{fc3} || %{wb3}
1159 --disable-batch-insert \
1161 --mandir=%{_mandir} \
1162 --with-subsys-dir=/var/lock/subsys \
1163 --with-dir-user=%{director_daemon_user} \
1164 --with-dir-group=%{daemon_group} \
1165 --with-sd-user=%{storage_daemon_user} \
1166 --with-sd-group=%{storage_daemon_group} \
1167 --with-fd-user=%{file_daemon_user} \
1168 --with-fd-group=%{daemon_group} \
1169 --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
1170 --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
1171 --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
1172 --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
1173 --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
1174 --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
1182 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1183 mkdir -p $RPM_BUILD_ROOT/etc/init.d
1184 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
1185 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/logfiles
1186 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/services
1187 mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
1188 mkdir -p $RPM_BUILD_ROOT%{script_dir}/updatedb
1190 %if %{gconsole} || %{wxconsole} || %{bat}
1191 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
1192 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
1195 %if %{gconsole} || %{wxconsole} || %{bat}
1196 %define usermode_iftrick 1
1198 %define usermode_iftrick 0
1201 %if %{usermode_iftrick} && ! %{su9} && ! %{su10} && ! %{su102}
1202 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
1203 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
1204 mkdir -p $RPM_BUILD_ROOT/usr/bin
1208 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
1212 prefix=$RPM_BUILD_ROOT/usr \
1213 sbindir=$RPM_BUILD_ROOT/usr/sbin \
1214 sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1215 scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1216 working_dir=$RPM_BUILD_ROOT%{working_dir} \
1217 piddir=$RPM_BUILD_ROOT%{pid_dir} \
1218 mandir=$RPM_BUILD_ROOT%{_mandir} \
1221 %if ! %{client_only}
1224 prefix=$RPM_BUILD_ROOT/usr \
1225 sbindir=$RPM_BUILD_ROOT/usr/sbin \
1226 sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1227 scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1228 working_dir=$RPM_BUILD_ROOT%{working_dir} \
1229 piddir=$RPM_BUILD_ROOT%{pid_dir} \
1230 mandir=$RPM_BUILD_ROOT%{_mandir} \
1235 # make install in manpages installs _everything_ shotgun style
1236 # so now delete what we will not be packaging
1238 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
1241 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bat.1.%{manpage_ext}
1244 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
1245 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
1248 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bsmtp.1.%{manpage_ext}
1249 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1250 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1251 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bcopy.8.%{manpage_ext}
1252 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bextract.8.%{manpage_ext}
1253 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bls.8.%{manpage_ext}
1254 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bscan.8.%{manpage_ext}
1255 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/btape.8.%{manpage_ext}
1256 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/dbcheck.8.%{manpage_ext}
1259 # fixme - make installs the mysql scripts for sqlite build
1261 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1262 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1263 rm -f $RPM_BUILD_ROOT%{script_dir}/grant_mysql_privileges
1266 # fixme - make installs the mysql scripts for postgresql build
1268 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1269 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1272 # fixme - make installs gconsole script for build without gconsole
1274 rm -f $RPM_BUILD_ROOT%{script_dir}/gconsole
1277 rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
1279 # install the init scripts
1280 %if %{su9} || %{su10} || %{su102}
1281 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1282 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1283 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1286 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1287 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1288 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1290 %if ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk}
1291 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1292 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1293 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1295 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
1297 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1298 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1301 # install the menu stuff
1302 %if %{gconsole} && %{su9}
1303 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1304 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1305 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1306 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1308 %if %{gconsole} && %{su10}
1309 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1310 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1311 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1312 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1314 %if %{gconsole} && %{su102}
1315 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1316 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1317 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1318 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1320 %if %{wxconsole} && %{su10}
1321 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1322 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1324 %if %{wxconsole} && %{su102}
1325 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1326 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1328 %if %{bat} && %{su102}
1329 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1330 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1332 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{fc6} || %{fc7} || %{mdk}
1337 %if %{gconsole} && %{iftrick}
1338 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1339 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1340 cp -p scripts/bgnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bgnome-console
1341 cp -p scripts/bgnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/bgnome-console
1342 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bgnome-console
1344 %if %{gconsole} && ! %{rh8}
1345 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1346 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1348 %if %{wxconsole} && %{iftrick}
1349 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1350 cp -p scripts/wxconsole.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1351 cp -p scripts/wxconsole.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bwx-console
1352 cp -p scripts/wxconsole.pamd $RPM_BUILD_ROOT/etc/pam.d/bwx-console
1353 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bwx-console
1355 %if %{bat} && %{iftrick}
1356 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1357 cp -p scripts/bat.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1358 cp -p scripts/bat.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bat
1359 cp -p scripts/bat.pamd $RPM_BUILD_ROOT/etc/pam.d/bat
1360 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bat
1365 cp -p %{depkgs}/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
1366 cp -p %{depkgs}/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
1367 cp -p %{depkgs}/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
1370 # install the logrotate file
1371 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
1373 # install the updatedb scripts
1374 cp -p updatedb/* $RPM_BUILD_ROOT%{script_dir}/updatedb/
1376 # install the logwatch scripts
1377 %if ! %{client_only}
1378 cp -p scripts/logwatch/bacula $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1379 cp -p scripts/logwatch/logfile.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1380 cp -p scripts/logwatch/services.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1381 chmod 755 $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1382 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1383 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1386 # install the rescue files
1387 mkdir $RPM_BUILD_ROOT%{sysconf_dir}/rescue
1388 cp -p %{_rescuesrc}/Makefile* $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1389 cp -p %{_rescuesrc}/README $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1390 cp -p %{_rescuesrc}/configure $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1391 cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1392 cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1393 cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1394 touch $RPM_BUILD_ROOT%{sysconf_dir}/rescue/linux/cdrom/rpm_release
1395 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT%{sysconf_dir}/rescue/linux/cdrom/bacula/bin/bacula-fd
1396 rm -f src/filed/static-bacula-fd
1398 # install bat since make doesn't at the moment
1400 cp -p src/qt-console/bat $RPM_BUILD_ROOT/usr/sbin/bat
1401 cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
1404 # now clean up permissions that are left broken by the install
1405 %if ! %{client_only}
1406 chmod o-r $RPM_BUILD_ROOT%{script_dir}/query.sql
1408 chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
1409 %if %{gconsole} && ! %{rh8}
1410 chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
1411 chmod 644 $RPM_BUILD_ROOT%{sysconf_dir}/tray-monitor.conf
1414 # fix me - building enable-client-only installs files not included in bacula-client package
1416 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula
1417 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-dir
1418 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-sd
1419 rm -f $RPM_BUILD_ROOT%{script_dir}/disk-changer
1420 rm -f $RPM_BUILD_ROOT%{script_dir}/dvd-handler
1421 rm -f $RPM_BUILD_ROOT%{script_dir}/mtx-changer
1422 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1423 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1424 rm -rf $RPM_BUILD_ROOT%{script_dir}/updatedb
1428 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1429 rm -rf $RPM_BUILD_DIR/%{name}-docs-%{docs_version}
1430 rm -rf $RPM_BUILD_DIR/%{name}-rescue-%{_rescuever}
1431 rm -rf $RPM_BUILD_DIR/depkgs
1432 rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
1435 # MySQL specific files
1437 %defattr(-, root, root)
1438 %attr(-, root, %{daemon_group}) %{script_dir}/create_mysql_database
1439 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_database
1440 %attr(-, root, %{daemon_group}) %{script_dir}/make_mysql_tables
1441 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_tables
1442 %attr(-, root, %{daemon_group}) %{script_dir}/update_mysql_tables
1443 %attr(-, root, %{daemon_group}) %{script_dir}/grant_mysql_privileges
1444 %attr(-, root, %{daemon_group}) %{script_dir}/startmysql
1445 %attr(-, root, %{daemon_group}) %{script_dir}/stopmysql
1450 %defattr(-,root,root)
1451 %attr(-, root, %{daemon_group}) %{script_dir}/create_sqlite_database
1452 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite_database
1453 %attr(-, root, %{daemon_group}) %{script_dir}/grant_sqlite_privileges
1454 %attr(-, root, %{daemon_group}) %{script_dir}/make_sqlite_tables
1455 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite_tables
1456 %attr(-, root, %{daemon_group}) %{script_dir}/update_sqlite_tables
1457 %{sqlite_bindir}/libsqlite.a
1458 %{sqlite_bindir}/sqlite.h
1459 %{sqlite_bindir}/sqlite
1464 %defattr(-,root,root)
1465 %attr(-, root, %{daemon_group}) %{script_dir}/create_postgresql_database
1466 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_database
1467 %attr(-, root, %{daemon_group}) %{script_dir}/make_postgresql_tables
1468 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_tables
1469 %attr(-, root, %{daemon_group}) %{script_dir}/update_postgresql_tables
1470 %attr(-, root, %{daemon_group}) %{script_dir}/grant_postgresql_privileges
1473 # The rest is DB backend independent
1474 %if ! %{client_only}
1475 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1476 %attr(-, root, %{daemon_group}) %{script_dir}/bacula
1477 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1478 %attr(-, root, %{daemon_group}) %{script_dir}/create_bacula_database
1479 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_database
1480 %attr(-, root, %{daemon_group}) %{script_dir}/grant_bacula_privileges
1481 %attr(-, root, %{daemon_group}) %{script_dir}/make_bacula_tables
1482 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_tables
1483 %attr(-, root, %{daemon_group}) %{script_dir}/update_bacula_tables
1484 %attr(-, root, %{daemon_group}) %{script_dir}/make_catalog_backup
1485 %attr(-, root, %{daemon_group}) %{script_dir}/delete_catalog_backup
1486 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1487 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1488 %attr(-, root, %{daemon_group}) %{sysconf_dir}/rescue
1489 %attr(-, root, %{daemon_group}) %{script_dir}/disk-changer
1490 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-dir
1491 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
1492 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-sd
1493 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
1494 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
1495 %attr(-, root, %{storage_daemon_group}) %{script_dir}/dvd-handler
1496 %attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
1497 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
1499 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1500 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1502 /etc/logrotate.d/bacula
1503 /etc/log.d/scripts/services/bacula
1504 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-dir.conf
1505 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1506 %attr(-, root, %{storage_daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-sd.conf
1507 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1508 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
1509 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/services/bacula.conf
1510 %attr(-, root, %{daemon_group}) %config(noreplace) %{script_dir}/query.sql
1512 %attr(-, %{storage_daemon_user}, %{daemon_group}) %dir %{working_dir}
1514 /usr/sbin/bacula-dir
1522 /usr/sbin/btraceback
1528 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1529 %{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1530 %{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1531 %{_mandir}/man8/bacula.8.%{manpage_ext}
1532 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1533 %{_mandir}/man8/bcopy.8.%{manpage_ext}
1534 %{_mandir}/man8/bextract.8.%{manpage_ext}
1535 %{_mandir}/man8/bls.8.%{manpage_ext}
1536 %{_mandir}/man8/bscan.8.%{manpage_ext}
1537 %{_mandir}/man8/btape.8.%{manpage_ext}
1538 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1539 %{_mandir}/man8/dbcheck.8.%{manpage_ext}
1540 %{_mandir}/man1/bsmtp.1.%{manpage_ext}
1545 # test for bacula database older than version 9
1546 # note: this ASSUMES no password has been set for bacula database
1547 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1552 # test for bacula database older than version 9
1553 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
1554 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1559 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1562 %if ! %{client_only}
1563 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "9" ]; then
1564 echo "This bacula upgrade will update a bacula database from version 9 to 10."
1565 echo "You appear to be running database version $DB_VER. You must first update"
1566 echo "your database to version 9 and then install this upgrade. The alternative"
1567 echo "is to use %{script_dir}/drop_%{db_backend}_tables to delete all your your current"
1568 echo "catalog information, then do the upgrade. Information on updating a"
1569 echo "database older than version 9 can be found in the release notes."
1578 %if ! %{client_only}
1579 # check for and copy %{sysconf_dir}/console.conf to bconsole.conf
1580 if [ -s %{sysconf_dir}/console.conf ];then
1581 cp -p %{sysconf_dir}/console.conf %{sysconf_dir}/bconsole.conf
1584 # create the daemon users and groups
1585 # first create the groups if they don't exist
1586 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1587 if [ -z "$HAVE_BACULA" ]; then
1588 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1589 echo "The group %{daemon_group} has been added to %{group_file}."
1590 echo "See the manual chapter \"Running Bacula\" for details."
1592 HAVE_BACULA=`grep %{storage_daemon_group} %{group_file} 2>/dev/null`
1593 if [ -z "$HAVE_BACULA" ]; then
1594 %{groupadd} -r %{storage_daemon_group} > /dev/null 2>&1
1595 echo "The group %{storage_daemon_group} has been added to %{group_file}."
1596 echo "See the manual chapter \"Running Bacula\" for details."
1598 # now create the users if they do not exist
1599 # we do not use the -g option allowing the primary group to be set to system default
1600 # this will be a unique group on redhat type systems or the group users on some systems
1601 HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
1602 if [ -z "$HAVE_BACULA" ]; then
1603 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{storage_daemon_group} -M -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
1604 echo "The user %{storage_daemon_user} has been added to %{user_file}."
1605 echo "See the manual chapter \"Running Bacula\" for details."
1607 HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
1608 if [ -z "$HAVE_BACULA" ]; then
1609 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
1610 echo "The user %{director_daemon_user} has been added to %{user_file}."
1611 echo "See the manual chapter \"Running Bacula\" for details."
1613 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1614 if [ -z "$HAVE_BACULA" ]; then
1615 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1616 echo "The user %{file_daemon_user} has been added to %{user_file}."
1617 echo "See the manual chapter \"Running Bacula\" for details."
1619 # now we add the supplementary groups, this is ok to call even if the users already exist
1620 # we only do this if the user is NOT root
1621 IS_ROOT=%{director_daemon_user}
1622 if [ "$IS_ROOT" != "root" ]; then
1623 %{usermod} -G %{daemon_group} %{director_daemon_user}
1625 IS_ROOT=%{storage_daemon_user}
1626 if [ "$IS_ROOT" != "root" ]; then
1627 %{usermod} -G %{daemon_group},%{storage_daemon_group} %{storage_daemon_user}
1629 IS_ROOT=%{file_daemon_user}
1630 if [ "$IS_ROOT" != "root" ]; then
1631 %{usermod} -G %{daemon_group} %{file_daemon_user}
1645 %if ! %{client_only}
1647 if [ "$1" -ge 1 ] ; then
1648 /sbin/chkconfig --add bacula-dir
1649 /sbin/chkconfig --add bacula-fd
1650 /sbin/chkconfig --add bacula-sd
1655 # test for an existing database
1656 # note: this ASSUMES no password has been set for bacula database
1657 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1659 # grant privileges and create tables if they do not exist
1660 if [ -z "$DB_VER" ]; then
1661 echo "Hmm, doesn't look like you have an existing database."
1662 echo "Granting privileges for MySQL user bacula..."
1663 %{script_dir}/grant_mysql_privileges
1664 echo "Creating MySQL bacula database..."
1665 %{script_dir}/create_mysql_database
1666 echo "Creating bacula tables..."
1667 %{script_dir}/make_mysql_tables
1669 # check to see if we need to upgrade a 1.38 or lower database
1670 elif [ "$DB_VER" -lt "10" ]; then
1671 echo "This release requires an upgrade to your bacula database."
1672 echo "Backing up your current database..."
1673 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1674 echo "Upgrading bacula database ..."
1675 %{script_dir}/update_mysql_tables
1676 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1682 # test for an existing database
1683 if [ -s %{working_dir}/bacula.db ]; then
1684 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1685 # check to see if we need to upgrade a 1.38 or lower database
1686 if [ "$DB_VER" -lt "10" ] && [ "$DB_VER" -ge "9" ]; then
1687 echo "This release requires an upgrade to your bacula database."
1688 echo "Backing up your current database..."
1689 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1690 echo "Upgrading bacula database ..."
1691 %{script_dir}/update_sqlite_tables
1692 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1695 # create the database and tables
1696 echo "Hmm, doesn't look like you have an existing database."
1697 echo "Creating SQLite database..."
1698 %{script_dir}/create_sqlite_database
1699 chown %{director_daemon_user}.%{daemon_group} %{working_dir}/bacula.db
1700 echo "Creating the SQLite tables..."
1701 %{script_dir}/make_sqlite_tables
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`
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
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"
1732 %if ! %{client_only}
1733 # generate passwords if needed
1734 if [ -d %{sysconf_dir} ]; then
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
1759 %if ! %{client_only}
1762 /sbin/chkconfig --del bacula-dir
1763 /sbin/chkconfig --del bacula-fd
1764 /sbin/chkconfig --del bacula-sd
1769 %if ! %{client_only}
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}
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
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
1796 /etc/logrotate.d/bacula
1798 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1799 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1801 %attr(-, root, %{daemon_group}) %dir %{working_dir}
1804 /usr/sbin/btraceback
1805 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1806 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
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}
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."
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."
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}
1839 if [ "$1" -ge 1 ] ; then
1840 /sbin/chkconfig --add bacula-fd
1843 # generate passwords if needed
1844 if [ -d %{sysconf_dir} ]; then
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
1861 /sbin/chkconfig --del bacula-fd
1864 %if ! %{client_only}
1866 %defattr(-,root,%{daemon_group})
1867 %{script_dir}/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."
1879 echo "The database update scripts were installed to %{script_dir}/updatedb"
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}
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}
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
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."
1920 # generate passwords if needed
1921 if [ -d %{sysconf_dir} ]; then
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
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}
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
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."
1965 # generate passwords if needed
1966 if [ -d %{sysconf_dir} ]; then
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
1983 %defattr(-,root,root)
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}
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
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."
2010 # generate passwords if needed
2011 if [ -d %{sysconf_dir} ]; then
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
2027 * Mon Oct 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2028 - correct ownership when creating sqlite db file in post script
2029 * Sun Sep 16 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2030 - fix disable-batch-insert
2031 * Fri Sep 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2033 - turn off gconsole build for fc3, tray monitor fails to build
2034 - add new files for mtx package (09Sep07 depkgs update)
2035 * Sat Sep 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2036 - add --disable-batch-insert for older platforms
2037 - add build targets for rhel5 and clones
2038 * Mon Sep 03 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2040 - turn off gconsole build for su10 & fc4, tray monitor fails to build
2041 * Sat Jul 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2042 - 2.1.26 add make of qwt in depkgs for bat
2043 * Sat Jun 02 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2044 - upgrade Qt requirement for bat to 4.2
2045 * Sun May 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2046 - add fc7 build target
2047 * Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2049 - gnome-console now bgnome-console
2050 - wxconsole now bwx-console
2051 - add build option for bat
2052 * Sat Apr 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2053 - merge Otto Mueller's patch but keep script dir set to /etc/bacula
2054 - add build tag for Scientific Linux per Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk>
2055 * Tue Mar 27 2007 Otto Mueller <otto.mueller@bundestag.de>
2056 - adjust directory locations for FHS-compatibility
2057 sysconf_dir (/etc/bacula), script_dir (/usr/lib/bacula),
2058 working_dir (/var/lib/bacula) and pid_dir (/var/run)
2059 * Mon Feb 26 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2060 - add SuSE 10.2 target
2061 * Sat Jan 20 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2063 - set query.sql as config file
2065 * Sun Jan 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2067 - change determination of gcc version per patch from Marc Hennes
2068 - move BuildRequire for atk-devel to gnome only builds
2070 * Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2072 * Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2073 - 1.39.26 remove create_sqlite_database.in.patch
2074 * Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2075 - change ownership of working_dir on server packages to bacula.bacula so that
2076 - bacula-sd can create bootstrap files
2077 * Sat Sep 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2078 - 1.39.22 remove separate cd and make of manpages the main Makefile does it now
2079 * Sun Aug 06 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2080 - fix manpages file extension for mdk
2081 * Sat Aug 05 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2082 - bug 648 re-enable and update sqlite patches
2086 - lock out gconsole build for gtk+ < 2.4
2087 * Mon Jul 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2088 - move pango-devel BuildRequires into gconsole only build
2089 * Sat Jul 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2090 - add provides and conflicts for standard suse packages
2091 - add third party packager tag support
2092 - add build_client_only tag
2093 - remove bsmtp from client package
2094 - add bacula-ctl-fd to client package
2095 * Thu Jul 13 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2096 - fix directory creation when wxconsole and not gconsole
2097 * Tue Jul 04 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2098 - add check to buildrequires to make sure libstdc++ version matches gcc
2099 * Mon Jul 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2100 - add python build support
2101 - fix LDFLAGS declarations
2102 * Sun Jul 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2103 - add requires for standard compiler toolchain
2104 - move version and release tags up
2106 - add docs_version tag
2107 * Sat Jul 01 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2108 - update rescuever to 1.8.6
2109 * Sun Jun 25 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2110 - update depkgs to 25Jun06
2111 - add mysql5 build tag
2112 * Mon Jun 12 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2113 - 1.38.10 bump rescue version
2114 * Sun Jun 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2115 - fix usermod statements
2117 * Thu Apr 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2118 - add -g param back to useradd statements Bug 605
2119 * Mon Apr 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2120 - redundant code cleanup
2121 * Sun Apr 16 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2122 - add wxconsole package
2123 * Fri Apr 14 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2125 - dependency update for Mandriva
2126 * Sun Apr 08 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2128 - remove -n option from useradd scripts
2129 * Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2131 - fix problem specifying more than one primary group for user bacula
2132 - add build switch to not build gconsole regardless of platform
2133 * Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2134 - add centos3 build tag
2135 - fix link error of static-fd on Mandrake with --disable-nls
2136 * Fri Jan 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2137 - add fc4 dependencies
2138 * Mon Jan 23 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2139 - add SuSE 10.0 build
2140 - remove specific permission in attrib macros
2141 * Sat Jan 21 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2143 - fix usermode required on suse, suse doesn't have usermode (xsu instead)
2144 - refix compat for _dist on SLES9 which seems to have been removed
2145 - added note regarding Aleksandar's use of specific permissions in attrib macros
2146 - need to review and add specific fc4 build currently using fc3 Requires
2147 * Wed Dec 14 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2149 - Reorganize files and pre/post sections to remove repetitions
2150 - Always build separate mtx package
2151 - Fix file ownerships for /etc/bacula and Bacula's working dir
2152 * Wed Nov 23 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2153 - Disable GNOME on RH7
2154 * Fri Nov 18 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2155 - Red Hat and look alikes have mtx RPM, do not build/package our version
2156 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2157 - minor edit to _dist for SLES9 compatibility
2158 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2160 - kern changed location of pdf files and html manual in docs package
2161 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2163 - add docs (from prebuilt tarball) and rescue packages back in
2164 - remove dvd-freespace and dvd-writepart files, add dvd-handler
2165 - remove 3 of 4 sqlite script patches as not needed
2166 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2168 - remove docs and rescue sections (remove static fd)
2169 - add dvd-freespace and dvd-writepart files
2170 - update depkgs to 22Jun05
2171 - change database update to 8 to 9
2172 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2173 - minor cleanups before 1.38 changes
2174 - add popt and popt-devel build dependencies
2175 - add tetex and tetex-dvips dependencies for doc build
2176 - replace deprecated Copyright tag with License
2177 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2178 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
2179 - conflict with sqlite packages. remove readline dependency.
2180 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2181 - release 1.36.3 update docs
2182 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2183 - add centos4 build tag
2184 - add x86_64 build tag
2185 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2186 - add rhel4 build tag
2187 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
2188 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2189 - add rhel3 build tag
2190 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2191 - fix tray-monitor.conf for noreplace
2192 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2193 - fix distribution check for Fedora and Whitebox
2194 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2195 - add logwatch script
2197 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2198 - add build for Fedora Core 3 (linc now included in ORDit2)
2199 - add mysql4 define for Mandrake 10.1
2200 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2201 - fix {group_file} variable in post scripts
2202 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
2203 - add distribution checking and custom Distribution tag
2204 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2205 - ASSIGNMENT OF COPYRIGHT
2206 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
2207 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
2208 - all right, title and interest in and to the copyright in this software RPM
2209 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
2210 - free of all liens, encumbrances or any known claims against said copyright.
2211 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2213 - thanks to Daniel Widyono
2214 - update description for rescue package to describe cdrom creation
2215 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2216 - update depkgs to 29Oct04
2217 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2218 - add cdrom rescue to bacula-rescue package
2219 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2220 - misc fixes from 1.36.0 suse feedback
2221 - fix situation where sqlite database exists but sqlite has been removed.
2222 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2223 - remove tray-monitor from RH8 build
2224 - fix permissions on tray-monitor files
2225 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2226 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
2227 - change database update to 7 to 8 upgrade,
2228 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
2229 - build in 30Jul04, add freetype dependancy to gnome package.
2230 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2231 - add documentation to console for groupadd
2232 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2233 - add support for running daemons as root.bacula
2234 - correct for change in location of floppy rescue files in 1.35.2
2235 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
2236 - updated depgkgs to 30Jul04
2237 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2238 - really, really fix symlink creation for gconsole
2239 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2240 - fix symlink creation in gconsole post install
2241 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2242 - fixed error in gconsole post script
2243 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2244 - add check for gconsole symlink before trying to create it
2245 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2246 - fix some minor permissions issues on doc files that CVS won't let us fix
2247 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2248 - add pkgconfig to BuildRequires
2249 - clean up gnome1/2 menu entries for appropriate packages
2250 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2251 - tightened up doc distribution
2252 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2253 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
2254 - rpm's horrible bug that prevents nested conditional macros prevents me
2255 - from implementing these 2 separate approaches within the conditionals which
2256 - create the separate server packages.
2257 - the solution adopted is to remove the gnome-console files from the server packages
2258 - so bacula-gconsole is now an add on for both client and server packages.
2259 - this also now allows the server packages to be install on machines without
2260 - an X-server and we can still maintain a single spec file.
2261 - added tests to make sure we have defined platform and database macros.
2262 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2263 - corrected mysql prerequisites for suse
2264 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2265 - replaced all cp commands with cp -p
2266 - removed addition of a+x permissions on gnome-console
2267 - corrected permissions on init scripts
2268 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2269 - corrected creation of sqlite_bindir in install from !mysql to sqlite
2271 - various cleanup patches from Michael K. Johnson:
2272 - corrected post install routines for nicer chkconfig
2273 - removed chmod changes in post routines and moved to install section
2274 - removed interactive nature of post routine for rescue package
2275 - added description of building rescue disks to the description of rescue package
2276 - added clean of build root to beginning of install
2277 - removed specifying attr in all file lists
2278 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2279 - added bconsole to client package
2280 - added gconsole package as add-on to client
2281 - removed spurious dependancies on updatedb package (!cut/paste)
2282 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2283 - added updatedb package
2284 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2285 - added postgresql package
2286 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2287 - corrected the if else logic in the dependancy sections
2288 - changes for 1.34 release
2289 - /etc/bacula/console is now /etc/bacula/bconsole
2290 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
2291 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
2292 - /usr/sbin/smtp is now /usr/sbin/bsmtp
2293 - added new /etc/bacula/drop_mysql_database
2294 - added new /etc/bacula/drop_sqlite_database
2295 - added new /etc/bacula/grant_sqlite_privileges
2296 - added new generic bacula database scripts in /etc/bacula
2297 - added pre-install sections to check for database versions older than 6
2298 - added check for /etc/bacula/console.conf and copy to bconsole.conf
2299 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2300 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
2301 - added testing for existing databases before executing any of the database creation scripts
2302 - added defines working_dir and sqlite_bindir in place of hard coded paths
2303 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2304 - added build configuration for SuSE.
2305 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
2306 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2307 - added patch for create_sqlite_database to fix the installed bindir
2308 - added execute of create_sqlite_database to post of sqlite package
2309 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2310 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
2311 - added bacula-fd as Requires for rescue package
2312 - added build tag for Fedora Core 1
2313 - cleaned up dependancies for all builds
2314 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2315 - removed rh_version from package names
2316 - added platform build configuration section to beginning of file
2317 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2318 - removed make_static_bacula script from rescue package install
2319 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2320 - Added define at top of file for depkgs version
2321 - Added rescue sub-package
2322 - Moved requires statements into proper sub-package locations
2323 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2324 - Corrected Requires for Gnome 1.4/2.0 builds
2325 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2326 - Added separate source declaration for depkgs
2327 - added patch for make_catalog_backup script
2328 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2329 - Misc changes to mysql/sqlite build and rh7/8 menu differences
2330 - Added rh_version to sub-package names
2331 - Added installed but missing file /etc/bacula/gconsole
2332 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
2333 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
2334 - Update spec for version 1.31 and combine client
2335 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>