2 # Copyright (C) 2000-2006 Kern Sibbald
4 # Platform Build Configuration
6 # basic defines for every build
7 %define _version @VERSION@
9 %define depkgs_version 09Sep07
10 %define _rescuever @VERSION@
11 %define docs_version @VERSION@
13 # any patches for this release
14 # be sure to check the setup section for patch macros
16 #--------------------------------------------------------------------------
17 # it should not be necessary to change anything below here for a release
18 # except for patch macros in the setup section
19 #--------------------------------------------------------------------------
21 # third party packagers
22 %define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
23 %{?contrib_packager:%define _packager %{contrib_packager}}
25 Summary: Bacula - The Network Backup Solution
29 Group: System Environment/Daemons
31 Source0: http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
32 Source1: http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
33 Source2: Release_Notes-%{version}-%{release}.tar.gz
34 Source3: http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{docs_version}.tar.gz
35 Source4: http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
36 BuildRoot: %{_tmppath}/%{name}-root
37 URL: http://www.bacula.org/
38 Vendor: The Bacula Team
39 Packager: %{_packager}
41 # define the basic package description
42 %define blurb Bacula - It comes by night and sucks the vital essence from your computers.
43 %define blurb2 Bacula is a set of computer programs that permit you (or the system
44 %define blurb3 administrator) to manage backup, recovery, and verification of computer
45 %define blurb4 data across a network of computers of different kinds. In technical terms,
46 %define blurb5 it is a network client/server based backup program. Bacula is relatively
47 %define blurb6 easy to use and efficient, while offering many advanced storage management
48 %define blurb7 features that make it easy to find and recover lost or damaged files.
49 %define blurb8 Bacula source code has been released under the GPL version 2 license.
52 %define sqlite_bindir /usr/lib/bacula/sqlite
53 %define _docsrc ../%{name}-docs-%{docs_version}
54 %define _rescuesrc ../%{name}-rescue-%{_rescuever}
55 %define depkgs ../depkgs
56 %define _mandir /usr/share/man
58 # directory locations for FHS-compatibility
59 %define sysconf_dir /etc/bacula
60 %define script_dir /etc/bacula
61 %define working_dir /var/lib/bacula
62 %define pid_dir /var/run
64 # NOTE these defines are used in some rather complex useradd and groupadd
65 # commands. If you change them examine the post scripts for consequences.
66 %define director_daemon_user bacula
67 %define storage_daemon_user bacula
68 %define file_daemon_user root
69 %define daemon_group bacula
70 # group that has write access to tape devices, usually disk on Linux
71 %define storage_daemon_group disk
72 %define user_file /etc/passwd
73 %define group_file /etc/group
76 %define useradd /usr/sbin/useradd
77 %define groupadd /usr/sbin/groupadd
78 %define usermod /usr/sbin/usermod
80 # platform defines - set one below or define the build_xxx on the command line
83 %{?build_rh7:%define rh7 1}
85 %{?build_rh8:%define rh8 1}
87 %{?build_rh9:%define rh9 1}
90 %{?build_fc1:%define fc1 1}
92 %{?build_fc3:%define fc3 1}
94 %{?build_fc4:%define fc4 1}
96 %{?build_fc5:%define fc5 1}
98 %{?build_fc6:%define fc6 1}
100 %{?build_fc7:%define fc7 1}
101 # Whitebox Enterprise build
103 %{?build_wb3:%define wb3 1}
104 # RedHat Enterprise builds
106 %{?build_rhel3:%define rhel3 1}
107 %{?build_rhel3:%define wb3 1}
109 %{?build_rhel4:%define rhel4 1}
110 %{?build_rhel4:%define fc3 1}
112 %{?build_rhel5:%define rhel5 1}
113 %{?build_rhel5:%define fc6 1}
116 %{?build_centos3:%define centos3 1}
117 %{?build_centos3:%define wb3 1}
119 %{?build_centos4:%define centos4 1}
120 %{?build_centos4:%define fc3 1}
122 %{?build_centos5:%define centos5 1}
123 %{?build_centos5:%define fc6 1}
126 %{?build_sl3:%define sl3 1}
127 %{?build_sl3:%define wb3 1}
129 %{?build_sl4:%define sl4 1}
130 %{?build_sl4:%define fc3 1}
132 %{?build_sl5:%define sl5 1}
133 %{?build_sl5:%define fc6 1}
136 %{?build_su9:%define su9 1}
138 %{?build_su10:%define su10 1}
140 %{?build_su102:%define su102 1}
143 %{?build_mdk:%define mdk 1}
145 %{?build_mdv:%define mdv 1}
146 %{?build_mdv:%define mdk 1}
149 %define client_only 0
150 %{?build_client_only:%define client_only 1}
152 # test for a platform definition
153 %if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk}
154 %{error: You must specify a platform. Please examine the spec file.}
159 # set for database support desired or define the build_xxx on the command line
161 %{?build_mysql:%define mysql 1}
162 # if using mysql 4.x define this and mysql above
163 # currently: Mandrake 10.1, SuSE 9.x & 10.0, RHEL4 and Fedora Core 4
165 %{?build_mysql4:%define mysql4 1}
166 %{?build_mysql4:%define mysql 1}
167 # if using mysql 5.x define this and mysql above
168 # currently: SuSE 10.1 and Fedora Core 5
170 %{?build_mysql5:%define mysql5 1}
171 %{?build_mysql5:%define mysql 1}
173 %{?build_sqlite:%define sqlite 1}
175 %{?build_postgresql:%define postgresql 1}
177 # test for a database definition
178 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql} && ! %{client_only}
179 %{error: You must specify database support. Please examine the spec file.}
184 %define db_backend mysql
187 %define db_backend sqlite
190 %define db_backend postgresql
195 %{?build_x86_64:%define x86_64 1}
197 # check what distribution we are
198 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4} || %{rhel5}
199 %define _dist %(grep Red /etc/redhat-release)
201 %if %{fc1} || %{fc4} || %{fc5} || %{fc7}
202 %define _dist %(grep Fedora /etc/redhat-release)
204 %if %{centos5} || %{centos4} || %{centos3}
205 %define _dist %(grep CentOS /etc/redhat-release)
207 %if %{sl5} ||%{sl4} || %{sl3}
208 %define _dist %(grep 'Scientific Linux' /etc/redhat-release)
210 %if %{fc3} && ! %{rhel4} && ! %{centos4} && ! %{sl4}
211 %define _dist %(grep Fedora /etc/redhat-release)
213 %if %{fc6} && ! %{rhel5} && ! %{centos5} && ! %{sl5}
214 %define _dist %(grep Fedora /etc/redhat-release)
216 %if %{wb3} && ! %{rhel3} && ! %{centos3} && ! %{sl3}
217 %define _dist %(grep White /etc/whitebox-release)
219 %if %{su9} || %{su10} || %{su102}
220 %define _dist %(grep -i SuSE /etc/SuSE-release)
223 %define _dist %(grep Mand /etc/mandrake-release)
225 Distribution: %{_dist}
227 # Should we build gconsole, possible only if gtk= >= 2.4 available.
228 # leaving all the BuildRequires and Requires in place below for now.
229 # su10, fc3 and fc4 now nobuild, tray monitor fails to build as of 2.2.1
230 # release as it needs 2.10
233 %if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{su9} || %{su10}
236 %if %{mdk} && ! %{mdv}
240 # specifically disallow gconsole if desired
241 %{?nobuild_gconsole:%define gconsole 0}
243 # Should we build wxconsole, only wxWidgets >=2.6 is supported
244 # currently only SuSE 10 and FC4/FC5
246 %{?build_wxconsole:%define wxconsole 1}
248 # Should we build bat
251 %{?build_bat:%define bat 1}
253 # should we turn on python support
255 %{?build_python:%define python 1}
257 # Mandriva somehow forces the manpage file extension to bz2 rather than gz
259 %define manpage_ext bz2
261 %define manpage_ext gz
264 # for client only build
275 %{expand: %%define gccver %(rpm -q --queryformat %%{version} gcc)}
276 %{expand: %%define gccrel %(rpm -q --queryformat %%{release} gcc)}
278 BuildRequires: gcc, gcc-c++, make, autoconf
279 BuildRequires: ncurses-devel, perl
280 BuildRequires: libstdc++-devel = %{gccver}-%{gccrel}, libxml2-devel, zlib-devel
281 BuildRequires: openssl-devel
283 BuildRequires: python, python-devel
284 %{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
287 BuildRequires: pkgconfig, pango-devel, atk-devel
290 # Rh qt4 packages don't provide, guess what, qt!
291 # so fix for broken rh
293 %if %{rhel5} || %{centos5} || %{sl5} || %{fc5} || %{fc6} || %{fc7}
296 %if %{bat} && ! %{broken_rh}
297 BuildRequires: qt-devel >= 4.2
299 %if %{bat} && %{broken_rh}
300 BuildRequires: qt4-devel >= 4.2
304 BuildRequires: libtermcap-devel
305 BuildRequires: glibc-devel >= 2.2
308 BuildRequires: termcap
309 BuildRequires: glibc-devel >= 2.3
311 %if %{su9} && %{gconsole}
312 BuildRequires: libgnome >= 2.0
313 BuildRequires: gtk2-devel >= 2.0
314 BuildRequires: libgnomeui-devel >= 2.0
315 BuildRequires: ORBit2-devel
316 BuildRequires: libart_lgpl-devel >= 2.0
317 BuildRequires: libbonobo-devel >= 2.0
318 BuildRequires: libbonoboui-devel >= 2.0
319 BuildRequires: bonobo-activation-devel
320 BuildRequires: gconf2-devel
321 BuildRequires: linc-devel
322 BuildRequires: freetype2-devel
325 BuildRequires: termcap
326 BuildRequires: glibc-devel >= 2.3
328 %if %{su10} && %{gconsole}
329 BuildRequires: libgnome >= 2.12
330 BuildRequires: gtk2-devel >= 2.8
331 BuildRequires: libgnomeui-devel >= 2.12
332 BuildRequires: ORBit2-devel
333 BuildRequires: libart_lgpl-devel >= 2.3
334 BuildRequires: libbonobo-devel >= 2.10
335 BuildRequires: libbonoboui-devel >= 2.10
336 BuildRequires: bonobo-activation-devel
337 BuildRequires: gconf2-devel
338 BuildRequires: freetype2-devel
339 BuildRequires: cairo-devel
340 BuildRequires: fontconfig-devel >= 2.3
341 BuildRequires: gnome-vfs2-devel >= 2.12
342 BuildRequires: libpng-devel
345 BuildRequires: termcap
346 BuildRequires: glibc-devel >= 2.5
348 %if %{su102} && %{gconsole}
349 BuildRequires: libgnome >= 2.16
350 BuildRequires: gtk2-devel >= 2.10
351 BuildRequires: libgnomeui-devel >= 2.16
352 BuildRequires: ORBit2-devel
353 BuildRequires: libart_lgpl-devel >= 2.3
354 BuildRequires: libbonobo-devel >= 2.16
355 BuildRequires: libbonoboui-devel >= 2.16
356 BuildRequires: bonobo-activation-devel
357 BuildRequires: gconf2-devel
358 BuildRequires: freetype2-devel
359 BuildRequires: cairo-devel
360 BuildRequires: fontconfig-devel >= 2.4
361 BuildRequires: gnome-vfs2-devel >= 2.16
362 BuildRequires: libpng-devel
365 BuildRequires: libtermcap-devel
366 BuildRequires: libstdc++-static-devel
367 BuildRequires: glibc-static-devel
368 BuildRequires: glibc-devel >= 2.3
370 %if %{mdk} && !%{mdv} && %{gconsole}
371 BuildRequires: gtk2-devel >= 2.0
372 BuildRequires: libgnomeui2-devel >= 2.0
373 BuildRequires: libORBit2-devel
374 BuildRequires: libart_lgpl-devel >= 2.0
375 BuildRequires: libbonobo2_0-devel
376 BuildRequires: libbonoboui2_0-devel
377 BuildRequires: libbonobo-activation-devel
378 BuildRequires: libGConf2-devel
379 BuildRequires: freetype2-devel
381 %if %{mdv} && %{gconsole}
382 BuildRequires: gtk2-devel >= 2.8
383 BuildRequires: libgnomeui2-devel >= 2.10
384 BuildRequires: libORBit2-devel
385 BuildRequires: libart_lgpl-devel >= 2.3
386 BuildRequires: libbonobo2_0-devel
387 BuildRequires: libbonoboui2_0-devel
388 BuildRequires: libbonobo-activation-devel
389 BuildRequires: libGConf2-devel
390 BuildRequires: freetype2-devel
393 BuildRequires: libtermcap-devel
394 BuildRequires: glibc-devel >= 2.3
396 %if %{fc3} && %{gconsole}
397 BuildRequires: gtk2-devel >= 2.4
398 BuildRequires: libgnomeui-devel >= 2.8
399 BuildRequires: ORBit2-devel
400 BuildRequires: libart_lgpl-devel >= 2.3
401 BuildRequires: libbonobo-devel >= 2.8
402 BuildRequires: libbonoboui-devel >= 2.8
403 BuildRequires: bonobo-activation-devel
404 BuildRequires: GConf2-devel
405 BuildRequires: freetype-devel
408 BuildRequires: libtermcap-devel
409 BuildRequires: glibc-devel >= 2.3
411 %if %{fc4} && %{gconsole}
412 BuildRequires: gtk2-devel >= 2.6
413 BuildRequires: libgnomeui-devel >= 2.10
414 BuildRequires: ORBit2-devel
415 BuildRequires: libart_lgpl-devel >= 2.3
416 BuildRequires: libbonobo-devel >= 2.8
417 BuildRequires: libbonoboui-devel >= 2.8
418 BuildRequires: bonobo-activation-devel
419 BuildRequires: GConf2-devel
420 BuildRequires: freetype-devel
423 BuildRequires: libtermcap-devel
424 BuildRequires: glibc-devel >= 2.4
426 %if %{fc5} && %{gconsole}
427 BuildRequires: gtk2-devel >= 2.8
428 BuildRequires: libgnomeui-devel >= 2.14
429 BuildRequires: ORBit2-devel
430 BuildRequires: libart_lgpl-devel >= 2.3
431 BuildRequires: libbonobo-devel >= 2.14
432 BuildRequires: libbonoboui-devel >= 2.14
433 BuildRequires: GConf2-devel
434 BuildRequires: freetype-devel
437 BuildRequires: libtermcap-devel
438 BuildRequires: glibc-devel >= 2.5
440 %if %{fc6} && %{gconsole}
441 BuildRequires: gtk2-devel >= 2.10
442 BuildRequires: libgnomeui-devel >= 2.16
443 BuildRequires: ORBit2-devel
444 BuildRequires: libart_lgpl-devel >= 2.3
445 BuildRequires: libbonobo-devel >= 2.16
446 BuildRequires: libbonoboui-devel >= 2.16
447 BuildRequires: GConf2-devel
448 BuildRequires: freetype-devel
451 BuildRequires: libtermcap-devel
452 BuildRequires: glibc-devel >= 2.5
454 %if %{fc7} && %{gconsole}
455 BuildRequires: gtk2-devel >= 2.10
456 BuildRequires: libgnomeui-devel >= 2.18
457 BuildRequires: ORBit2-devel
458 BuildRequires: libart_lgpl-devel >= 2.3
459 BuildRequires: libbonobo-devel >= 2.18
460 BuildRequires: libbonoboui-devel >= 2.18
461 BuildRequires: GConf2-devel
462 BuildRequires: freetype-devel
464 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7}
465 BuildRequires: libtermcap-devel
466 BuildRequires: glibc-devel >= 2.3
468 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7} && %{gconsole}
469 BuildRequires: gtk2-devel >= 2.0
470 BuildRequires: libgnomeui-devel >= 2.0
471 BuildRequires: ORBit2-devel
472 BuildRequires: libart_lgpl-devel >= 2.0
473 BuildRequires: libbonobo-devel >= 2.0
474 BuildRequires: libbonoboui-devel >= 2.0
475 BuildRequires: bonobo-activation-devel
476 BuildRequires: GConf2-devel
477 BuildRequires: linc-devel
478 BuildRequires: freetype-devel
481 %if %{mysql} && ! %{mysql4} && ! %{mysql5}
482 BuildRequires: mysql-devel >= 3.23
485 %if %{mysql} && %{mysql4}
486 BuildRequires: mysql-devel >= 4.0
489 %if %{mysql} && %{mysql5}
490 BuildRequires: mysql-devel >= 5.0
493 %if %{postgresql} && %{wb3}
494 BuildRequires: rh-postgresql-devel >= 7
497 %if %{postgresql} && ! %{wb3}
498 BuildRequires: postgresql-devel >= 7
502 BuildRequires: wxGTK-devel >= 2.6
526 Summary: Bacula - The Network Backup Solution
527 Group: System Environment/Daemons
528 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
529 Conflicts: bacula-client
530 Obsoletes: bacula-rescue
532 %if %{su9} || %{su10} || %{su102}
536 Requires: ncurses, libstdc++, zlib, openssl, mtx
539 Requires: glibc >= 2.2
542 %if %{su9} || %{su10}
543 Requires: glibc >= 2.3
547 Requires: glibc >= 2.5
550 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{fc5} && ! %{fc6} && ! %{fc7}
551 Requires: glibc >= 2.3
555 Requires: glibc >= 2.4
559 Requires: glibc >= 2.5
563 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4} && ! %{mysql5}
564 Requires: mysql >= 3.23
565 Requires: mysql-server >= 3.23
567 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{mdk} && %{mysql4}
568 Requires: mysql >= 4.0
569 Requires: mysql-server >= 4.0
571 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && %{mysql5}
572 Requires: mysql >= 5.0
573 Requires: mysql-server >= 5.0
576 %if %{mysql} && %{su9} && ! %{mysql4}
577 Requires: mysql >= 3.23
578 Requires: mysql-client >= 3.23
580 %if %{mysql} && %{su9} && %{mysql4}
581 Requires: mysql >= 4.0
582 Requires: mysql-client >= 4.0
584 %if %{mysql} && %{su10} && %{mysql4}
585 Requires: mysql >= 4.0
586 Requires: mysql-client >= 4.0
588 %if %{mysql} && %{su10} && %{mysql5}
589 Requires: mysql >= 5.0
590 Requires: mysql-client >= 5.0
592 %if %{mysql} && %{su102} && %{mysql5}
593 Requires: mysql >= 5.0
594 Requires: mysql-client >= 5.0
597 %if %{mysql} && %{mdk} && ! %{mysql4}
598 Requires: mysql >= 3.23
599 Requires: mysql-client >= 3.23
601 %if %{mysql} && %{mdk} && %{mysql4}
602 Requires: mysql >= 4.0
603 Requires: mysql-client >= 4.0
606 %if %{postgresql} && %{wb3}
607 Requires: rh-postgresql >= 7
608 Requires: rh-postgresql-server >= 7
610 %if %{postgresql} && ! %{wb3}
611 Requires: postgresql >= 7
612 Requires: postgresql-server >= 7
622 %description postgresql
626 Requires: python >= %{pyver}
640 This build requires MySQL to be installed separately as the catalog database.
643 This build requires PostgreSQL to be installed separately as the catalog database.
646 This build incorporates sqlite as the catalog database, statically compiled.
649 This build includes python scripting support.
654 Summary: Bacula - The Network Backup Solution
655 Group: System Environment/Daemons
659 This is Bacula's version of mtx tape utilities for Linux distributions that
660 do not provide their own mtx package
664 Summary: Bacula - The Network Backup Solution
665 Group: System Environment/Daemons
667 Conflicts: bacula-mysql
668 Conflicts: bacula-sqlite
669 Conflicts: bacula-postgresql
670 Obsoletes: bacula-rescue
672 %if %{su9} || %{su10} || %{su102}
676 Requires: libstdc++, zlib, openssl
679 Requires: glibc >= 2.2
682 %if %{su9} || %{su10}
683 Requires: glibc >= 2.3
687 Requires: glibc >= 2.5
690 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{fc5} && ! %{fc6}
691 Requires: glibc >= 2.3
695 Requires: glibc >= 2.4
699 Requires: glibc >= 2.5
704 Requires: python >= %{pyver}
718 This is the File daemon (Client) only package. It includes the command line
721 This build includes python scripting support.
727 Summary: Bacula - The Network Backup Solution
728 Group: System Environment/Daemons
730 %description updatedb
741 This package installs scripts for updating older versions of the bacula
747 Summary: Bacula - The Network Backup Solution
748 Group: System Environment/Daemons
749 Requires: atk, libstdc++, zlib, pango, libxml2, bacula-fd, openssl
752 %if %{gconsole} && %{su9}
753 Requires: gtk2 >= 2.0
754 Requires: libgnome >= 2.0
755 Requires: libgnomeui >= 2.0
756 Requires: glibc >= 2.3
758 Requires: libart_lgpl >= 2.0
759 Requires: libbonobo >= 2.0
760 Requires: libbonoboui >= 2.0
761 Requires: bonobo-activation
766 %if %{gconsole} && %{su10}
767 Requires: gtk2 >= 2.8
768 Requires: libgnome >= 2.12
769 Requires: libgnomeui >= 2.12
770 Requires: glibc >= 2.3
772 Requires: libart_lgpl >= 2.3
773 Requires: libbonobo >= 2.10
774 Requires: libbonoboui >= 2.10
775 Requires: bonobo-activation
779 Requires: fontconfig >= 2.3
780 Requires: gnome-vfs2 >= 2.12
783 %if %{gconsole} && %{su102}
784 Requires: gtk2 >= 2.10
785 Requires: libgnome >= 2.16
786 Requires: libgnomeui >= 2.16
787 Requires: glibc >= 2.5
789 Requires: libart_lgpl >= 2.3
790 Requires: libbonobo >= 2.16
791 Requires: libbonoboui >= 2.16
792 Requires: bonobo-activation
796 Requires: fontconfig >= 2.4
797 Requires: gnome-vfs2 >= 2.16
800 %if %{gconsole} && %{mdk} && !%{mdv}
801 Requires: gtk2 >= 2.0
802 Requires: libgnomeui2
803 Requires: glibc >= 2.3
805 Requires: libart_lgpl >= 2.0
806 Requires: libbonobo >= 2.0
807 Requires: libbonoboui >= 2.0
811 %if %{gconsole} && %{mdv}
812 Requires: gtk2 >= 2.8
813 Requires: libgnomeui2
814 Requires: glibc >= 2.3
816 Requires: libart_lgpl >= 2.3
817 Requires: libbonobo >= 2.10
818 Requires: libbonoboui >= 2.10
822 %if %{gconsole} && %{fc3}
823 Requires: gtk2 >= 2.4
824 Requires: libgnomeui >= 2.8
825 Requires: glibc >= 2.3
827 Requires: libart_lgpl >= 2.3
828 Requires: libbonobo >= 2.8
829 Requires: libbonoboui >= 2.8
830 Requires: bonobo-activation
834 %if %{gconsole} && %{fc4}
835 Requires: gtk2 >= 2.6
836 Requires: libgnomeui >= 2.10
837 Requires: glibc >= 2.3
839 Requires: libart_lgpl >= 2.3
840 Requires: libbonobo >= 2.8
841 Requires: libbonoboui >= 2.8
842 Requires: bonobo-activation
846 %if %{gconsole} && %{fc5}
847 Requires: gtk2 >= 2.8
848 Requires: libgnomeui >= 2.14
849 Requires: glibc >= 2.4
851 Requires: libart_lgpl >= 2.3
852 Requires: libbonobo >= 2.14
853 Requires: libbonoboui >= 2.14
857 %if %{gconsole} && %{fc6}
858 Requires: gtk2 >= 2.10
859 Requires: libgnomeui >= 2.16
860 Requires: glibc >= 2.5
862 Requires: libart_lgpl >= 2.3
863 Requires: libbonobo >= 2.16
864 Requires: libbonoboui >= 2.16
868 %if %{gconsole} && %{fc7}
869 Requires: gtk2 >= 2.10
870 Requires: libgnomeui >= 2.18
871 Requires: glibc >= 2.5
873 Requires: libart_lgpl >= 2.3
874 Requires: libbonobo >= 2.18
875 Requires: libbonoboui >= 2.18
879 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7}
880 Requires: gtk2 >= 2.0
881 Requires: libgnomeui >= 2.0
882 Requires: glibc >= 2.3
884 Requires: libart_lgpl >= 2.0
885 Requires: libbonobo >= 2.0
886 Requires: libbonoboui >= 2.0
887 Requires: bonobo-activation
892 %if %{gconsole} && %{su9}
895 %if %{gconsole} && %{su10}
898 %if %{gconsole} && %{su102}
901 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102}
906 %description gconsole
917 This is the Gnome Console package. It is an add-on to the client or
923 Summary: Bacula - The Network Backup Solution
924 Group: System Environment/Daemons
925 Requires: wxGTK >= 2.6, libstdc++, openssl
928 %if %{wxconsole} && %{su10}
929 Requires: gtk2 >= 2.8
932 %if %{wxconsole} && %{su102}
933 Requires: gtk2 >= 2.10
936 %if %{wxconsole} && %{fc3}
937 Requires: gtk2 >= 2.4
940 %if %{wxconsole} && %{fc4}
941 Requires: gtk2 >= 2.6
944 %if %{wxconsole} && %{fc5}
945 Requires: gtk2 >= 2.8
948 %if %{wxconsole} && %{fc6}
949 Requires: gtk2 >= 2.10
952 %if %{wxconsole} && %{fc7}
953 Requires: gtk2 >= 2.10
957 %description wxconsole
968 This is the WXWindows Console package. It is an add-on to the client or
974 Summary: Bacula - The Network Backup Solution
975 Group: System Environment/Daemons
978 %if %{bat} && %{su10}
980 Requires: glibc >= 2.4
990 %if %{bat} && %{su102}
992 Requires: glibc >= 2.5
1002 %if %{bat} && %{fc5}
1004 Requires: glibc >= 2.4
1005 Requires: fontconfig
1009 Requires: qt4 >= 4.2
1014 %if %{bat} && %{fc6}
1016 Requires: glibc >= 2.5
1017 Requires: fontconfig
1021 Requires: qt4 >= 4.2
1026 %if %{bat} && %{fc7}
1028 Requires: glibc >= 2.5
1029 Requires: fontconfig
1033 Requires: qt4 >= 4.2
1050 This is the Bacula Administration Tool package. It is an add-on to
1051 the client or server packages.
1064 %if %{su9} || %{su10} || %{su102}
1065 export LDFLAGS="${LDFLAGS} -L/usr/lib/termcap"
1073 %if ! %{client_only}
1081 # patches for the bundled sqlite scripts
1083 # patch the make_sqlite_tables script for installation bindir
1084 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
1086 # patch the create_sqlite_database script for installation bindir
1087 # not necessary after 1.39.26 no longer references sqlite binary
1088 #patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
1090 # patch the make_catalog_backup script for installation bindir
1091 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
1093 # patch the update_sqlite_tables script for installation bindir
1094 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
1096 # patch the bacula-dir init script to remove sqlite service
1097 %if %{sqlite} && %{su9}
1098 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1100 %if %{sqlite} && %{su10}
1101 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1103 %if %{sqlite} && %{su102}
1104 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1107 # 64 bit lib location hacks
1108 # as of 1.39.18 it should not be necessary to enable x86_64 as configure is
1109 # reported to be fixed to properly detect lib locations.
1111 export LDFLAGS="${LDFLAGS} -L/usr/lib64"
1113 %if %{mysql} && %{x86_64}
1114 export LDFLAGS="${LDFLAGS} -L/usr/lib64/mysql"
1116 %if %{python} && %{x86_64}
1117 export LDFLAGS="${LDFLAGS} -L/usr/lib64/python%{pyver}"
1120 # Red Hat's 64 bit installation of QT4 appears to be broken so:
1122 %if %{rhel5} || %{centos5} || %{sl5}
1125 %if %{bat} && %{qt_path} && %{x86_64}
1126 export PATH=/usr/lib64/qt4/bin/:$PATH
1127 export QTDIR=/usr/lib64/qt4/
1128 export QTINC=/usr/lib64/qt4/include/
1129 export QTLIB=/usr/lib64/qt4/
1134 --sbindir=/usr/sbin \
1135 --sysconfdir=%{sysconf_dir} \
1136 --with-scriptdir=%{script_dir} \
1137 --with-working-dir=%{working_dir} \
1138 --with-pid-dir=%{pid_dir} \
1139 --enable-smartalloc \
1140 --enable-client-only \
1150 --sbindir=/usr/sbin \
1151 --sysconfdir=%{sysconf_dir} \
1152 --with-scriptdir=%{script_dir} \
1153 --with-working-dir=%{working_dir} \
1154 --with-pid-dir=%{pid_dir} \
1155 --enable-smartalloc \
1159 %if %{gconsole} && ! %{rh8}
1160 --enable-tray-monitor \
1166 --with-sqlite=${cwd}/%{depkgs}/sqlite \
1172 --enable-bwx-console \
1176 --with-qwt=${cwd}/%{depkgs}/qwt \
1182 --enable-client-only \
1184 %if %{rh7} || %{rh8} || %{rh9} || %{fc1} || %{fc3} || %{wb3}
1185 --disable-batch-insert \
1187 --mandir=%{_mandir} \
1188 --with-subsys-dir=/var/lock/subsys \
1189 --with-dir-user=%{director_daemon_user} \
1190 --with-dir-group=%{daemon_group} \
1191 --with-sd-user=%{storage_daemon_user} \
1192 --with-sd-group=%{storage_daemon_group} \
1193 --with-fd-user=%{file_daemon_user} \
1194 --with-fd-group=%{daemon_group} \
1195 --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
1196 --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
1197 --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
1198 --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
1199 --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
1200 --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
1208 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1209 mkdir -p $RPM_BUILD_ROOT/etc/init.d
1210 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
1211 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/logfiles
1212 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/services
1213 mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
1214 mkdir -p $RPM_BUILD_ROOT%{script_dir}/updatedb
1216 %if %{gconsole} || %{wxconsole} || %{bat}
1217 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
1218 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
1221 %if %{gconsole} || %{wxconsole} || %{bat}
1222 %define usermode_iftrick 1
1224 %define usermode_iftrick 0
1227 %if %{usermode_iftrick} && ! %{su9} && ! %{su10} && ! %{su102}
1228 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
1229 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
1230 mkdir -p $RPM_BUILD_ROOT/usr/bin
1234 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
1238 prefix=$RPM_BUILD_ROOT/usr \
1239 sbindir=$RPM_BUILD_ROOT/usr/sbin \
1240 sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1241 scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1242 working_dir=$RPM_BUILD_ROOT%{working_dir} \
1243 piddir=$RPM_BUILD_ROOT%{pid_dir} \
1244 mandir=$RPM_BUILD_ROOT%{_mandir} \
1247 %if ! %{client_only}
1250 prefix=$RPM_BUILD_ROOT/usr \
1251 sbindir=$RPM_BUILD_ROOT/usr/sbin \
1252 sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1253 scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1254 working_dir=$RPM_BUILD_ROOT%{working_dir} \
1255 piddir=$RPM_BUILD_ROOT%{pid_dir} \
1256 mandir=$RPM_BUILD_ROOT%{_mandir} \
1261 # make install in manpages installs _everything_ shotgun style
1262 # so now delete what we will not be packaging
1264 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
1267 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bat.1.%{manpage_ext}
1270 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
1271 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
1274 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bsmtp.1.%{manpage_ext}
1275 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1276 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1277 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bcopy.8.%{manpage_ext}
1278 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bextract.8.%{manpage_ext}
1279 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bls.8.%{manpage_ext}
1280 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bscan.8.%{manpage_ext}
1281 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/btape.8.%{manpage_ext}
1282 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/dbcheck.8.%{manpage_ext}
1285 # fixme - make installs the mysql scripts for sqlite build
1287 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1288 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1289 rm -f $RPM_BUILD_ROOT%{script_dir}/grant_mysql_privileges
1292 # fixme - make installs the mysql scripts for postgresql build
1294 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1295 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1298 # fixme - make installs gconsole script for build without gconsole
1300 rm -f $RPM_BUILD_ROOT%{script_dir}/gconsole
1303 rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
1305 # install the init scripts
1306 %if %{su9} || %{su10} || %{su102}
1307 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1308 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1309 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1312 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1313 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1314 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1316 %if ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk}
1317 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1318 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1319 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1321 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
1323 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1324 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1327 # install the menu stuff
1328 %if %{gconsole} && %{su9}
1329 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1330 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1331 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1332 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1334 %if %{gconsole} && %{su10}
1335 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1336 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1337 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1338 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1340 %if %{gconsole} && %{su102}
1341 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1342 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1343 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1344 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1346 %if %{wxconsole} && %{su10}
1347 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1348 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1350 %if %{wxconsole} && %{su102}
1351 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1352 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1354 %if %{bat} && %{su102}
1355 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1356 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1358 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{fc6} || %{fc7} || %{mdk}
1363 %if %{gconsole} && %{iftrick}
1364 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1365 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1366 cp -p scripts/bgnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bgnome-console
1367 cp -p scripts/bgnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/bgnome-console
1368 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bgnome-console
1370 %if %{gconsole} && ! %{rh8}
1371 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1372 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1374 %if %{wxconsole} && %{iftrick}
1375 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1376 cp -p scripts/wxconsole.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1377 cp -p scripts/wxconsole.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bwx-console
1378 cp -p scripts/wxconsole.pamd $RPM_BUILD_ROOT/etc/pam.d/bwx-console
1379 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bwx-console
1381 %if %{bat} && %{iftrick}
1382 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1383 cp -p scripts/bat.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1384 cp -p scripts/bat.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bat
1385 cp -p scripts/bat.pamd $RPM_BUILD_ROOT/etc/pam.d/bat
1386 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bat
1391 cp -p %{depkgs}/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
1392 cp -p %{depkgs}/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
1393 cp -p %{depkgs}/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
1396 # install the logrotate file
1397 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
1399 # install the updatedb scripts
1400 cp -p updatedb/* $RPM_BUILD_ROOT%{script_dir}/updatedb/
1402 # install the logwatch scripts
1403 %if ! %{client_only}
1404 cp -p scripts/logwatch/bacula $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1405 cp -p scripts/logwatch/logfile.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1406 cp -p scripts/logwatch/services.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1407 chmod 755 $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1408 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1409 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1412 # install the rescue files
1413 mkdir $RPM_BUILD_ROOT%{sysconf_dir}/rescue
1414 cp -p %{_rescuesrc}/Makefile* $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1415 cp -p %{_rescuesrc}/README $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1416 cp -p %{_rescuesrc}/configure $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1417 cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1418 cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1419 cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1420 touch $RPM_BUILD_ROOT%{sysconf_dir}/rescue/linux/cdrom/rpm_release
1421 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT%{sysconf_dir}/rescue/linux/cdrom/bacula/bin/bacula-fd
1422 rm -f src/filed/static-bacula-fd
1424 # install bat since make doesn't at the moment
1426 cp -p src/qt-console/bat $RPM_BUILD_ROOT/usr/sbin/bat
1427 cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
1430 # now clean up permissions that are left broken by the install
1431 %if ! %{client_only}
1432 chmod o-r $RPM_BUILD_ROOT%{script_dir}/query.sql
1434 chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
1435 %if %{gconsole} && ! %{rh8}
1436 chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
1437 chmod 644 $RPM_BUILD_ROOT%{sysconf_dir}/tray-monitor.conf
1440 # fix me - building enable-client-only installs files not included in bacula-client package
1442 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula
1443 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-dir
1444 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-sd
1445 rm -f $RPM_BUILD_ROOT%{script_dir}/disk-changer
1446 rm -f $RPM_BUILD_ROOT%{script_dir}/dvd-handler
1447 rm -f $RPM_BUILD_ROOT%{script_dir}/mtx-changer
1448 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1449 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1450 rm -rf $RPM_BUILD_ROOT%{script_dir}/updatedb
1454 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1455 rm -rf $RPM_BUILD_DIR/%{name}-docs-%{docs_version}
1456 rm -rf $RPM_BUILD_DIR/%{name}-rescue-%{_rescuever}
1457 rm -rf $RPM_BUILD_DIR/depkgs
1458 rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
1461 # MySQL specific files
1463 %defattr(-, root, root)
1464 %attr(-, root, %{daemon_group}) %{script_dir}/create_mysql_database
1465 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_database
1466 %attr(-, root, %{daemon_group}) %{script_dir}/make_mysql_tables
1467 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_tables
1468 %attr(-, root, %{daemon_group}) %{script_dir}/update_mysql_tables
1469 %attr(-, root, %{daemon_group}) %{script_dir}/grant_mysql_privileges
1470 %attr(-, root, %{daemon_group}) %{script_dir}/startmysql
1471 %attr(-, root, %{daemon_group}) %{script_dir}/stopmysql
1476 %defattr(-,root,root)
1477 %attr(-, root, %{daemon_group}) %{script_dir}/create_sqlite_database
1478 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite_database
1479 %attr(-, root, %{daemon_group}) %{script_dir}/grant_sqlite_privileges
1480 %attr(-, root, %{daemon_group}) %{script_dir}/make_sqlite_tables
1481 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite_tables
1482 %attr(-, root, %{daemon_group}) %{script_dir}/update_sqlite_tables
1483 %{sqlite_bindir}/libsqlite.a
1484 %{sqlite_bindir}/sqlite.h
1485 %{sqlite_bindir}/sqlite
1490 %defattr(-,root,root)
1491 %attr(-, root, %{daemon_group}) %{script_dir}/create_postgresql_database
1492 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_database
1493 %attr(-, root, %{daemon_group}) %{script_dir}/make_postgresql_tables
1494 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_tables
1495 %attr(-, root, %{daemon_group}) %{script_dir}/update_postgresql_tables
1496 %attr(-, root, %{daemon_group}) %{script_dir}/grant_postgresql_privileges
1499 # The rest is DB backend independent
1500 %if ! %{client_only}
1501 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1502 %attr(-, root, %{daemon_group}) %{script_dir}/bacula
1503 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1504 %attr(-, root, %{daemon_group}) %{script_dir}/create_bacula_database
1505 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_database
1506 %attr(-, root, %{daemon_group}) %{script_dir}/grant_bacula_privileges
1507 %attr(-, root, %{daemon_group}) %{script_dir}/make_bacula_tables
1508 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_tables
1509 %attr(-, root, %{daemon_group}) %{script_dir}/update_bacula_tables
1510 %attr(-, root, %{daemon_group}) %{script_dir}/make_catalog_backup
1511 %attr(-, root, %{daemon_group}) %{script_dir}/delete_catalog_backup
1512 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1513 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1514 %attr(-, root, %{daemon_group}) %{sysconf_dir}/rescue
1515 %attr(-, root, %{daemon_group}) %{script_dir}/disk-changer
1516 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-dir
1517 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
1518 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-sd
1519 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
1520 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
1521 %attr(-, root, %{storage_daemon_group}) %{script_dir}/dvd-handler
1522 %attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
1523 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
1525 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1526 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1528 /etc/logrotate.d/bacula
1529 /etc/log.d/scripts/services/bacula
1530 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-dir.conf
1531 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1532 %attr(-, root, %{storage_daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-sd.conf
1533 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1534 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
1535 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/services/bacula.conf
1536 %attr(-, root, %{daemon_group}) %config(noreplace) %{script_dir}/query.sql
1538 %attr(-, %{storage_daemon_user}, %{daemon_group}) %dir %{working_dir}
1540 /usr/sbin/bacula-dir
1548 /usr/sbin/btraceback
1554 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1555 %{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1556 %{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1557 %{_mandir}/man8/bacula.8.%{manpage_ext}
1558 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1559 %{_mandir}/man8/bcopy.8.%{manpage_ext}
1560 %{_mandir}/man8/bextract.8.%{manpage_ext}
1561 %{_mandir}/man8/bls.8.%{manpage_ext}
1562 %{_mandir}/man8/bscan.8.%{manpage_ext}
1563 %{_mandir}/man8/btape.8.%{manpage_ext}
1564 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1565 %{_mandir}/man8/dbcheck.8.%{manpage_ext}
1566 %{_mandir}/man1/bsmtp.1.%{manpage_ext}
1571 # test for bacula database older than version 9
1572 # note: this ASSUMES no password has been set for bacula database
1573 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1578 # test for bacula database older than version 9
1579 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
1580 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1585 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1588 %if ! %{client_only}
1589 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "9" ]; then
1590 echo "This bacula upgrade will update a bacula database from version 9 to 10."
1591 echo "You appear to be running database version $DB_VER. You must first update"
1592 echo "your database to version 9 and then install this upgrade. The alternative"
1593 echo "is to use %{script_dir}/drop_%{db_backend}_tables to delete all your your current"
1594 echo "catalog information, then do the upgrade. Information on updating a"
1595 echo "database older than version 9 can be found in the release notes."
1604 %if ! %{client_only}
1605 # check for and copy %{sysconf_dir}/console.conf to bconsole.conf
1606 if [ -s %{sysconf_dir}/console.conf ];then
1607 cp -p %{sysconf_dir}/console.conf %{sysconf_dir}/bconsole.conf
1610 # create the daemon users and groups
1611 # first create the groups if they don't exist
1612 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1613 if [ -z "$HAVE_BACULA" ]; then
1614 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1615 echo "The group %{daemon_group} has been added to %{group_file}."
1616 echo "See the manual chapter \"Running Bacula\" for details."
1618 HAVE_BACULA=`grep %{storage_daemon_group} %{group_file} 2>/dev/null`
1619 if [ -z "$HAVE_BACULA" ]; then
1620 %{groupadd} -r %{storage_daemon_group} > /dev/null 2>&1
1621 echo "The group %{storage_daemon_group} has been added to %{group_file}."
1622 echo "See the manual chapter \"Running Bacula\" for details."
1624 # now create the users if they do not exist
1625 # we do not use the -g option allowing the primary group to be set to system default
1626 # this will be a unique group on redhat type systems or the group users on some systems
1627 HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
1628 if [ -z "$HAVE_BACULA" ]; then
1629 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{storage_daemon_group} -M -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
1630 echo "The user %{storage_daemon_user} has been added to %{user_file}."
1631 echo "See the manual chapter \"Running Bacula\" for details."
1633 HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
1634 if [ -z "$HAVE_BACULA" ]; then
1635 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
1636 echo "The user %{director_daemon_user} has been added to %{user_file}."
1637 echo "See the manual chapter \"Running Bacula\" for details."
1639 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1640 if [ -z "$HAVE_BACULA" ]; then
1641 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1642 echo "The user %{file_daemon_user} has been added to %{user_file}."
1643 echo "See the manual chapter \"Running Bacula\" for details."
1645 # now we add the supplementary groups, this is ok to call even if the users already exist
1646 # we only do this if the user is NOT root
1647 IS_ROOT=%{director_daemon_user}
1648 if [ "$IS_ROOT" != "root" ]; then
1649 %{usermod} -G %{daemon_group} %{director_daemon_user}
1651 IS_ROOT=%{storage_daemon_user}
1652 if [ "$IS_ROOT" != "root" ]; then
1653 %{usermod} -G %{daemon_group},%{storage_daemon_group} %{storage_daemon_user}
1655 IS_ROOT=%{file_daemon_user}
1656 if [ "$IS_ROOT" != "root" ]; then
1657 %{usermod} -G %{daemon_group} %{file_daemon_user}
1671 %if ! %{client_only}
1673 if [ "$1" -ge 1 ] ; then
1674 /sbin/chkconfig --add bacula-dir
1675 /sbin/chkconfig --add bacula-fd
1676 /sbin/chkconfig --add bacula-sd
1681 # test for an existing database
1682 # note: this ASSUMES no password has been set for bacula database
1683 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1685 # grant privileges and create tables if they do not exist
1686 if [ -z "$DB_VER" ]; then
1687 echo "Hmm, doesn't look like you have an existing database."
1688 echo "Granting privileges for MySQL user bacula..."
1689 %{script_dir}/grant_mysql_privileges
1690 echo "Creating MySQL bacula database..."
1691 %{script_dir}/create_mysql_database
1692 echo "Creating bacula tables..."
1693 %{script_dir}/make_mysql_tables
1695 # check to see if we need to upgrade a 1.38 or lower database
1696 elif [ "$DB_VER" -lt "10" ]; then
1697 echo "This release requires an upgrade to your bacula database."
1698 echo "Backing up your current database..."
1699 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1700 echo "Upgrading bacula database ..."
1701 %{script_dir}/update_mysql_tables
1702 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1708 # test for an existing database
1709 if [ -s %{working_dir}/bacula.db ]; then
1710 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1711 # check to see if we need to upgrade a 1.38 or lower database
1712 if [ "$DB_VER" -lt "10" ] && [ "$DB_VER" -ge "9" ]; then
1713 echo "This release requires an upgrade to your bacula database."
1714 echo "Backing up your current database..."
1715 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1716 echo "Upgrading bacula database ..."
1717 %{script_dir}/update_sqlite_tables
1718 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1721 # create the database and tables
1722 echo "Hmm, doesn't look like you have an existing database."
1723 echo "Creating SQLite database..."
1724 %{script_dir}/create_sqlite_database
1725 chown %{director_daemon_user}.%{daemon_group} %{working_dir}/bacula.db
1726 echo "Creating the SQLite tables..."
1727 %{script_dir}/make_sqlite_tables
1732 # test for an existing database
1733 # note: this ASSUMES no password has been set for bacula database
1734 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1736 # grant privileges and create tables if they do not exist
1737 if [ -z "$DB_VER" ]; then
1738 echo "Hmm, doesn't look like you have an existing database."
1739 echo "Creating PostgreSQL bacula database..."
1740 %{script_dir}/create_postgresql_database
1741 echo "Creating bacula tables..."
1742 %{script_dir}/make_postgresql_tables
1743 echo "Granting privileges for PostgreSQL user bacula..."
1744 %{script_dir}/grant_postgresql_privileges
1746 # check to see if we need to upgrade a 1.38 or lower database
1747 elif [ "$DB_VER" -lt "10" ]; then
1748 echo "This release requires an upgrade to your bacula database."
1749 echo "Backing up your current database..."
1750 pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1751 echo "Upgrading bacula database ..."
1752 %{script_dir}/update_postgresql_tables
1753 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1758 %if ! %{client_only}
1759 # generate passwords if needed
1760 if [ -d %{sysconf_dir} ]; then
1762 for file in *.conf; do
1763 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
1764 need_password=`grep $string $file 2>/dev/null`
1765 if [ -n "$need_password" ]; then
1766 pass=`openssl rand -base64 33`
1767 sed "s-$string-$pass-g" $file > $file.new
1768 cp -f $file.new $file; rm -f $file.new
1785 %if ! %{client_only}
1788 /sbin/chkconfig --del bacula-dir
1789 /sbin/chkconfig --del bacula-fd
1790 /sbin/chkconfig --del bacula-sd
1795 %if ! %{client_only}
1797 %defattr(-,root,root)
1798 %attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
1799 %attr(-, root, %{storage_daemon_group}) /usr/sbin/mtx
1800 %attr(-, root, %{storage_daemon_group}) /usr/sbin/scsitape
1801 %attr(-, root, %{storage_daemon_group}) /usr/sbin/tapeinfo
1802 %attr(-, root, %{storage_daemon_group}) /usr/sbin/nsmhack
1803 %attr(-, root, %{storage_daemon_group}) /usr/sbin/scsieject
1804 %{_mandir}/man1/loaderinfo.1.%{manpage_ext}
1805 %{_mandir}/man1/mtx.1.%{manpage_ext}
1806 %{_mandir}/man1/scsitape.1.%{manpage_ext}
1807 %{_mandir}/man1/tapeinfo.1.%{manpage_ext}
1808 %{_mandir}/man1/scsieject.1.%{manpage_ext}
1812 %defattr(-,root,root)
1813 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1814 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1815 %{script_dir}/bacula-ctl-fd
1816 /etc/init.d/bacula-fd
1817 %attr(-, root, %{daemon_group}) %{sysconf_dir}/rescue
1819 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1820 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1822 /etc/logrotate.d/bacula
1824 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1825 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1827 %attr(-, root, %{daemon_group}) %dir %{working_dir}
1830 /usr/sbin/btraceback
1831 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1832 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1834 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1835 %{_mandir}/man8/bacula.8.%{manpage_ext}
1836 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1837 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1841 # create the daemon group and user
1842 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1843 if [ -z "$HAVE_BACULA" ]; then
1844 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1845 echo "The group %{daemon_group} has been added to %{group_file}."
1846 echo "See the manual chapter \"Running Bacula\" for details."
1848 # we do not use the -g option allowing the primary group to be set to system default
1849 # this will be a unique group on redhat type systems or the group users on some systems
1850 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1851 if [ -z "$HAVE_BACULA" ]; then
1852 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1853 echo "The user %{file_daemon_user} has been added to %{user_file}."
1854 echo "See the manual chapter \"Running Bacula\" for details."
1856 # now we add the supplementary group, this is ok to call even if the user already exists
1857 # we only do this if the user is NOT root
1858 IS_ROOT=%{file_daemon_user}
1859 if [ "$IS_ROOT" != "root" ]; then
1860 %{usermod} -G %{daemon_group} %{file_daemon_user}
1865 if [ "$1" -ge 1 ] ; then
1866 /sbin/chkconfig --add bacula-fd
1869 # generate passwords if needed
1870 if [ -d %{sysconf_dir} ]; then
1872 for file in *.conf; do
1873 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
1874 need_password=`grep $string $file 2>/dev/null`
1875 if [ -n "$need_password" ]; then
1876 pass=`openssl rand -base64 33`
1877 sed "s-$string-$pass-g" $file > $file.new
1878 cp -f $file.new $file; rm -f $file.new
1887 /sbin/chkconfig --del bacula-fd
1890 %if ! %{client_only}
1892 %defattr(-,root,%{daemon_group})
1893 %{script_dir}/updatedb/*
1896 # create the daemon group
1897 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1898 if [ -z "$HAVE_BACULA" ]; then
1899 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1900 echo "The group %{daemon_group} has been added to %{group_file}."
1901 echo "See the manual chapter \"Running Bacula\" for details."
1905 echo "The database update scripts were installed to %{script_dir}/updatedb"
1910 %defattr(-,root,root)
1911 /usr/sbin/bgnome-console
1912 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1913 %attr(-, root, %{daemon_group}) %{script_dir}/gconsole
1914 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bgnome-console.conf
1915 /usr/share/pixmaps/bacula.png
1916 /usr/share/applications/bacula.desktop
1917 %{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
1920 %if %{gconsole} && ! %{rh8}
1921 /usr/sbin/bacula-tray-monitor
1922 %config(noreplace) %{sysconf_dir}/tray-monitor.conf
1923 /usr/share/pixmaps/bacula-tray-monitor.xpm
1924 /usr/share/applications/bacula-tray-monitor.desktop
1925 %{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
1928 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102}
1929 # add the console helper files
1930 %config(noreplace,missingok) /etc/pam.d/bgnome-console
1931 %config(noreplace,missingok) /etc/security/console.apps/bgnome-console
1932 /usr/bin/bgnome-console
1937 # create the daemon group
1938 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1939 if [ -z "$HAVE_BACULA" ]; then
1940 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1941 echo "The group %{daemon_group} has been added to %{group_file}."
1942 echo "See the manual chapter \"Running Bacula\" for details."
1946 # generate passwords if needed
1947 if [ -d %{sysconf_dir} ]; then
1949 for file in *.conf; do
1950 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
1951 need_password=`grep $string $file 2>/dev/null`
1952 if [ -n "$need_password" ]; then
1953 pass=`openssl rand -base64 33`
1954 sed "s-$string-$pass-g" $file > $file.new
1955 cp -f $file.new $file; rm -f $file.new
1964 %defattr(-,root,root)
1965 /usr/sbin/bwx-console
1966 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
1967 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bwx-console.conf
1968 /usr/share/pixmaps/wxwin16x16.xpm
1969 /usr/share/applications/wxconsole.desktop
1970 %{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
1973 %if %{wxconsole} && ! %{su9} && ! %{su10} && ! %{su102}
1974 # add the console helper files
1975 %config(noreplace,missingok) /etc/pam.d/bwx-console
1976 %config(noreplace,missingok) /etc/security/console.apps/bwx-console
1977 /usr/bin/bwx-console
1982 # create the daemon group
1983 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1984 if [ -z "$HAVE_BACULA" ]; then
1985 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1986 echo "The group %{daemon_group} has been added to %{group_file}."
1987 echo "See the manual chapter \"Running Bacula\" for details."
1991 # generate passwords if needed
1992 if [ -d %{sysconf_dir} ]; then
1994 for file in *.conf; do
1995 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
1996 need_password=`grep $string $file 2>/dev/null`
1997 if [ -n "$need_password" ]; then
1998 pass=`openssl rand -base64 33`
1999 sed "s-$string-$pass-g" $file > $file.new
2000 cp -f $file.new $file; rm -f $file.new
2009 %defattr(-,root,root)
2011 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
2012 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
2013 /usr/share/pixmaps/bat_icon.png
2014 /usr/share/applications/bat.desktop
2015 %{_mandir}/man1/bat.1.%{manpage_ext}
2018 %if %{bat} && ! %{su9} && ! %{su10} && ! %{su102}
2019 # add the console helper files
2020 %config(noreplace,missingok) /etc/pam.d/bat
2021 %config(noreplace,missingok) /etc/security/console.apps/bat
2027 # create the daemon group
2028 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2029 if [ -z "$HAVE_BACULA" ]; then
2030 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2031 echo "The group %{daemon_group} has been added to %{group_file}."
2032 echo "See the manual chapter \"Running Bacula\" for details."
2036 # generate passwords if needed
2037 if [ -d %{sysconf_dir} ]; then
2039 for file in *.conf; do
2040 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
2041 need_password=`grep $string $file 2>/dev/null`
2042 if [ -n "$need_password" ]; then
2043 pass=`openssl rand -base64 33`
2044 sed "s-$string-$pass-g" $file > $file.new
2045 cp -f $file.new $file; rm -f $file.new
2053 * Sun Nov 04 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2054 - fix dist defines for rhel5 and clones
2055 - fix rhel broken 64 bit QT4 paths
2056 - rh qt4 packages don't provide qt so fix that too
2057 * Mon Oct 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2058 - correct ownership when creating sqlite db file in post script
2059 * Sun Sep 16 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2060 - fix disable-batch-insert
2061 * Fri Sep 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2063 - turn off gconsole build for fc3, tray monitor fails to build
2064 - add new files for mtx package (09Sep07 depkgs update)
2065 * Sat Sep 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2066 - add --disable-batch-insert for older platforms
2067 - add build targets for rhel5 and clones
2068 * Mon Sep 03 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2070 - turn off gconsole build for su10 & fc4, tray monitor fails to build
2071 * Sat Jul 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2072 - 2.1.26 add make of qwt in depkgs for bat
2073 * Sat Jun 02 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2074 - upgrade Qt requirement for bat to 4.2
2075 * Sun May 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2076 - add fc7 build target
2077 * Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2079 - gnome-console now bgnome-console
2080 - wxconsole now bwx-console
2081 - add build option for bat
2082 * Sat Apr 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2083 - merge Otto Mueller's patch but keep script dir set to /etc/bacula
2084 - add build tag for Scientific Linux per Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk>
2085 * Tue Mar 27 2007 Otto Mueller <otto.mueller@bundestag.de>
2086 - adjust directory locations for FHS-compatibility
2087 sysconf_dir (/etc/bacula), script_dir (/usr/lib/bacula),
2088 working_dir (/var/lib/bacula) and pid_dir (/var/run)
2089 * Mon Feb 26 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2090 - add SuSE 10.2 target
2091 * Sat Jan 20 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2093 - set query.sql as config file
2095 * Sun Jan 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2097 - change determination of gcc version per patch from Marc Hennes
2098 - move BuildRequire for atk-devel to gnome only builds
2100 * Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2102 * Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2103 - 1.39.26 remove create_sqlite_database.in.patch
2104 * Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2105 - change ownership of working_dir on server packages to bacula.bacula so that
2106 - bacula-sd can create bootstrap files
2107 * Sat Sep 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2108 - 1.39.22 remove separate cd and make of manpages the main Makefile does it now
2109 * Sun Aug 06 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2110 - fix manpages file extension for mdk
2111 * Sat Aug 05 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2112 - bug 648 re-enable and update sqlite patches
2116 - lock out gconsole build for gtk+ < 2.4
2117 * Mon Jul 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2118 - move pango-devel BuildRequires into gconsole only build
2119 * Sat Jul 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2120 - add provides and conflicts for standard suse packages
2121 - add third party packager tag support
2122 - add build_client_only tag
2123 - remove bsmtp from client package
2124 - add bacula-ctl-fd to client package
2125 * Thu Jul 13 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2126 - fix directory creation when wxconsole and not gconsole
2127 * Tue Jul 04 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2128 - add check to buildrequires to make sure libstdc++ version matches gcc
2129 * Mon Jul 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2130 - add python build support
2131 - fix LDFLAGS declarations
2132 * Sun Jul 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2133 - add requires for standard compiler toolchain
2134 - move version and release tags up
2136 - add docs_version tag
2137 * Sat Jul 01 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2138 - update rescuever to 1.8.6
2139 * Sun Jun 25 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2140 - update depkgs to 25Jun06
2141 - add mysql5 build tag
2142 * Mon Jun 12 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2143 - 1.38.10 bump rescue version
2144 * Sun Jun 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2145 - fix usermod statements
2147 * Thu Apr 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2148 - add -g param back to useradd statements Bug 605
2149 * Mon Apr 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2150 - redundant code cleanup
2151 * Sun Apr 16 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2152 - add wxconsole package
2153 * Fri Apr 14 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2155 - dependency update for Mandriva
2156 * Sun Apr 08 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2158 - remove -n option from useradd scripts
2159 * Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2161 - fix problem specifying more than one primary group for user bacula
2162 - add build switch to not build gconsole regardless of platform
2163 * Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2164 - add centos3 build tag
2165 - fix link error of static-fd on Mandrake with --disable-nls
2166 * Fri Jan 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2167 - add fc4 dependencies
2168 * Mon Jan 23 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2169 - add SuSE 10.0 build
2170 - remove specific permission in attrib macros
2171 * Sat Jan 21 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2173 - fix usermode required on suse, suse doesn't have usermode (xsu instead)
2174 - refix compat for _dist on SLES9 which seems to have been removed
2175 - added note regarding Aleksandar's use of specific permissions in attrib macros
2176 - need to review and add specific fc4 build currently using fc3 Requires
2177 * Wed Dec 14 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2179 - Reorganize files and pre/post sections to remove repetitions
2180 - Always build separate mtx package
2181 - Fix file ownerships for /etc/bacula and Bacula's working dir
2182 * Wed Nov 23 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2183 - Disable GNOME on RH7
2184 * Fri Nov 18 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2185 - Red Hat and look alikes have mtx RPM, do not build/package our version
2186 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2187 - minor edit to _dist for SLES9 compatibility
2188 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2190 - kern changed location of pdf files and html manual in docs package
2191 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2193 - add docs (from prebuilt tarball) and rescue packages back in
2194 - remove dvd-freespace and dvd-writepart files, add dvd-handler
2195 - remove 3 of 4 sqlite script patches as not needed
2196 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2198 - remove docs and rescue sections (remove static fd)
2199 - add dvd-freespace and dvd-writepart files
2200 - update depkgs to 22Jun05
2201 - change database update to 8 to 9
2202 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2203 - minor cleanups before 1.38 changes
2204 - add popt and popt-devel build dependencies
2205 - add tetex and tetex-dvips dependencies for doc build
2206 - replace deprecated Copyright tag with License
2207 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2208 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
2209 - conflict with sqlite packages. remove readline dependency.
2210 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2211 - release 1.36.3 update docs
2212 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2213 - add centos4 build tag
2214 - add x86_64 build tag
2215 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2216 - add rhel4 build tag
2217 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
2218 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2219 - add rhel3 build tag
2220 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2221 - fix tray-monitor.conf for noreplace
2222 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2223 - fix distribution check for Fedora and Whitebox
2224 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2225 - add logwatch script
2227 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2228 - add build for Fedora Core 3 (linc now included in ORDit2)
2229 - add mysql4 define for Mandrake 10.1
2230 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2231 - fix {group_file} variable in post scripts
2232 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
2233 - add distribution checking and custom Distribution tag
2234 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2235 - ASSIGNMENT OF COPYRIGHT
2236 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
2237 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
2238 - all right, title and interest in and to the copyright in this software RPM
2239 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
2240 - free of all liens, encumbrances or any known claims against said copyright.
2241 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2243 - thanks to Daniel Widyono
2244 - update description for rescue package to describe cdrom creation
2245 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2246 - update depkgs to 29Oct04
2247 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2248 - add cdrom rescue to bacula-rescue package
2249 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2250 - misc fixes from 1.36.0 suse feedback
2251 - fix situation where sqlite database exists but sqlite has been removed.
2252 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2253 - remove tray-monitor from RH8 build
2254 - fix permissions on tray-monitor files
2255 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2256 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
2257 - change database update to 7 to 8 upgrade,
2258 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
2259 - build in 30Jul04, add freetype dependancy to gnome package.
2260 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2261 - add documentation to console for groupadd
2262 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2263 - add support for running daemons as root.bacula
2264 - correct for change in location of floppy rescue files in 1.35.2
2265 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
2266 - updated depgkgs to 30Jul04
2267 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2268 - really, really fix symlink creation for gconsole
2269 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2270 - fix symlink creation in gconsole post install
2271 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2272 - fixed error in gconsole post script
2273 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2274 - add check for gconsole symlink before trying to create it
2275 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2276 - fix some minor permissions issues on doc files that CVS won't let us fix
2277 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2278 - add pkgconfig to BuildRequires
2279 - clean up gnome1/2 menu entries for appropriate packages
2280 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2281 - tightened up doc distribution
2282 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2283 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
2284 - rpm's horrible bug that prevents nested conditional macros prevents me
2285 - from implementing these 2 separate approaches within the conditionals which
2286 - create the separate server packages.
2287 - the solution adopted is to remove the gnome-console files from the server packages
2288 - so bacula-gconsole is now an add on for both client and server packages.
2289 - this also now allows the server packages to be install on machines without
2290 - an X-server and we can still maintain a single spec file.
2291 - added tests to make sure we have defined platform and database macros.
2292 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2293 - corrected mysql prerequisites for suse
2294 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2295 - replaced all cp commands with cp -p
2296 - removed addition of a+x permissions on gnome-console
2297 - corrected permissions on init scripts
2298 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2299 - corrected creation of sqlite_bindir in install from !mysql to sqlite
2301 - various cleanup patches from Michael K. Johnson:
2302 - corrected post install routines for nicer chkconfig
2303 - removed chmod changes in post routines and moved to install section
2304 - removed interactive nature of post routine for rescue package
2305 - added description of building rescue disks to the description of rescue package
2306 - added clean of build root to beginning of install
2307 - removed specifying attr in all file lists
2308 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2309 - added bconsole to client package
2310 - added gconsole package as add-on to client
2311 - removed spurious dependancies on updatedb package (!cut/paste)
2312 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2313 - added updatedb package
2314 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2315 - added postgresql package
2316 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2317 - corrected the if else logic in the dependancy sections
2318 - changes for 1.34 release
2319 - /etc/bacula/console is now /etc/bacula/bconsole
2320 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
2321 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
2322 - /usr/sbin/smtp is now /usr/sbin/bsmtp
2323 - added new /etc/bacula/drop_mysql_database
2324 - added new /etc/bacula/drop_sqlite_database
2325 - added new /etc/bacula/grant_sqlite_privileges
2326 - added new generic bacula database scripts in /etc/bacula
2327 - added pre-install sections to check for database versions older than 6
2328 - added check for /etc/bacula/console.conf and copy to bconsole.conf
2329 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2330 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
2331 - added testing for existing databases before executing any of the database creation scripts
2332 - added defines working_dir and sqlite_bindir in place of hard coded paths
2333 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2334 - added build configuration for SuSE.
2335 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
2336 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2337 - added patch for create_sqlite_database to fix the installed bindir
2338 - added execute of create_sqlite_database to post of sqlite package
2339 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2340 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
2341 - added bacula-fd as Requires for rescue package
2342 - added build tag for Fedora Core 1
2343 - cleaned up dependancies for all builds
2344 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2345 - removed rh_version from package names
2346 - added platform build configuration section to beginning of file
2347 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2348 - removed make_static_bacula script from rescue package install
2349 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2350 - Added define at top of file for depkgs version
2351 - Added rescue sub-package
2352 - Moved requires statements into proper sub-package locations
2353 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2354 - Corrected Requires for Gnome 1.4/2.0 builds
2355 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2356 - Added separate source declaration for depkgs
2357 - added patch for make_catalog_backup script
2358 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2359 - Misc changes to mysql/sqlite build and rh7/8 menu differences
2360 - Added rh_version to sub-package names
2361 - Added installed but missing file /etc/bacula/gconsole
2362 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
2363 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
2364 - Update spec for version 1.31 and combine client
2365 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>