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 04Jan07
10 %define _rescuever 2.1.10
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}
114 %{?build_centos3:%define centos3 1}
115 %{?build_centos3:%define wb3 1}
117 %{?build_centos4:%define centos4 1}
118 %{?build_centos4:%define fc3 1}
121 %{?build_sl3:%define sl3 1}
122 %{?build_sl3:%define wb3 1}
124 %{?build_sl4:%define sl4 1}
125 %{?build_sl4:%define fc3 1}
128 %{?build_su9:%define su9 1}
130 %{?build_su10:%define su10 1}
132 %{?build_su102:%define su102 1}
135 %{?build_mdk:%define mdk 1}
137 %{?build_mdv:%define mdv 1}
138 %{?build_mdv:%define mdk 1}
141 %define client_only 0
142 %{?build_client_only:%define client_only 1}
144 # test for a platform definition
145 %if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk}
146 %{error: You must specify a platform. Please examine the spec file.}
151 # set for database support desired or define the build_xxx on the command line
153 %{?build_mysql:%define mysql 1}
154 # if using mysql 4.x define this and mysql above
155 # currently: Mandrake 10.1, SuSE 9.x & 10.0, RHEL4 and Fedora Core 4
157 %{?build_mysql4:%define mysql4 1}
158 %{?build_mysql4:%define mysql 1}
159 # if using mysql 5.x define this and mysql above
160 # currently: SuSE 10.1 and Fedora Core 5
162 %{?build_mysql5:%define mysql5 1}
163 %{?build_mysql5:%define mysql 1}
165 %{?build_sqlite:%define sqlite 1}
167 %{?build_postgresql:%define postgresql 1}
169 # test for a database definition
170 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql} && ! %{client_only}
171 %{error: You must specify database support. Please examine the spec file.}
176 %define db_backend mysql
179 %define db_backend sqlite
182 %define db_backend postgresql
187 %{?build_x86_64:%define x86_64 1}
189 # check what distribution we are
190 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4}
191 %define _dist %(grep Red /etc/redhat-release)
193 %if %{fc1} || %{fc4} || %{fc5} || %{fc6} || %{fc7}
194 %define _dist %(grep Fedora /etc/redhat-release)
196 %if %{centos4} || %{centos3}
197 %define _dist %(grep CentOS /etc/redhat-release)
200 %define _dist %(grep 'Scientific Linux' /etc/redhat-release)
202 %if %{fc3} && ! %{rhel4} && ! %{centos4} && ! %{sl4}
203 %define _dist %(grep Fedora /etc/redhat-release)
205 %if %{wb3} && ! %{rhel3} && ! %{centos3} && ! %{sl3}
206 %define _dist %(grep White /etc/whitebox-release)
208 %if %{su9} || %{su10} || %{su102}
209 %define _dist %(grep -i SuSE /etc/SuSE-release)
212 %define _dist %(grep Mand /etc/mandrake-release)
214 Distribution: %{_dist}
216 # Should we build gconsole, possible only if gtk= >= 2.4 available.
217 # leaving all the BuildRequires and Requires in place below for now.
220 %if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{su9}
223 %if %{mdk} && ! %{mdv}
227 # specifically disallow gconsole if desired
228 %{?nobuild_gconsole:%define gconsole 0}
230 # Should we build wxconsole, only wxWidgets >=2.6 is supported
231 # currently only SuSE 10 and FC4/FC5
233 %{?build_wxconsole:%define wxconsole 1}
235 # Should we build bat
238 %{?build_bat:%define bat 1}
240 # should we turn on python support
242 %{?build_python:%define python 1}
244 # Mandriva somehow forces the manpage file extension to bz2 rather than gz
246 %define manpage_ext bz2
248 %define manpage_ext gz
251 # for client only build
262 %{expand: %%define gccver %(rpm -q --queryformat %%{version} gcc)}
263 %{expand: %%define gccrel %(rpm -q --queryformat %%{release} gcc)}
265 BuildRequires: gcc, gcc-c++, make, autoconf
266 BuildRequires: ncurses-devel, perl
267 BuildRequires: libstdc++-devel = %{gccver}-%{gccrel}, libxml2-devel, zlib-devel
268 BuildRequires: openssl-devel
270 BuildRequires: python, python-devel
271 %{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
274 BuildRequires: pkgconfig, pango-devel, atk-devel
277 BuildRequires: qt-devel >= 4
280 BuildRequires: libtermcap-devel
281 BuildRequires: glibc-devel >= 2.2
284 BuildRequires: termcap
285 BuildRequires: glibc-devel >= 2.3
287 %if %{su9} && %{gconsole}
288 BuildRequires: libgnome >= 2.0
289 BuildRequires: gtk2-devel >= 2.0
290 BuildRequires: libgnomeui-devel >= 2.0
291 BuildRequires: ORBit2-devel
292 BuildRequires: libart_lgpl-devel >= 2.0
293 BuildRequires: libbonobo-devel >= 2.0
294 BuildRequires: libbonoboui-devel >= 2.0
295 BuildRequires: bonobo-activation-devel
296 BuildRequires: gconf2-devel
297 BuildRequires: linc-devel
298 BuildRequires: freetype2-devel
301 BuildRequires: termcap
302 BuildRequires: glibc-devel >= 2.3
304 %if %{su10} && %{gconsole}
305 BuildRequires: libgnome >= 2.12
306 BuildRequires: gtk2-devel >= 2.8
307 BuildRequires: libgnomeui-devel >= 2.12
308 BuildRequires: ORBit2-devel
309 BuildRequires: libart_lgpl-devel >= 2.3
310 BuildRequires: libbonobo-devel >= 2.10
311 BuildRequires: libbonoboui-devel >= 2.10
312 BuildRequires: bonobo-activation-devel
313 BuildRequires: gconf2-devel
314 BuildRequires: freetype2-devel
315 BuildRequires: cairo-devel
316 BuildRequires: fontconfig-devel >= 2.3
317 BuildRequires: gnome-vfs2-devel >= 2.12
318 BuildRequires: libpng-devel
321 BuildRequires: termcap
322 BuildRequires: glibc-devel >= 2.5
324 %if %{su102} && %{gconsole}
325 BuildRequires: libgnome >= 2.16
326 BuildRequires: gtk2-devel >= 2.10
327 BuildRequires: libgnomeui-devel >= 2.16
328 BuildRequires: ORBit2-devel
329 BuildRequires: libart_lgpl-devel >= 2.3
330 BuildRequires: libbonobo-devel >= 2.16
331 BuildRequires: libbonoboui-devel >= 2.16
332 BuildRequires: bonobo-activation-devel
333 BuildRequires: gconf2-devel
334 BuildRequires: freetype2-devel
335 BuildRequires: cairo-devel
336 BuildRequires: fontconfig-devel >= 2.4
337 BuildRequires: gnome-vfs2-devel >= 2.16
338 BuildRequires: libpng-devel
341 BuildRequires: libtermcap-devel
342 BuildRequires: libstdc++-static-devel
343 BuildRequires: glibc-static-devel
344 BuildRequires: glibc-devel >= 2.3
346 %if %{mdk} && !%{mdv} && %{gconsole}
347 BuildRequires: gtk2-devel >= 2.0
348 BuildRequires: libgnomeui2-devel >= 2.0
349 BuildRequires: libORBit2-devel
350 BuildRequires: libart_lgpl-devel >= 2.0
351 BuildRequires: libbonobo2_0-devel
352 BuildRequires: libbonoboui2_0-devel
353 BuildRequires: libbonobo-activation-devel
354 BuildRequires: libGConf2-devel
355 BuildRequires: freetype2-devel
357 %if %{mdv} && %{gconsole}
358 BuildRequires: gtk2-devel >= 2.8
359 BuildRequires: libgnomeui2-devel >= 2.10
360 BuildRequires: libORBit2-devel
361 BuildRequires: libart_lgpl-devel >= 2.3
362 BuildRequires: libbonobo2_0-devel
363 BuildRequires: libbonoboui2_0-devel
364 BuildRequires: libbonobo-activation-devel
365 BuildRequires: libGConf2-devel
366 BuildRequires: freetype2-devel
369 BuildRequires: libtermcap-devel
370 BuildRequires: glibc-devel >= 2.3
372 %if %{fc3} && %{gconsole}
373 BuildRequires: gtk2-devel >= 2.4
374 BuildRequires: libgnomeui-devel >= 2.8
375 BuildRequires: ORBit2-devel
376 BuildRequires: libart_lgpl-devel >= 2.3
377 BuildRequires: libbonobo-devel >= 2.8
378 BuildRequires: libbonoboui-devel >= 2.8
379 BuildRequires: bonobo-activation-devel
380 BuildRequires: GConf2-devel
381 BuildRequires: freetype-devel
384 BuildRequires: libtermcap-devel
385 BuildRequires: glibc-devel >= 2.3
387 %if %{fc4} && %{gconsole}
388 BuildRequires: gtk2-devel >= 2.6
389 BuildRequires: libgnomeui-devel >= 2.10
390 BuildRequires: ORBit2-devel
391 BuildRequires: libart_lgpl-devel >= 2.3
392 BuildRequires: libbonobo-devel >= 2.8
393 BuildRequires: libbonoboui-devel >= 2.8
394 BuildRequires: bonobo-activation-devel
395 BuildRequires: GConf2-devel
396 BuildRequires: freetype-devel
399 BuildRequires: libtermcap-devel
400 BuildRequires: glibc-devel >= 2.4
402 %if %{fc5} && %{gconsole}
403 BuildRequires: gtk2-devel >= 2.8
404 BuildRequires: libgnomeui-devel >= 2.14
405 BuildRequires: ORBit2-devel
406 BuildRequires: libart_lgpl-devel >= 2.3
407 BuildRequires: libbonobo-devel >= 2.14
408 BuildRequires: libbonoboui-devel >= 2.14
409 BuildRequires: GConf2-devel
410 BuildRequires: freetype-devel
413 BuildRequires: libtermcap-devel
414 BuildRequires: glibc-devel >= 2.5
416 %if %{fc6} && %{gconsole}
417 BuildRequires: gtk2-devel >= 2.10
418 BuildRequires: libgnomeui-devel >= 2.16
419 BuildRequires: ORBit2-devel
420 BuildRequires: libart_lgpl-devel >= 2.3
421 BuildRequires: libbonobo-devel >= 2.16
422 BuildRequires: libbonoboui-devel >= 2.16
423 BuildRequires: GConf2-devel
424 BuildRequires: freetype-devel
427 BuildRequires: libtermcap-devel
428 BuildRequires: glibc-devel >= 2.5
430 %if %{fc7} && %{gconsole}
431 BuildRequires: gtk2-devel >= 2.10
432 BuildRequires: libgnomeui-devel >= 2.18
433 BuildRequires: ORBit2-devel
434 BuildRequires: libart_lgpl-devel >= 2.3
435 BuildRequires: libbonobo-devel >= 2.18
436 BuildRequires: libbonoboui-devel >= 2.18
437 BuildRequires: GConf2-devel
438 BuildRequires: freetype-devel
440 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7}
441 BuildRequires: libtermcap-devel
442 BuildRequires: glibc-devel >= 2.3
444 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7} && %{gconsole}
445 BuildRequires: gtk2-devel >= 2.0
446 BuildRequires: libgnomeui-devel >= 2.0
447 BuildRequires: ORBit2-devel
448 BuildRequires: libart_lgpl-devel >= 2.0
449 BuildRequires: libbonobo-devel >= 2.0
450 BuildRequires: libbonoboui-devel >= 2.0
451 BuildRequires: bonobo-activation-devel
452 BuildRequires: GConf2-devel
453 BuildRequires: linc-devel
454 BuildRequires: freetype-devel
457 %if %{mysql} && ! %{mysql4} && ! %{mysql5}
458 BuildRequires: mysql-devel >= 3.23
461 %if %{mysql} && %{mysql4}
462 BuildRequires: mysql-devel >= 4.0
465 %if %{mysql} && %{mysql5}
466 BuildRequires: mysql-devel >= 5.0
469 %if %{postgresql} && %{wb3}
470 BuildRequires: rh-postgresql-devel >= 7
473 %if %{postgresql} && ! %{wb3}
474 BuildRequires: postgresql-devel >= 7
478 BuildRequires: wxGTK-devel >= 2.6
502 Summary: Bacula - The Network Backup Solution
503 Group: System Environment/Daemons
504 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
505 Conflicts: bacula-client
506 Obsoletes: bacula-rescue
508 %if %{su9} || %{su10} || %{su102}
512 Requires: ncurses, libstdc++, zlib, openssl, mtx
515 Requires: glibc >= 2.2
518 %if %{su9} || %{su10}
519 Requires: glibc >= 2.3
523 Requires: glibc >= 2.5
526 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{fc5} && ! %{fc6} && ! %{fc7}
527 Requires: glibc >= 2.3
531 Requires: glibc >= 2.4
535 Requires: glibc >= 2.5
539 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4} && ! %{mysql5}
540 Requires: mysql >= 3.23
541 Requires: mysql-server >= 3.23
543 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{mdk} && %{mysql4}
544 Requires: mysql >= 4.0
545 Requires: mysql-server >= 4.0
547 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && %{mysql5}
548 Requires: mysql >= 5.0
549 Requires: mysql-server >= 5.0
552 %if %{mysql} && %{su9} && ! %{mysql4}
553 Requires: mysql >= 3.23
554 Requires: mysql-client >= 3.23
556 %if %{mysql} && %{su9} && %{mysql4}
557 Requires: mysql >= 4.0
558 Requires: mysql-client >= 4.0
560 %if %{mysql} && %{su10} && %{mysql4}
561 Requires: mysql >= 4.0
562 Requires: mysql-client >= 4.0
564 %if %{mysql} && %{su10} && %{mysql5}
565 Requires: mysql >= 5.0
566 Requires: mysql-client >= 5.0
568 %if %{mysql} && %{su102} && %{mysql5}
569 Requires: mysql >= 5.0
570 Requires: mysql-client >= 5.0
573 %if %{mysql} && %{mdk} && ! %{mysql4}
574 Requires: mysql >= 3.23
575 Requires: mysql-client >= 3.23
577 %if %{mysql} && %{mdk} && %{mysql4}
578 Requires: mysql >= 4.0
579 Requires: mysql-client >= 4.0
582 %if %{postgresql} && %{wb3}
583 Requires: rh-postgresql >= 7
584 Requires: rh-postgresql-server >= 7
586 %if %{postgresql} && ! %{wb3}
587 Requires: postgresql >= 7
588 Requires: postgresql-server >= 7
598 %description postgresql
602 Requires: python >= %{pyver}
616 This build requires MySQL to be installed separately as the catalog database.
619 This build requires PostgreSQL to be installed separately as the catalog database.
622 This build incorporates sqlite as the catalog database, statically compiled.
625 This build includes python scripting support.
630 Summary: Bacula - The Network Backup Solution
631 Group: System Environment/Daemons
635 This is Bacula's version of mtx tape utilities for Linux distributions that
636 do not provide their own mtx package
640 Summary: Bacula - The Network Backup Solution
641 Group: System Environment/Daemons
643 Conflicts: bacula-mysql
644 Conflicts: bacula-sqlite
645 Conflicts: bacula-postgresql
646 Obsoletes: bacula-rescue
648 %if %{su9} || %{su10} || %{su102}
652 Requires: libstdc++, zlib, openssl
655 Requires: glibc >= 2.2
658 %if %{su9} || %{su10}
659 Requires: glibc >= 2.3
663 Requires: glibc >= 2.5
666 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{fc5} && ! %{fc6}
667 Requires: glibc >= 2.3
671 Requires: glibc >= 2.4
675 Requires: glibc >= 2.5
680 Requires: python >= %{pyver}
694 This is the File daemon (Client) only package. It includes the command line
697 This build includes python scripting support.
703 Summary: Bacula - The Network Backup Solution
704 Group: System Environment/Daemons
706 %description updatedb
717 This package installs scripts for updating older versions of the bacula
723 Summary: Bacula - The Network Backup Solution
724 Group: System Environment/Daemons
725 Requires: atk, libstdc++, zlib, pango, libxml2, bacula-fd, openssl
728 %if %{gconsole} && %{su9}
729 Requires: gtk2 >= 2.0
730 Requires: libgnome >= 2.0
731 Requires: libgnomeui >= 2.0
732 Requires: glibc >= 2.3
734 Requires: libart_lgpl >= 2.0
735 Requires: libbonobo >= 2.0
736 Requires: libbonoboui >= 2.0
737 Requires: bonobo-activation
742 %if %{gconsole} && %{su10}
743 Requires: gtk2 >= 2.8
744 Requires: libgnome >= 2.12
745 Requires: libgnomeui >= 2.12
746 Requires: glibc >= 2.3
748 Requires: libart_lgpl >= 2.3
749 Requires: libbonobo >= 2.10
750 Requires: libbonoboui >= 2.10
751 Requires: bonobo-activation
755 Requires: fontconfig >= 2.3
756 Requires: gnome-vfs2 >= 2.12
759 %if %{gconsole} && %{su102}
760 Requires: gtk2 >= 2.10
761 Requires: libgnome >= 2.16
762 Requires: libgnomeui >= 2.16
763 Requires: glibc >= 2.5
765 Requires: libart_lgpl >= 2.3
766 Requires: libbonobo >= 2.16
767 Requires: libbonoboui >= 2.16
768 Requires: bonobo-activation
772 Requires: fontconfig >= 2.4
773 Requires: gnome-vfs2 >= 2.16
776 %if %{gconsole} && %{mdk} && !%{mdv}
777 Requires: gtk2 >= 2.0
778 Requires: libgnomeui2
779 Requires: glibc >= 2.3
781 Requires: libart_lgpl >= 2.0
782 Requires: libbonobo >= 2.0
783 Requires: libbonoboui >= 2.0
787 %if %{gconsole} && %{mdv}
788 Requires: gtk2 >= 2.8
789 Requires: libgnomeui2
790 Requires: glibc >= 2.3
792 Requires: libart_lgpl >= 2.3
793 Requires: libbonobo >= 2.10
794 Requires: libbonoboui >= 2.10
798 %if %{gconsole} && %{fc3}
799 Requires: gtk2 >= 2.4
800 Requires: libgnomeui >= 2.8
801 Requires: glibc >= 2.3
803 Requires: libart_lgpl >= 2.3
804 Requires: libbonobo >= 2.8
805 Requires: libbonoboui >= 2.8
806 Requires: bonobo-activation
810 %if %{gconsole} && %{fc4}
811 Requires: gtk2 >= 2.6
812 Requires: libgnomeui >= 2.10
813 Requires: glibc >= 2.3
815 Requires: libart_lgpl >= 2.3
816 Requires: libbonobo >= 2.8
817 Requires: libbonoboui >= 2.8
818 Requires: bonobo-activation
822 %if %{gconsole} && %{fc5}
823 Requires: gtk2 >= 2.8
824 Requires: libgnomeui >= 2.14
825 Requires: glibc >= 2.4
827 Requires: libart_lgpl >= 2.3
828 Requires: libbonobo >= 2.14
829 Requires: libbonoboui >= 2.14
833 %if %{gconsole} && %{fc6}
834 Requires: gtk2 >= 2.10
835 Requires: libgnomeui >= 2.16
836 Requires: glibc >= 2.5
838 Requires: libart_lgpl >= 2.3
839 Requires: libbonobo >= 2.16
840 Requires: libbonoboui >= 2.16
844 %if %{gconsole} && %{fc7}
845 Requires: gtk2 >= 2.10
846 Requires: libgnomeui >= 2.18
847 Requires: glibc >= 2.5
849 Requires: libart_lgpl >= 2.3
850 Requires: libbonobo >= 2.18
851 Requires: libbonoboui >= 2.18
855 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7}
856 Requires: gtk2 >= 2.0
857 Requires: libgnomeui >= 2.0
858 Requires: glibc >= 2.3
860 Requires: libart_lgpl >= 2.0
861 Requires: libbonobo >= 2.0
862 Requires: libbonoboui >= 2.0
863 Requires: bonobo-activation
868 %if %{gconsole} && %{su9}
871 %if %{gconsole} && %{su10}
874 %if %{gconsole} && %{su102}
877 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102}
882 %description gconsole
893 This is the Gnome Console package. It is an add-on to the client or
899 Summary: Bacula - The Network Backup Solution
900 Group: System Environment/Daemons
901 Requires: wxGTK >= 2.6, libstdc++, openssl
904 %if %{wxconsole} && %{su10}
905 Requires: gtk2 >= 2.8
908 %if %{wxconsole} && %{su102}
909 Requires: gtk2 >= 2.10
912 %if %{wxconsole} && %{fc3}
913 Requires: gtk2 >= 2.4
916 %if %{wxconsole} && %{fc4}
917 Requires: gtk2 >= 2.6
920 %if %{wxconsole} && %{fc5}
921 Requires: gtk2 >= 2.8
924 %if %{wxconsole} && %{fc6}
925 Requires: gtk2 >= 2.10
928 %if %{wxconsole} && %{fc7}
929 Requires: gtk2 >= 2.10
933 %description wxconsole
944 This is the WXWindows Console package. It is an add-on to the client or
950 Summary: Bacula - The Network Backup Solution
951 Group: System Environment/Daemons
954 %if %{bat} && %{su10}
956 Requires: glibc >= 2.4
966 %if %{bat} && %{su102}
968 Requires: glibc >= 2.5
980 Requires: glibc >= 2.4
992 Requires: glibc >= 2.5
1002 %if %{bat} && %{fc7}
1004 Requires: glibc >= 2.5
1005 Requires: fontconfig
1026 This is the Bacula Administration Tool package. It is an add-on to
1027 the client or server packages.
1040 %if %{su9} || %{su10} || %{su102}
1041 export LDFLAGS="${LDFLAGS} -L/usr/lib/termcap"
1049 %if ! %{client_only}
1054 # patches for the bundled sqlite scripts
1056 # patch the make_sqlite_tables script for installation bindir
1057 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
1059 # patch the create_sqlite_database script for installation bindir
1060 # not necessary after 1.39.26 no longer references sqlite binary
1061 #patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
1063 # patch the make_catalog_backup script for installation bindir
1064 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
1066 # patch the update_sqlite_tables script for installation bindir
1067 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
1069 # patch the bacula-dir init script to remove sqlite service
1070 %if %{sqlite} && %{su9}
1071 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1073 %if %{sqlite} && %{su10}
1074 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1076 %if %{sqlite} && %{su102}
1077 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1080 # 64 bit lib location hacks
1081 # as of 1.39.18 it should not be necessary to enable x86_64 as configure is
1082 # reported to be fixed to properly detect lib locations.
1084 export LDFLAGS="${LDFLAGS} -L/usr/lib64"
1086 %if %{mysql} && %{x86_64}
1087 export LDFLAGS="${LDFLAGS} -L/usr/lib64/mysql"
1089 %if %{python} && %{x86_64}
1090 export LDFLAGS="${LDFLAGS} -L/usr/lib64/python%{pyver}"
1095 --sbindir=/usr/sbin \
1096 --sysconfdir=%{sysconf_dir} \
1097 --with-scriptdir=%{script_dir} \
1098 --with-working-dir=%{working_dir} \
1099 --with-pid-dir=%{pid_dir} \
1100 --enable-smartalloc \
1101 --enable-client-only \
1111 --sbindir=/usr/sbin \
1112 --sysconfdir=%{sysconf_dir} \
1113 --with-scriptdir=%{script_dir} \
1114 --with-working-dir=%{working_dir} \
1115 --with-pid-dir=%{pid_dir} \
1116 --enable-smartalloc \
1120 %if %{gconsole} && ! %{rh8}
1121 --enable-tray-monitor \
1127 --with-sqlite=${cwd}/%{depkgs}/sqlite \
1133 --enable-bwx-console \
1142 --enable-client-only \
1144 --mandir=%{_mandir} \
1145 --with-subsys-dir=/var/lock/subsys \
1146 --with-dir-user=%{director_daemon_user} \
1147 --with-dir-group=%{daemon_group} \
1148 --with-sd-user=%{storage_daemon_user} \
1149 --with-sd-group=%{storage_daemon_group} \
1150 --with-fd-user=%{file_daemon_user} \
1151 --with-fd-group=%{daemon_group} \
1152 --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
1153 --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
1154 --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
1155 --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
1156 --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
1157 --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
1165 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1166 mkdir -p $RPM_BUILD_ROOT/etc/init.d
1167 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
1168 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/logfiles
1169 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/services
1170 mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
1171 mkdir -p $RPM_BUILD_ROOT%{script_dir}/updatedb
1173 %if %{gconsole} || %{wxconsole} || %{bat}
1174 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
1175 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
1178 %if %{gconsole} || %{wxconsole} || %{bat}
1179 %define usermode_iftrick 1
1181 %define usermode_iftrick 0
1184 %if %{usermode_iftrick} && ! %{su9} && ! %{su10} && ! %{su102}
1185 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
1186 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
1187 mkdir -p $RPM_BUILD_ROOT/usr/bin
1191 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
1195 prefix=$RPM_BUILD_ROOT/usr \
1196 sbindir=$RPM_BUILD_ROOT/usr/sbin \
1197 sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1198 scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1199 working_dir=$RPM_BUILD_ROOT%{working_dir} \
1200 piddir=$RPM_BUILD_ROOT%{pid_dir} \
1201 mandir=$RPM_BUILD_ROOT%{_mandir} \
1204 %if ! %{client_only}
1207 prefix=$RPM_BUILD_ROOT/usr \
1208 sbindir=$RPM_BUILD_ROOT/usr/sbin \
1209 sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1210 scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1211 working_dir=$RPM_BUILD_ROOT%{working_dir} \
1212 piddir=$RPM_BUILD_ROOT%{pid_dir} \
1213 mandir=$RPM_BUILD_ROOT%{_mandir} \
1218 # make install in manpages installs _everything_ shotgun style
1219 # so now delete what we will not be packaging
1221 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
1224 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bat.1.%{manpage_ext}
1227 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
1228 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
1231 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bsmtp.1.%{manpage_ext}
1232 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1233 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1234 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bcopy.8.%{manpage_ext}
1235 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bextract.8.%{manpage_ext}
1236 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bls.8.%{manpage_ext}
1237 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bscan.8.%{manpage_ext}
1238 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/btape.8.%{manpage_ext}
1239 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/dbcheck.8.%{manpage_ext}
1242 # fixme - make installs the mysql scripts for sqlite build
1244 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1245 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1246 rm -f $RPM_BUILD_ROOT%{script_dir}/grant_mysql_privileges
1249 # fixme - make installs the mysql scripts for postgresql build
1251 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1252 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1255 # fixme - make installs gconsole script for build without gconsole
1257 rm -f $RPM_BUILD_ROOT%{script_dir}/gconsole
1260 rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
1262 # install the init scripts
1263 %if %{su9} || %{su10} || %{su102}
1264 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1265 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1266 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1269 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1270 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1271 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1273 %if ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk}
1274 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1275 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1276 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1278 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
1280 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1281 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1284 # install the menu stuff
1285 %if %{gconsole} && %{su9}
1286 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1287 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1288 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1289 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1291 %if %{gconsole} && %{su10}
1292 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1293 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1294 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1295 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1297 %if %{gconsole} && %{su102}
1298 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1299 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1300 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1301 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1303 %if %{wxconsole} && %{su10}
1304 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1305 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1307 %if %{wxconsole} && %{su102}
1308 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1309 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1311 %if %{bat} && %{su102}
1312 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1313 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1315 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{fc6} || %{fc7} || %{mdk}
1320 %if %{gconsole} && %{iftrick}
1321 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1322 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1323 cp -p scripts/bgnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bgnome-console
1324 cp -p scripts/bgnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/bgnome-console
1325 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bgnome-console
1327 %if %{gconsole} && ! %{rh8}
1328 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1329 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1331 %if %{wxconsole} && %{iftrick}
1332 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1333 cp -p scripts/wxconsole.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1334 cp -p scripts/wxconsole.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bwx-console
1335 cp -p scripts/wxconsole.pamd $RPM_BUILD_ROOT/etc/pam.d/bwx-console
1336 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bwx-console
1338 %if %{bat} && %{iftrick}
1339 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1340 cp -p scripts/bat.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1341 cp -p scripts/bat.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bat
1342 cp -p scripts/bat.pamd $RPM_BUILD_ROOT/etc/pam.d/bat
1343 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bat
1348 cp -p %{depkgs}/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
1349 cp -p %{depkgs}/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
1350 cp -p %{depkgs}/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
1353 # install the logrotate file
1354 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
1356 # install the updatedb scripts
1357 cp -p updatedb/* $RPM_BUILD_ROOT%{script_dir}/updatedb/
1359 # install the logwatch scripts
1360 %if ! %{client_only}
1361 cp -p scripts/logwatch/bacula $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1362 cp -p scripts/logwatch/logfile.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1363 cp -p scripts/logwatch/services.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1364 chmod 755 $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1365 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1366 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1369 # install the rescue files
1370 mkdir $RPM_BUILD_ROOT%{sysconf_dir}/rescue
1371 cp -p %{_rescuesrc}/Makefile* $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1372 cp -p %{_rescuesrc}/README $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1373 cp -p %{_rescuesrc}/configure $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1374 cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1375 cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1376 cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1377 touch $RPM_BUILD_ROOT%{sysconf_dir}/rescue/linux/cdrom/rpm_release
1378 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT%{sysconf_dir}/rescue/linux/cdrom/bacula/bin/bacula-fd
1379 rm -f src/filed/static-bacula-fd
1381 # install bat since make doesn't at the moment
1383 cp -p src/qt-console/bat $RPM_BUILD_ROOT/usr/sbin/bat
1384 cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
1387 # now clean up permissions that are left broken by the install
1388 %if ! %{client_only}
1389 chmod o-r $RPM_BUILD_ROOT%{script_dir}/query.sql
1391 chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
1392 %if %{gconsole} && ! %{rh8}
1393 chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
1394 chmod 644 $RPM_BUILD_ROOT%{sysconf_dir}/tray-monitor.conf
1397 # fix me - building enable-client-only installs files not included in bacula-client package
1399 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula
1400 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-dir
1401 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-sd
1402 rm -f $RPM_BUILD_ROOT%{script_dir}/disk-changer
1403 rm -f $RPM_BUILD_ROOT%{script_dir}/dvd-handler
1404 rm -f $RPM_BUILD_ROOT%{script_dir}/mtx-changer
1405 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1406 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1407 rm -rf $RPM_BUILD_ROOT%{script_dir}/updatedb
1411 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1412 rm -rf $RPM_BUILD_DIR/%{name}-docs-%{docs_version}
1413 rm -rf $RPM_BUILD_DIR/%{name}-rescue-%{_rescuever}
1414 rm -rf $RPM_BUILD_DIR/depkgs
1415 rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
1418 # MySQL specific files
1420 %defattr(-, root, root)
1421 %attr(-, root, %{daemon_group}) %{script_dir}/create_mysql_database
1422 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_database
1423 %attr(-, root, %{daemon_group}) %{script_dir}/make_mysql_tables
1424 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_tables
1425 %attr(-, root, %{daemon_group}) %{script_dir}/update_mysql_tables
1426 %attr(-, root, %{daemon_group}) %{script_dir}/grant_mysql_privileges
1427 %attr(-, root, %{daemon_group}) %{script_dir}/startmysql
1428 %attr(-, root, %{daemon_group}) %{script_dir}/stopmysql
1433 %defattr(-,root,root)
1434 %attr(-, root, %{daemon_group}) %{script_dir}/create_sqlite_database
1435 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite_database
1436 %attr(-, root, %{daemon_group}) %{script_dir}/grant_sqlite_privileges
1437 %attr(-, root, %{daemon_group}) %{script_dir}/make_sqlite_tables
1438 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite_tables
1439 %attr(-, root, %{daemon_group}) %{script_dir}/update_sqlite_tables
1440 %{sqlite_bindir}/libsqlite.a
1441 %{sqlite_bindir}/sqlite.h
1442 %{sqlite_bindir}/sqlite
1447 %defattr(-,root,root)
1448 %attr(-, root, %{daemon_group}) %{script_dir}/create_postgresql_database
1449 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_database
1450 %attr(-, root, %{daemon_group}) %{script_dir}/make_postgresql_tables
1451 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_tables
1452 %attr(-, root, %{daemon_group}) %{script_dir}/update_postgresql_tables
1453 %attr(-, root, %{daemon_group}) %{script_dir}/grant_postgresql_privileges
1456 # The rest is DB backend independent
1457 %if ! %{client_only}
1458 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1459 %attr(-, root, %{daemon_group}) %{script_dir}/bacula
1460 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1461 %attr(-, root, %{daemon_group}) %{script_dir}/create_bacula_database
1462 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_database
1463 %attr(-, root, %{daemon_group}) %{script_dir}/grant_bacula_privileges
1464 %attr(-, root, %{daemon_group}) %{script_dir}/make_bacula_tables
1465 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_tables
1466 %attr(-, root, %{daemon_group}) %{script_dir}/update_bacula_tables
1467 %attr(-, root, %{daemon_group}) %{script_dir}/make_catalog_backup
1468 %attr(-, root, %{daemon_group}) %{script_dir}/delete_catalog_backup
1469 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1470 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1471 %attr(-, root, %{daemon_group}) %{sysconf_dir}/rescue
1472 %attr(-, root, %{daemon_group}) %{script_dir}/disk-changer
1473 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-dir
1474 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
1475 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-sd
1476 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
1477 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
1478 %attr(-, root, %{storage_daemon_group}) %{script_dir}/dvd-handler
1479 %attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
1480 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
1482 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1483 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1485 /etc/logrotate.d/bacula
1486 /etc/log.d/scripts/services/bacula
1487 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-dir.conf
1488 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1489 %attr(-, root, %{storage_daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-sd.conf
1490 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1491 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
1492 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/services/bacula.conf
1493 %attr(-, root, %{daemon_group}) %config(noreplace) %{script_dir}/query.sql
1495 %attr(-, %{storage_daemon_user}, %{daemon_group}) %dir %{working_dir}
1497 /usr/sbin/bacula-dir
1505 /usr/sbin/btraceback
1511 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1512 %{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1513 %{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1514 %{_mandir}/man8/bacula.8.%{manpage_ext}
1515 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1516 %{_mandir}/man8/bcopy.8.%{manpage_ext}
1517 %{_mandir}/man8/bextract.8.%{manpage_ext}
1518 %{_mandir}/man8/bls.8.%{manpage_ext}
1519 %{_mandir}/man8/bscan.8.%{manpage_ext}
1520 %{_mandir}/man8/btape.8.%{manpage_ext}
1521 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1522 %{_mandir}/man8/dbcheck.8.%{manpage_ext}
1523 %{_mandir}/man1/bsmtp.1.%{manpage_ext}
1528 # test for bacula database older than version 9
1529 # note: this ASSUMES no password has been set for bacula database
1530 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1535 # test for bacula database older than version 9
1536 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
1537 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1542 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1545 %if ! %{client_only}
1546 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "9" ]; then
1547 echo "This bacula upgrade will update a bacula database from version 9 to 10."
1548 echo "You appear to be running database version $DB_VER. You must first update"
1549 echo "your database to version 9 and then install this upgrade. The alternative"
1550 echo "is to use %{script_dir}/drop_%{db_backend}_tables to delete all your your current"
1551 echo "catalog information, then do the upgrade. Information on updating a"
1552 echo "database older than version 9 can be found in the release notes."
1561 %if ! %{client_only}
1562 # check for and copy %{sysconf_dir}/console.conf to bconsole.conf
1563 if [ -s %{sysconf_dir}/console.conf ];then
1564 cp -p %{sysconf_dir}/console.conf %{sysconf_dir}/bconsole.conf
1567 # create the daemon users and groups
1568 # first create the groups if they don't exist
1569 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1570 if [ -z "$HAVE_BACULA" ]; then
1571 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1572 echo "The group %{daemon_group} has been added to %{group_file}."
1573 echo "See the manual chapter \"Running Bacula\" for details."
1575 HAVE_BACULA=`grep %{storage_daemon_group} %{group_file} 2>/dev/null`
1576 if [ -z "$HAVE_BACULA" ]; then
1577 %{groupadd} -r %{storage_daemon_group} > /dev/null 2>&1
1578 echo "The group %{storage_daemon_group} has been added to %{group_file}."
1579 echo "See the manual chapter \"Running Bacula\" for details."
1581 # now create the users if they do not exist
1582 # we do not use the -g option allowing the primary group to be set to system default
1583 # this will be a unique group on redhat type systems or the group users on some systems
1584 HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
1585 if [ -z "$HAVE_BACULA" ]; then
1586 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{storage_daemon_group} -M -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
1587 echo "The user %{storage_daemon_user} has been added to %{user_file}."
1588 echo "See the manual chapter \"Running Bacula\" for details."
1590 HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
1591 if [ -z "$HAVE_BACULA" ]; then
1592 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
1593 echo "The user %{director_daemon_user} has been added to %{user_file}."
1594 echo "See the manual chapter \"Running Bacula\" for details."
1596 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1597 if [ -z "$HAVE_BACULA" ]; then
1598 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1599 echo "The user %{file_daemon_user} has been added to %{user_file}."
1600 echo "See the manual chapter \"Running Bacula\" for details."
1602 # now we add the supplementary groups, this is ok to call even if the users already exist
1603 # we only do this if the user is NOT root
1604 IS_ROOT=%{director_daemon_user}
1605 if [ "$IS_ROOT" != "root" ]; then
1606 %{usermod} -G %{daemon_group} %{director_daemon_user}
1608 IS_ROOT=%{storage_daemon_user}
1609 if [ "$IS_ROOT" != "root" ]; then
1610 %{usermod} -G %{daemon_group},%{storage_daemon_group} %{storage_daemon_user}
1612 IS_ROOT=%{file_daemon_user}
1613 if [ "$IS_ROOT" != "root" ]; then
1614 %{usermod} -G %{daemon_group} %{file_daemon_user}
1628 %if ! %{client_only}
1630 if [ "$1" -ge 1 ] ; then
1631 /sbin/chkconfig --add bacula-dir
1632 /sbin/chkconfig --add bacula-fd
1633 /sbin/chkconfig --add bacula-sd
1638 # test for an existing database
1639 # note: this ASSUMES no password has been set for bacula database
1640 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1642 # grant privileges and create tables if they do not exist
1643 if [ -z "$DB_VER" ]; then
1644 echo "Hmm, doesn't look like you have an existing database."
1645 echo "Granting privileges for MySQL user bacula..."
1646 %{script_dir}/grant_mysql_privileges
1647 echo "Creating MySQL bacula database..."
1648 %{script_dir}/create_mysql_database
1649 echo "Creating bacula tables..."
1650 %{script_dir}/make_mysql_tables
1652 # check to see if we need to upgrade a 1.38 or lower database
1653 elif [ "$DB_VER" -lt "10" ]; then
1654 echo "This release requires an upgrade to your bacula database."
1655 echo "Backing up your current database..."
1656 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1657 echo "Upgrading bacula database ..."
1658 %{script_dir}/update_mysql_tables
1659 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1665 # test for an existing database
1666 if [ -s %{working_dir}/bacula.db ]; then
1667 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1668 # check to see if we need to upgrade a 1.38 or lower database
1669 if [ "$DB_VER" -lt "10" ] && [ "$DB_VER" -ge "9" ]; then
1670 echo "This release requires an upgrade to your bacula database."
1671 echo "Backing up your current database..."
1672 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1673 echo "Upgrading bacula database ..."
1674 %{script_dir}/update_sqlite_tables
1675 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1678 # create the database and tables
1679 echo "Hmm, doesn't look like you have an existing database."
1680 echo "Creating SQLite database..."
1681 %{script_dir}/create_sqlite_database
1682 echo "Creating the SQLite tables..."
1683 %{script_dir}/make_sqlite_tables
1688 # test for an existing database
1689 # note: this ASSUMES no password has been set for bacula database
1690 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1692 # grant privileges and create tables if they do not exist
1693 if [ -z "$DB_VER" ]; then
1694 echo "Hmm, doesn't look like you have an existing database."
1695 echo "Creating PostgreSQL bacula database..."
1696 %{script_dir}/create_postgresql_database
1697 echo "Creating bacula tables..."
1698 %{script_dir}/make_postgresql_tables
1699 echo "Granting privileges for PostgreSQL user bacula..."
1700 %{script_dir}/grant_postgresql_privileges
1702 # check to see if we need to upgrade a 1.38 or lower database
1703 elif [ "$DB_VER" -lt "10" ]; then
1704 echo "This release requires an upgrade to your bacula database."
1705 echo "Backing up your current database..."
1706 pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1707 echo "Upgrading bacula database ..."
1708 %{script_dir}/update_postgresql_tables
1709 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1714 %if ! %{client_only}
1715 # generate passwords if needed
1716 if [ -d %{sysconf_dir} ]; then
1718 for file in *.conf; do
1719 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
1720 need_password=`grep $string $file 2>/dev/null`
1721 if [ -n "$need_password" ]; then
1722 pass=`openssl rand -base64 33`
1723 sed "s-$string-$pass-g" $file > $file.new
1724 cp -f $file.new $file; rm -f $file.new
1741 %if ! %{client_only}
1744 /sbin/chkconfig --del bacula-dir
1745 /sbin/chkconfig --del bacula-fd
1746 /sbin/chkconfig --del bacula-sd
1751 %if ! %{client_only}
1753 %defattr(-,root,root)
1754 %attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
1755 %attr(-, root, %{storage_daemon_group}) /usr/sbin/mtx
1756 %attr(-, root, %{storage_daemon_group}) /usr/sbin/scsitape
1757 %attr(-, root, %{storage_daemon_group}) /usr/sbin/tapeinfo
1758 %{_mandir}/man1/loaderinfo.1.%{manpage_ext}
1759 %{_mandir}/man1/mtx.1.%{manpage_ext}
1760 %{_mandir}/man1/scsitape.1.%{manpage_ext}
1761 %{_mandir}/man1/tapeinfo.1.%{manpage_ext}
1765 %defattr(-,root,root)
1766 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1767 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1768 %{script_dir}/bacula-ctl-fd
1769 /etc/init.d/bacula-fd
1770 %attr(-, root, %{daemon_group}) %{sysconf_dir}/rescue
1772 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1773 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1775 /etc/logrotate.d/bacula
1777 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1778 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1780 %attr(-, root, %{daemon_group}) %dir %{working_dir}
1783 /usr/sbin/btraceback
1784 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1785 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1787 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1788 %{_mandir}/man8/bacula.8.%{manpage_ext}
1789 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1790 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1794 # create the daemon group and user
1795 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1796 if [ -z "$HAVE_BACULA" ]; then
1797 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1798 echo "The group %{daemon_group} has been added to %{group_file}."
1799 echo "See the manual chapter \"Running Bacula\" for details."
1801 # we do not use the -g option allowing the primary group to be set to system default
1802 # this will be a unique group on redhat type systems or the group users on some systems
1803 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1804 if [ -z "$HAVE_BACULA" ]; then
1805 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1806 echo "The user %{file_daemon_user} has been added to %{user_file}."
1807 echo "See the manual chapter \"Running Bacula\" for details."
1809 # now we add the supplementary group, this is ok to call even if the user already exists
1810 # we only do this if the user is NOT root
1811 IS_ROOT=%{file_daemon_user}
1812 if [ "$IS_ROOT" != "root" ]; then
1813 %{usermod} -G %{daemon_group} %{file_daemon_user}
1818 if [ "$1" -ge 1 ] ; then
1819 /sbin/chkconfig --add bacula-fd
1822 # generate passwords if needed
1823 if [ -d %{sysconf_dir} ]; then
1825 for file in *.conf; do
1826 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
1827 need_password=`grep $string $file 2>/dev/null`
1828 if [ -n "$need_password" ]; then
1829 pass=`openssl rand -base64 33`
1830 sed "s-$string-$pass-g" $file > $file.new
1831 cp -f $file.new $file; rm -f $file.new
1840 /sbin/chkconfig --del bacula-fd
1843 %if ! %{client_only}
1845 %defattr(-,root,%{daemon_group})
1846 %{script_dir}/updatedb/*
1849 # create the daemon group
1850 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1851 if [ -z "$HAVE_BACULA" ]; then
1852 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1853 echo "The group %{daemon_group} has been added to %{group_file}."
1854 echo "See the manual chapter \"Running Bacula\" for details."
1858 echo "The database update scripts were installed to %{script_dir}/updatedb"
1863 %defattr(-,root,root)
1864 /usr/sbin/bgnome-console
1865 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1866 %attr(-, root, %{daemon_group}) %{script_dir}/gconsole
1867 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bgnome-console.conf
1868 /usr/share/pixmaps/bacula.png
1869 /usr/share/applications/bacula.desktop
1870 %{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
1873 %if %{gconsole} && ! %{rh8}
1874 /usr/sbin/bacula-tray-monitor
1875 %config(noreplace) %{sysconf_dir}/tray-monitor.conf
1876 /usr/share/pixmaps/bacula-tray-monitor.xpm
1877 /usr/share/applications/bacula-tray-monitor.desktop
1878 %{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
1881 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102}
1882 # add the console helper files
1883 %config(noreplace,missingok) /etc/pam.d/bgnome-console
1884 %config(noreplace,missingok) /etc/security/console.apps/bgnome-console
1885 /usr/bin/bgnome-console
1890 # create the daemon group
1891 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1892 if [ -z "$HAVE_BACULA" ]; then
1893 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1894 echo "The group %{daemon_group} has been added to %{group_file}."
1895 echo "See the manual chapter \"Running Bacula\" for details."
1899 # generate passwords if needed
1900 if [ -d %{sysconf_dir} ]; then
1902 for file in *.conf; do
1903 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
1904 need_password=`grep $string $file 2>/dev/null`
1905 if [ -n "$need_password" ]; then
1906 pass=`openssl rand -base64 33`
1907 sed "s-$string-$pass-g" $file > $file.new
1908 cp -f $file.new $file; rm -f $file.new
1917 %defattr(-,root,root)
1918 /usr/sbin/bwx-console
1919 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
1920 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bwx-console.conf
1921 /usr/share/pixmaps/wxwin16x16.xpm
1922 /usr/share/applications/wxconsole.desktop
1923 %{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
1926 %if %{wxconsole} && ! %{su9} && ! %{su10} && ! %{su102}
1927 # add the console helper files
1928 %config(noreplace,missingok) /etc/pam.d/bwx-console
1929 %config(noreplace,missingok) /etc/security/console.apps/bwx-console
1930 /usr/bin/bwx-console
1935 # create the daemon group
1936 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1937 if [ -z "$HAVE_BACULA" ]; then
1938 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1939 echo "The group %{daemon_group} has been added to %{group_file}."
1940 echo "See the manual chapter \"Running Bacula\" for details."
1944 # generate passwords if needed
1945 if [ -d %{sysconf_dir} ]; then
1947 for file in *.conf; do
1948 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
1949 need_password=`grep $string $file 2>/dev/null`
1950 if [ -n "$need_password" ]; then
1951 pass=`openssl rand -base64 33`
1952 sed "s-$string-$pass-g" $file > $file.new
1953 cp -f $file.new $file; rm -f $file.new
1962 %defattr(-,root,root)
1964 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
1965 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
1966 /usr/share/pixmaps/bat_icon.png
1967 /usr/share/applications/bat.desktop
1968 %{_mandir}/man1/bat.1.%{manpage_ext}
1971 %if %{bat} && ! %{su9} && ! %{su10} && ! %{su102}
1972 # add the console helper files
1973 %config(noreplace,missingok) /etc/pam.d/bat
1974 %config(noreplace,missingok) /etc/security/console.apps/bat
1980 # create the daemon group
1981 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1982 if [ -z "$HAVE_BACULA" ]; then
1983 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1984 echo "The group %{daemon_group} has been added to %{group_file}."
1985 echo "See the manual chapter \"Running Bacula\" for details."
1989 # generate passwords if needed
1990 if [ -d %{sysconf_dir} ]; then
1992 for file in *.conf; do
1993 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
1994 need_password=`grep $string $file 2>/dev/null`
1995 if [ -n "$need_password" ]; then
1996 pass=`openssl rand -base64 33`
1997 sed "s-$string-$pass-g" $file > $file.new
1998 cp -f $file.new $file; rm -f $file.new
2006 * Sun May 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2007 - add fc7 build target
2008 * Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2010 - gnome-console now bgnome-console
2011 - wxconsole now bwx-console
2012 - add build option for bat
2013 * Sat Apr 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2014 - merge Otto Mueller's patch but keep script dir set to /etc/bacula
2015 - add build tag for Scientific Linux per Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk>
2016 * Tue Mar 27 2007 Otto Mueller <otto.mueller@bundestag.de>
2017 - adjust directory locations for FHS-compatibility
2018 sysconf_dir (/etc/bacula), script_dir (/usr/lib/bacula),
2019 working_dir (/var/lib/bacula) and pid_dir (/var/run)
2020 * Mon Feb 26 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2021 - add SuSE 10.2 target
2022 * Sat Jan 20 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2024 - set query.sql as config file
2026 * Sun Jan 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2028 - change determination of gcc version per patch from Marc Hennes
2029 - move BuildRequire for atk-devel to gnome only builds
2031 * Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2033 * Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2034 - 1.39.26 remove create_sqlite_database.in.patch
2035 * Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2036 - change ownership of working_dir on server packages to bacula.bacula so that
2037 - bacula-sd can create bootstrap files
2038 * Sat Sep 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2039 - 1.39.22 remove separate cd and make of manpages the main Makefile does it now
2040 * Sun Aug 06 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2041 - fix manpages file extension for mdk
2042 * Sat Aug 05 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2043 - bug 648 re-enable and update sqlite patches
2047 - lock out gconsole build for gtk+ < 2.4
2048 * Mon Jul 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2049 - move pango-devel BuildRequires into gconsole only build
2050 * Sat Jul 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2051 - add provides and conflicts for standard suse packages
2052 - add third party packager tag support
2053 - add build_client_only tag
2054 - remove bsmtp from client package
2055 - add bacula-ctl-fd to client package
2056 * Thu Jul 13 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2057 - fix directory creation when wxconsole and not gconsole
2058 * Tue Jul 04 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2059 - add check to buildrequires to make sure libstdc++ version matches gcc
2060 * Mon Jul 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2061 - add python build support
2062 - fix LDFLAGS declarations
2063 * Sun Jul 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2064 - add requires for standard compiler toolchain
2065 - move version and release tags up
2067 - add docs_version tag
2068 * Sat Jul 01 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2069 - update rescuever to 1.8.6
2070 * Sun Jun 25 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2071 - update depkgs to 25Jun06
2072 - add mysql5 build tag
2073 * Mon Jun 12 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2074 - 1.38.10 bump rescue version
2075 * Sun Jun 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2076 - fix usermod statements
2078 * Thu Apr 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2079 - add -g param back to useradd statements Bug 605
2080 * Mon Apr 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2081 - redundant code cleanup
2082 * Sun Apr 16 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2083 - add wxconsole package
2084 * Fri Apr 14 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2086 - dependency update for Mandriva
2087 * Sun Apr 08 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2089 - remove -n option from useradd scripts
2090 * Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2092 - fix problem specifying more than one primary group for user bacula
2093 - add build switch to not build gconsole regardless of platform
2094 * Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2095 - add centos3 build tag
2096 - fix link error of static-fd on Mandrake with --disable-nls
2097 * Fri Jan 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2098 - add fc4 dependencies
2099 * Mon Jan 23 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2100 - add SuSE 10.0 build
2101 - remove specific permission in attrib macros
2102 * Sat Jan 21 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2104 - fix usermode required on suse, suse doesn't have usermode (xsu instead)
2105 - refix compat for _dist on SLES9 which seems to have been removed
2106 - added note regarding Aleksandar's use of specific permissions in attrib macros
2107 - need to review and add specific fc4 build currently using fc3 Requires
2108 * Wed Dec 14 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2110 - Reorganize files and pre/post sections to remove repetitions
2111 - Always build separate mtx package
2112 - Fix file ownerships for /etc/bacula and Bacula's working dir
2113 * Wed Nov 23 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2114 - Disable GNOME on RH7
2115 * Fri Nov 18 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2116 - Red Hat and look alikes have mtx RPM, do not build/package our version
2117 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2118 - minor edit to _dist for SLES9 compatibility
2119 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2121 - kern changed location of pdf files and html manual in docs package
2122 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2124 - add docs (from prebuilt tarball) and rescue packages back in
2125 - remove dvd-freespace and dvd-writepart files, add dvd-handler
2126 - remove 3 of 4 sqlite script patches as not needed
2127 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2129 - remove docs and rescue sections (remove static fd)
2130 - add dvd-freespace and dvd-writepart files
2131 - update depkgs to 22Jun05
2132 - change database update to 8 to 9
2133 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2134 - minor cleanups before 1.38 changes
2135 - add popt and popt-devel build dependencies
2136 - add tetex and tetex-dvips dependencies for doc build
2137 - replace deprecated Copyright tag with License
2138 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2139 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
2140 - conflict with sqlite packages. remove readline dependency.
2141 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2142 - release 1.36.3 update docs
2143 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2144 - add centos4 build tag
2145 - add x86_64 build tag
2146 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2147 - add rhel4 build tag
2148 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
2149 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2150 - add rhel3 build tag
2151 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2152 - fix tray-monitor.conf for noreplace
2153 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2154 - fix distribution check for Fedora and Whitebox
2155 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2156 - add logwatch script
2158 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2159 - add build for Fedora Core 3 (linc now included in ORDit2)
2160 - add mysql4 define for Mandrake 10.1
2161 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2162 - fix {group_file} variable in post scripts
2163 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
2164 - add distribution checking and custom Distribution tag
2165 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2166 - ASSIGNMENT OF COPYRIGHT
2167 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
2168 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
2169 - all right, title and interest in and to the copyright in this software RPM
2170 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
2171 - free of all liens, encumbrances or any known claims against said copyright.
2172 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2174 - thanks to Daniel Widyono
2175 - update description for rescue package to describe cdrom creation
2176 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2177 - update depkgs to 29Oct04
2178 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2179 - add cdrom rescue to bacula-rescue package
2180 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2181 - misc fixes from 1.36.0 suse feedback
2182 - fix situation where sqlite database exists but sqlite has been removed.
2183 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2184 - remove tray-monitor from RH8 build
2185 - fix permissions on tray-monitor files
2186 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2187 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
2188 - change database update to 7 to 8 upgrade,
2189 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
2190 - build in 30Jul04, add freetype dependancy to gnome package.
2191 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2192 - add documentation to console for groupadd
2193 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2194 - add support for running daemons as root.bacula
2195 - correct for change in location of floppy rescue files in 1.35.2
2196 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
2197 - updated depgkgs to 30Jul04
2198 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2199 - really, really fix symlink creation for gconsole
2200 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2201 - fix symlink creation in gconsole post install
2202 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2203 - fixed error in gconsole post script
2204 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2205 - add check for gconsole symlink before trying to create it
2206 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2207 - fix some minor permissions issues on doc files that CVS won't let us fix
2208 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2209 - add pkgconfig to BuildRequires
2210 - clean up gnome1/2 menu entries for appropriate packages
2211 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2212 - tightened up doc distribution
2213 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2214 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
2215 - rpm's horrible bug that prevents nested conditional macros prevents me
2216 - from implementing these 2 separate approaches within the conditionals which
2217 - create the separate server packages.
2218 - the solution adopted is to remove the gnome-console files from the server packages
2219 - so bacula-gconsole is now an add on for both client and server packages.
2220 - this also now allows the server packages to be install on machines without
2221 - an X-server and we can still maintain a single spec file.
2222 - added tests to make sure we have defined platform and database macros.
2223 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2224 - corrected mysql prerequisites for suse
2225 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2226 - replaced all cp commands with cp -p
2227 - removed addition of a+x permissions on gnome-console
2228 - corrected permissions on init scripts
2229 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2230 - corrected creation of sqlite_bindir in install from !mysql to sqlite
2232 - various cleanup patches from Michael K. Johnson:
2233 - corrected post install routines for nicer chkconfig
2234 - removed chmod changes in post routines and moved to install section
2235 - removed interactive nature of post routine for rescue package
2236 - added description of building rescue disks to the description of rescue package
2237 - added clean of build root to beginning of install
2238 - removed specifying attr in all file lists
2239 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2240 - added bconsole to client package
2241 - added gconsole package as add-on to client
2242 - removed spurious dependancies on updatedb package (!cut/paste)
2243 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2244 - added updatedb package
2245 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2246 - added postgresql package
2247 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2248 - corrected the if else logic in the dependancy sections
2249 - changes for 1.34 release
2250 - /etc/bacula/console is now /etc/bacula/bconsole
2251 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
2252 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
2253 - /usr/sbin/smtp is now /usr/sbin/bsmtp
2254 - added new /etc/bacula/drop_mysql_database
2255 - added new /etc/bacula/drop_sqlite_database
2256 - added new /etc/bacula/grant_sqlite_privileges
2257 - added new generic bacula database scripts in /etc/bacula
2258 - added pre-install sections to check for database versions older than 6
2259 - added check for /etc/bacula/console.conf and copy to bconsole.conf
2260 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2261 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
2262 - added testing for existing databases before executing any of the database creation scripts
2263 - added defines working_dir and sqlite_bindir in place of hard coded paths
2264 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2265 - added build configuration for SuSE.
2266 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
2267 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2268 - added patch for create_sqlite_database to fix the installed bindir
2269 - added execute of create_sqlite_database to post of sqlite package
2270 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2271 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
2272 - added bacula-fd as Requires for rescue package
2273 - added build tag for Fedora Core 1
2274 - cleaned up dependancies for all builds
2275 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2276 - removed rh_version from package names
2277 - added platform build configuration section to beginning of file
2278 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2279 - removed make_static_bacula script from rescue package install
2280 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2281 - Added define at top of file for depkgs version
2282 - Added rescue sub-package
2283 - Moved requires statements into proper sub-package locations
2284 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2285 - Corrected Requires for Gnome 1.4/2.0 builds
2286 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2287 - Added separate source declaration for depkgs
2288 - added patch for make_catalog_backup script
2289 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2290 - Misc changes to mysql/sqlite build and rh7/8 menu differences
2291 - Added rh_version to sub-package names
2292 - Added installed but missing file /etc/bacula/gconsole
2293 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
2294 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
2295 - Update spec for version 1.31 and combine client
2296 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>