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 11Jul07
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
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 #--------------------------------------------------------------------------
22 # third party packagers
23 %define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
24 %{?contrib_packager:%define _packager %{contrib_packager}}
26 Summary: Bacula - The Network Backup Solution
30 Group: System Environment/Daemons
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}
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.
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
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
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
77 %define useradd /usr/sbin/useradd
78 %define groupadd /usr/sbin/groupadd
79 %define usermod /usr/sbin/usermod
81 # platform defines - set one below or define the build_xxx on the command line
84 %{?build_rh7:%define rh7 1}
86 %{?build_rh8:%define rh8 1}
88 %{?build_rh9:%define rh9 1}
91 %{?build_fc1:%define fc1 1}
93 %{?build_fc3:%define fc3 1}
95 %{?build_fc4:%define fc4 1}
97 %{?build_fc5:%define fc5 1}
99 %{?build_fc6:%define fc6 1}
101 %{?build_fc7:%define fc7 1}
102 # Whitebox Enterprise build
104 %{?build_wb3:%define wb3 1}
105 # RedHat Enterprise builds
107 %{?build_rhel3:%define rhel3 1}
108 %{?build_rhel3:%define wb3 1}
110 %{?build_rhel4:%define rhel4 1}
111 %{?build_rhel4:%define fc3 1}
113 %{?build_rhel5:%define rhel5 1}
114 %{?build_rhel5:%define fc6 1}
117 %{?build_centos3:%define centos3 1}
118 %{?build_centos3:%define wb3 1}
120 %{?build_centos4:%define centos4 1}
121 %{?build_centos4:%define fc3 1}
123 %{?build_centos5:%define centos5 1}
124 %{?build_centos5:%define fc6 1}
127 %{?build_sl3:%define sl3 1}
128 %{?build_sl3:%define wb3 1}
130 %{?build_sl4:%define sl4 1}
131 %{?build_sl4:%define fc3 1}
133 %{?build_sl5:%define sl5 1}
134 %{?build_sl5:%define fc6 1}
137 %{?build_su9:%define su9 1}
139 %{?build_su10:%define su10 1}
141 %{?build_su102:%define su102 1}
144 %{?build_mdk:%define mdk 1}
146 %{?build_mdv:%define mdv 1}
147 %{?build_mdv:%define mdk 1}
150 %define client_only 0
151 %{?build_client_only:%define client_only 1}
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.}
160 # set for database support desired or define the build_xxx on the command line
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
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
171 %{?build_mysql5:%define mysql5 1}
172 %{?build_mysql5:%define mysql 1}
174 %{?build_sqlite:%define sqlite 1}
176 %{?build_postgresql:%define postgresql 1}
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.}
185 %define db_backend mysql
188 %define db_backend sqlite
191 %define db_backend postgresql
196 %{?build_x86_64:%define x86_64 1}
198 # check what distribution we are
199 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4} || %rhel5}
200 %define _dist %(grep Red /etc/redhat-release)
202 %if %{fc1} || %{fc4} || %{fc5} || %{fc6} || %{fc7}
203 %define _dist %(grep Fedora /etc/redhat-release)
205 %if %{centos5} || %{centos4} || %{centos3}
206 %define _dist %(grep CentOS /etc/redhat-release)
208 %if %{sl5} ||%{sl4} || %{sl3}
209 %define _dist %(grep 'Scientific Linux' /etc/redhat-release)
211 %if %{fc3} && ! %{rhel4} && ! %{centos4} && ! %{sl4}
212 %define _dist %(grep Fedora /etc/redhat-release)
214 %if %{wb3} && ! %{rhel3} && ! %{centos3} && ! %{sl3}
215 %define _dist %(grep White /etc/whitebox-release)
217 %if %{su9} || %{su10} || %{su102}
218 %define _dist %(grep -i SuSE /etc/SuSE-release)
221 %define _dist %(grep Mand /etc/mandrake-release)
223 Distribution: %{_dist}
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 and fc4 now nobuild, tray monitor fails to build as of 2.2.1 release
230 %if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{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 \
1157 %if %{rh7} || %{rh8} || %{rh9} || %{fc1} || %{fc3} || %{wb3}
1158 --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 echo "Creating the SQLite tables..."
1700 %{script_dir}/make_sqlite_tables
1705 # test for an existing database
1706 # note: this ASSUMES no password has been set for bacula database
1707 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1709 # grant privileges and create tables if they do not exist
1710 if [ -z "$DB_VER" ]; then
1711 echo "Hmm, doesn't look like you have an existing database."
1712 echo "Creating PostgreSQL bacula database..."
1713 %{script_dir}/create_postgresql_database
1714 echo "Creating bacula tables..."
1715 %{script_dir}/make_postgresql_tables
1716 echo "Granting privileges for PostgreSQL user bacula..."
1717 %{script_dir}/grant_postgresql_privileges
1719 # check to see if we need to upgrade a 1.38 or lower database
1720 elif [ "$DB_VER" -lt "10" ]; then
1721 echo "This release requires an upgrade to your bacula database."
1722 echo "Backing up your current database..."
1723 pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1724 echo "Upgrading bacula database ..."
1725 %{script_dir}/update_postgresql_tables
1726 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1731 %if ! %{client_only}
1732 # generate passwords if needed
1733 if [ -d %{sysconf_dir} ]; then
1735 for file in *.conf; do
1736 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
1737 need_password=`grep $string $file 2>/dev/null`
1738 if [ -n "$need_password" ]; then
1739 pass=`openssl rand -base64 33`
1740 sed "s-$string-$pass-g" $file > $file.new
1741 cp -f $file.new $file; rm -f $file.new
1758 %if ! %{client_only}
1761 /sbin/chkconfig --del bacula-dir
1762 /sbin/chkconfig --del bacula-fd
1763 /sbin/chkconfig --del bacula-sd
1768 %if ! %{client_only}
1770 %defattr(-,root,root)
1771 %attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
1772 %attr(-, root, %{storage_daemon_group}) /usr/sbin/mtx
1773 %attr(-, root, %{storage_daemon_group}) /usr/sbin/scsitape
1774 %attr(-, root, %{storage_daemon_group}) /usr/sbin/tapeinfo
1775 %{_mandir}/man1/loaderinfo.1.%{manpage_ext}
1776 %{_mandir}/man1/mtx.1.%{manpage_ext}
1777 %{_mandir}/man1/scsitape.1.%{manpage_ext}
1778 %{_mandir}/man1/tapeinfo.1.%{manpage_ext}
1782 %defattr(-,root,root)
1783 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1784 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1785 %{script_dir}/bacula-ctl-fd
1786 /etc/init.d/bacula-fd
1787 %attr(-, root, %{daemon_group}) %{sysconf_dir}/rescue
1789 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1790 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1792 /etc/logrotate.d/bacula
1794 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1795 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1797 %attr(-, root, %{daemon_group}) %dir %{working_dir}
1800 /usr/sbin/btraceback
1801 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1802 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1804 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1805 %{_mandir}/man8/bacula.8.%{manpage_ext}
1806 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1807 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1811 # create the daemon group and user
1812 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1813 if [ -z "$HAVE_BACULA" ]; then
1814 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1815 echo "The group %{daemon_group} has been added to %{group_file}."
1816 echo "See the manual chapter \"Running Bacula\" for details."
1818 # we do not use the -g option allowing the primary group to be set to system default
1819 # this will be a unique group on redhat type systems or the group users on some systems
1820 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1821 if [ -z "$HAVE_BACULA" ]; then
1822 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1823 echo "The user %{file_daemon_user} has been added to %{user_file}."
1824 echo "See the manual chapter \"Running Bacula\" for details."
1826 # now we add the supplementary group, this is ok to call even if the user already exists
1827 # we only do this if the user is NOT root
1828 IS_ROOT=%{file_daemon_user}
1829 if [ "$IS_ROOT" != "root" ]; then
1830 %{usermod} -G %{daemon_group} %{file_daemon_user}
1835 if [ "$1" -ge 1 ] ; then
1836 /sbin/chkconfig --add bacula-fd
1839 # generate passwords if needed
1840 if [ -d %{sysconf_dir} ]; then
1842 for file in *.conf; do
1843 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
1844 need_password=`grep $string $file 2>/dev/null`
1845 if [ -n "$need_password" ]; then
1846 pass=`openssl rand -base64 33`
1847 sed "s-$string-$pass-g" $file > $file.new
1848 cp -f $file.new $file; rm -f $file.new
1857 /sbin/chkconfig --del bacula-fd
1860 %if ! %{client_only}
1862 %defattr(-,root,%{daemon_group})
1863 %{script_dir}/updatedb/*
1866 # create the daemon group
1867 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1868 if [ -z "$HAVE_BACULA" ]; then
1869 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1870 echo "The group %{daemon_group} has been added to %{group_file}."
1871 echo "See the manual chapter \"Running Bacula\" for details."
1875 echo "The database update scripts were installed to %{script_dir}/updatedb"
1880 %defattr(-,root,root)
1881 /usr/sbin/bgnome-console
1882 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1883 %attr(-, root, %{daemon_group}) %{script_dir}/gconsole
1884 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bgnome-console.conf
1885 /usr/share/pixmaps/bacula.png
1886 /usr/share/applications/bacula.desktop
1887 %{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
1890 %if %{gconsole} && ! %{rh8}
1891 /usr/sbin/bacula-tray-monitor
1892 %config(noreplace) %{sysconf_dir}/tray-monitor.conf
1893 /usr/share/pixmaps/bacula-tray-monitor.xpm
1894 /usr/share/applications/bacula-tray-monitor.desktop
1895 %{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
1898 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102}
1899 # add the console helper files
1900 %config(noreplace,missingok) /etc/pam.d/bgnome-console
1901 %config(noreplace,missingok) /etc/security/console.apps/bgnome-console
1902 /usr/bin/bgnome-console
1907 # create the daemon group
1908 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1909 if [ -z "$HAVE_BACULA" ]; then
1910 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1911 echo "The group %{daemon_group} has been added to %{group_file}."
1912 echo "See the manual chapter \"Running Bacula\" for details."
1916 # generate passwords if needed
1917 if [ -d %{sysconf_dir} ]; then
1919 for file in *.conf; do
1920 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
1921 need_password=`grep $string $file 2>/dev/null`
1922 if [ -n "$need_password" ]; then
1923 pass=`openssl rand -base64 33`
1924 sed "s-$string-$pass-g" $file > $file.new
1925 cp -f $file.new $file; rm -f $file.new
1934 %defattr(-,root,root)
1935 /usr/sbin/bwx-console
1936 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
1937 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bwx-console.conf
1938 /usr/share/pixmaps/wxwin16x16.xpm
1939 /usr/share/applications/wxconsole.desktop
1940 %{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
1943 %if %{wxconsole} && ! %{su9} && ! %{su10} && ! %{su102}
1944 # add the console helper files
1945 %config(noreplace,missingok) /etc/pam.d/bwx-console
1946 %config(noreplace,missingok) /etc/security/console.apps/bwx-console
1947 /usr/bin/bwx-console
1952 # create the daemon group
1953 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1954 if [ -z "$HAVE_BACULA" ]; then
1955 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1956 echo "The group %{daemon_group} has been added to %{group_file}."
1957 echo "See the manual chapter \"Running Bacula\" for details."
1961 # generate passwords if needed
1962 if [ -d %{sysconf_dir} ]; then
1964 for file in *.conf; do
1965 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
1966 need_password=`grep $string $file 2>/dev/null`
1967 if [ -n "$need_password" ]; then
1968 pass=`openssl rand -base64 33`
1969 sed "s-$string-$pass-g" $file > $file.new
1970 cp -f $file.new $file; rm -f $file.new
1979 %defattr(-,root,root)
1981 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
1982 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
1983 /usr/share/pixmaps/bat_icon.png
1984 /usr/share/applications/bat.desktop
1985 %{_mandir}/man1/bat.1.%{manpage_ext}
1988 %if %{bat} && ! %{su9} && ! %{su10} && ! %{su102}
1989 # add the console helper files
1990 %config(noreplace,missingok) /etc/pam.d/bat
1991 %config(noreplace,missingok) /etc/security/console.apps/bat
1997 # create the daemon group
1998 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1999 if [ -z "$HAVE_BACULA" ]; then
2000 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2001 echo "The group %{daemon_group} has been added to %{group_file}."
2002 echo "See the manual chapter \"Running Bacula\" for details."
2006 # generate passwords if needed
2007 if [ -d %{sysconf_dir} ]; then
2009 for file in *.conf; do
2010 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
2011 need_password=`grep $string $file 2>/dev/null`
2012 if [ -n "$need_password" ]; then
2013 pass=`openssl rand -base64 33`
2014 sed "s-$string-$pass-g" $file > $file.new
2015 cp -f $file.new $file; rm -f $file.new
2023 * Sat Sep 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2024 - add --disable-batch-insert for older platforms
2025 - add build targets for rhel5 and clones
2026 * Mon Sep 03 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2028 - turn off gconsole build for su10 & fc4, tray monitor fails to build
2029 * Sat Jul 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2030 - 2.1.26 add make of qwt in depkgs for bat
2031 * Sat Jun 02 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2032 - upgrade Qt requirement for bat to 4.2
2033 * Sun May 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2034 - add fc7 build target
2035 * Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2037 - gnome-console now bgnome-console
2038 - wxconsole now bwx-console
2039 - add build option for bat
2040 * Sat Apr 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2041 - merge Otto Mueller's patch but keep script dir set to /etc/bacula
2042 - add build tag for Scientific Linux per Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk>
2043 * Tue Mar 27 2007 Otto Mueller <otto.mueller@bundestag.de>
2044 - adjust directory locations for FHS-compatibility
2045 sysconf_dir (/etc/bacula), script_dir (/usr/lib/bacula),
2046 working_dir (/var/lib/bacula) and pid_dir (/var/run)
2047 * Mon Feb 26 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2048 - add SuSE 10.2 target
2049 * Sat Jan 20 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2051 - set query.sql as config file
2053 * Sun Jan 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2055 - change determination of gcc version per patch from Marc Hennes
2056 - move BuildRequire for atk-devel to gnome only builds
2058 * Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2060 * Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2061 - 1.39.26 remove create_sqlite_database.in.patch
2062 * Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2063 - change ownership of working_dir on server packages to bacula.bacula so that
2064 - bacula-sd can create bootstrap files
2065 * Sat Sep 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2066 - 1.39.22 remove separate cd and make of manpages the main Makefile does it now
2067 * Sun Aug 06 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2068 - fix manpages file extension for mdk
2069 * Sat Aug 05 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2070 - bug 648 re-enable and update sqlite patches
2074 - lock out gconsole build for gtk+ < 2.4
2075 * Mon Jul 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2076 - move pango-devel BuildRequires into gconsole only build
2077 * Sat Jul 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2078 - add provides and conflicts for standard suse packages
2079 - add third party packager tag support
2080 - add build_client_only tag
2081 - remove bsmtp from client package
2082 - add bacula-ctl-fd to client package
2083 * Thu Jul 13 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2084 - fix directory creation when wxconsole and not gconsole
2085 * Tue Jul 04 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2086 - add check to buildrequires to make sure libstdc++ version matches gcc
2087 * Mon Jul 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2088 - add python build support
2089 - fix LDFLAGS declarations
2090 * Sun Jul 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2091 - add requires for standard compiler toolchain
2092 - move version and release tags up
2094 - add docs_version tag
2095 * Sat Jul 01 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2096 - update rescuever to 1.8.6
2097 * Sun Jun 25 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2098 - update depkgs to 25Jun06
2099 - add mysql5 build tag
2100 * Mon Jun 12 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2101 - 1.38.10 bump rescue version
2102 * Sun Jun 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2103 - fix usermod statements
2105 * Thu Apr 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2106 - add -g param back to useradd statements Bug 605
2107 * Mon Apr 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2108 - redundant code cleanup
2109 * Sun Apr 16 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2110 - add wxconsole package
2111 * Fri Apr 14 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2113 - dependency update for Mandriva
2114 * Sun Apr 08 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2116 - remove -n option from useradd scripts
2117 * Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2119 - fix problem specifying more than one primary group for user bacula
2120 - add build switch to not build gconsole regardless of platform
2121 * Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2122 - add centos3 build tag
2123 - fix link error of static-fd on Mandrake with --disable-nls
2124 * Fri Jan 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2125 - add fc4 dependencies
2126 * Mon Jan 23 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2127 - add SuSE 10.0 build
2128 - remove specific permission in attrib macros
2129 * Sat Jan 21 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2131 - fix usermode required on suse, suse doesn't have usermode (xsu instead)
2132 - refix compat for _dist on SLES9 which seems to have been removed
2133 - added note regarding Aleksandar's use of specific permissions in attrib macros
2134 - need to review and add specific fc4 build currently using fc3 Requires
2135 * Wed Dec 14 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2137 - Reorganize files and pre/post sections to remove repetitions
2138 - Always build separate mtx package
2139 - Fix file ownerships for /etc/bacula and Bacula's working dir
2140 * Wed Nov 23 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2141 - Disable GNOME on RH7
2142 * Fri Nov 18 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2143 - Red Hat and look alikes have mtx RPM, do not build/package our version
2144 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2145 - minor edit to _dist for SLES9 compatibility
2146 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2148 - kern changed location of pdf files and html manual in docs package
2149 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2151 - add docs (from prebuilt tarball) and rescue packages back in
2152 - remove dvd-freespace and dvd-writepart files, add dvd-handler
2153 - remove 3 of 4 sqlite script patches as not needed
2154 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2156 - remove docs and rescue sections (remove static fd)
2157 - add dvd-freespace and dvd-writepart files
2158 - update depkgs to 22Jun05
2159 - change database update to 8 to 9
2160 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2161 - minor cleanups before 1.38 changes
2162 - add popt and popt-devel build dependencies
2163 - add tetex and tetex-dvips dependencies for doc build
2164 - replace deprecated Copyright tag with License
2165 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2166 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
2167 - conflict with sqlite packages. remove readline dependency.
2168 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2169 - release 1.36.3 update docs
2170 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2171 - add centos4 build tag
2172 - add x86_64 build tag
2173 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2174 - add rhel4 build tag
2175 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
2176 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2177 - add rhel3 build tag
2178 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2179 - fix tray-monitor.conf for noreplace
2180 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2181 - fix distribution check for Fedora and Whitebox
2182 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2183 - add logwatch script
2185 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2186 - add build for Fedora Core 3 (linc now included in ORDit2)
2187 - add mysql4 define for Mandrake 10.1
2188 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2189 - fix {group_file} variable in post scripts
2190 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
2191 - add distribution checking and custom Distribution tag
2192 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2193 - ASSIGNMENT OF COPYRIGHT
2194 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
2195 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
2196 - all right, title and interest in and to the copyright in this software RPM
2197 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
2198 - free of all liens, encumbrances or any known claims against said copyright.
2199 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2201 - thanks to Daniel Widyono
2202 - update description for rescue package to describe cdrom creation
2203 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2204 - update depkgs to 29Oct04
2205 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2206 - add cdrom rescue to bacula-rescue package
2207 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2208 - misc fixes from 1.36.0 suse feedback
2209 - fix situation where sqlite database exists but sqlite has been removed.
2210 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2211 - remove tray-monitor from RH8 build
2212 - fix permissions on tray-monitor files
2213 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2214 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
2215 - change database update to 7 to 8 upgrade,
2216 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
2217 - build in 30Jul04, add freetype dependancy to gnome package.
2218 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2219 - add documentation to console for groupadd
2220 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2221 - add support for running daemons as root.bacula
2222 - correct for change in location of floppy rescue files in 1.35.2
2223 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
2224 - updated depgkgs to 30Jul04
2225 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2226 - really, really fix symlink creation for gconsole
2227 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2228 - fix symlink creation in gconsole post install
2229 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2230 - fixed error in gconsole post script
2231 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2232 - add check for gconsole symlink before trying to create it
2233 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2234 - fix some minor permissions issues on doc files that CVS won't let us fix
2235 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2236 - add pkgconfig to BuildRequires
2237 - clean up gnome1/2 menu entries for appropriate packages
2238 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2239 - tightened up doc distribution
2240 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2241 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
2242 - rpm's horrible bug that prevents nested conditional macros prevents me
2243 - from implementing these 2 separate approaches within the conditionals which
2244 - create the separate server packages.
2245 - the solution adopted is to remove the gnome-console files from the server packages
2246 - so bacula-gconsole is now an add on for both client and server packages.
2247 - this also now allows the server packages to be install on machines without
2248 - an X-server and we can still maintain a single spec file.
2249 - added tests to make sure we have defined platform and database macros.
2250 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2251 - corrected mysql prerequisites for suse
2252 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2253 - replaced all cp commands with cp -p
2254 - removed addition of a+x permissions on gnome-console
2255 - corrected permissions on init scripts
2256 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2257 - corrected creation of sqlite_bindir in install from !mysql to sqlite
2259 - various cleanup patches from Michael K. Johnson:
2260 - corrected post install routines for nicer chkconfig
2261 - removed chmod changes in post routines and moved to install section
2262 - removed interactive nature of post routine for rescue package
2263 - added description of building rescue disks to the description of rescue package
2264 - added clean of build root to beginning of install
2265 - removed specifying attr in all file lists
2266 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2267 - added bconsole to client package
2268 - added gconsole package as add-on to client
2269 - removed spurious dependancies on updatedb package (!cut/paste)
2270 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2271 - added updatedb package
2272 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2273 - added postgresql package
2274 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2275 - corrected the if else logic in the dependancy sections
2276 - changes for 1.34 release
2277 - /etc/bacula/console is now /etc/bacula/bconsole
2278 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
2279 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
2280 - /usr/sbin/smtp is now /usr/sbin/bsmtp
2281 - added new /etc/bacula/drop_mysql_database
2282 - added new /etc/bacula/drop_sqlite_database
2283 - added new /etc/bacula/grant_sqlite_privileges
2284 - added new generic bacula database scripts in /etc/bacula
2285 - added pre-install sections to check for database versions older than 6
2286 - added check for /etc/bacula/console.conf and copy to bconsole.conf
2287 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2288 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
2289 - added testing for existing databases before executing any of the database creation scripts
2290 - added defines working_dir and sqlite_bindir in place of hard coded paths
2291 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2292 - added build configuration for SuSE.
2293 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
2294 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2295 - added patch for create_sqlite_database to fix the installed bindir
2296 - added execute of create_sqlite_database to post of sqlite package
2297 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2298 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
2299 - added bacula-fd as Requires for rescue package
2300 - added build tag for Fedora Core 1
2301 - cleaned up dependancies for all builds
2302 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2303 - removed rh_version from package names
2304 - added platform build configuration section to beginning of file
2305 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2306 - removed make_static_bacula script from rescue package install
2307 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2308 - Added define at top of file for depkgs version
2309 - Added rescue sub-package
2310 - Moved requires statements into proper sub-package locations
2311 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2312 - Corrected Requires for Gnome 1.4/2.0 builds
2313 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2314 - Added separate source declaration for depkgs
2315 - added patch for make_catalog_backup script
2316 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2317 - Misc changes to mysql/sqlite build and rh7/8 menu differences
2318 - Added rh_version to sub-package names
2319 - Added installed but missing file /etc/bacula/gconsole
2320 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
2321 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
2322 - Update spec for version 1.31 and combine client
2323 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>