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
17 #--------------------------------------------------------------------------
18 # it should not be necessary to change anything below here for a release
19 # except for patch macros in the setup section
20 #--------------------------------------------------------------------------
22 # third party packagers
23 %define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
24 %{?contrib_packager:%define _packager %{contrib_packager}}
26 Summary: Bacula - The Network Backup Solution
30 Group: System Environment/Daemons
32 Source0: http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
33 Source1: http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
34 Source2: Release_Notes-%{version}-%{release}.tar.gz
35 Source3: http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{docs_version}.tar.gz
36 Source4: http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
37 BuildRoot: %{_tmppath}/%{name}-root
38 URL: http://www.bacula.org/
39 Vendor: The Bacula Team
40 Packager: %{_packager}
42 # define the basic package description
43 %define blurb Bacula - It comes by night and sucks the vital essence from your computers.
44 %define blurb2 Bacula is a set of computer programs that permit you (or the system
45 %define blurb3 administrator) to manage backup, recovery, and verification of computer
46 %define blurb4 data across a network of computers of different kinds. In technical terms,
47 %define blurb5 it is a network client/server based backup program. Bacula is relatively
48 %define blurb6 easy to use and efficient, while offering many advanced storage management
49 %define blurb7 features that make it easy to find and recover lost or damaged files.
50 %define blurb8 Bacula source code has been released under the GPL version 2 license.
53 %define sqlite_bindir /usr/lib/bacula/sqlite
54 %define _docsrc ../%{name}-docs-%{docs_version}
55 %define _rescuesrc ../%{name}-rescue-%{_rescuever}
56 %define depkgs ../depkgs
57 %define _mandir /usr/share/man
59 # directory locations for FHS-compatibility
60 %define sysconf_dir /etc/bacula
61 %define script_dir /etc/bacula
62 %define working_dir /var/lib/bacula
63 %define pid_dir /var/run
65 # NOTE these defines are used in some rather complex useradd and groupadd
66 # commands. If you change them examine the post scripts for consequences.
67 %define director_daemon_user bacula
68 %define storage_daemon_user bacula
69 %define file_daemon_user root
70 %define daemon_group bacula
71 # group that has write access to tape devices, usually disk on Linux
72 %define storage_daemon_group disk
73 %define user_file /etc/passwd
74 %define group_file /etc/group
77 %define useradd /usr/sbin/useradd
78 %define groupadd /usr/sbin/groupadd
79 %define usermod /usr/sbin/usermod
81 # platform defines - set one below or define the build_xxx on the command line
84 %{?build_rh7:%define rh7 1}
86 %{?build_rh8:%define rh8 1}
88 %{?build_rh9:%define rh9 1}
91 %{?build_fc1:%define fc1 1}
93 %{?build_fc3:%define fc3 1}
95 %{?build_fc4:%define fc4 1}
97 %{?build_fc5:%define fc5 1}
99 %{?build_fc6:%define fc6 1}
101 %{?build_fc7:%define fc7 1}
102 # Whitebox Enterprise build
104 %{?build_wb3:%define wb3 1}
105 # RedHat Enterprise builds
107 %{?build_rhel3:%define rhel3 1}
108 %{?build_rhel3:%define wb3 1}
110 %{?build_rhel4:%define rhel4 1}
111 %{?build_rhel4:%define fc3 1}
113 %{?build_rhel5:%define rhel5 1}
114 %{?build_rhel5:%define fc6 1}
117 %{?build_centos3:%define centos3 1}
118 %{?build_centos3:%define wb3 1}
120 %{?build_centos4:%define centos4 1}
121 %{?build_centos4:%define fc3 1}
123 %{?build_centos5:%define centos5 1}
124 %{?build_centos5:%define fc6 1}
127 %{?build_sl3:%define sl3 1}
128 %{?build_sl3:%define wb3 1}
130 %{?build_sl4:%define sl4 1}
131 %{?build_sl4:%define fc3 1}
133 %{?build_sl5:%define sl5 1}
134 %{?build_sl5:%define fc6 1}
137 %{?build_su9:%define su9 1}
139 %{?build_su10:%define su10 1}
141 %{?build_su102:%define su102 1}
144 %{?build_mdk:%define mdk 1}
146 %{?build_mdv:%define mdv 1}
147 %{?build_mdv:%define mdk 1}
150 %define client_only 0
151 %{?build_client_only:%define client_only 1}
153 # test for a platform definition
154 %if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk}
155 %{error: You must specify a platform. Please examine the spec file.}
160 # set for database support desired or define the build_xxx on the command line
162 %{?build_mysql:%define mysql 1}
163 # if using mysql 4.x define this and mysql above
164 # currently: Mandrake 10.1, SuSE 9.x & 10.0, RHEL4 and Fedora Core 4
166 %{?build_mysql4:%define mysql4 1}
167 %{?build_mysql4:%define mysql 1}
168 # if using mysql 5.x define this and mysql above
169 # currently: SuSE 10.1 and Fedora Core 5
171 %{?build_mysql5:%define mysql5 1}
172 %{?build_mysql5:%define mysql 1}
174 %{?build_sqlite:%define sqlite 1}
176 %{?build_postgresql:%define postgresql 1}
178 # test for a database definition
179 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql} && ! %{client_only}
180 %{error: You must specify database support. Please examine the spec file.}
185 %define db_backend mysql
188 %define db_backend sqlite
191 %define db_backend postgresql
196 %{?build_x86_64:%define x86_64 1}
198 # check what distribution we are
199 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4} || %{rhel5}
200 %define _dist %(grep Red /etc/redhat-release)
202 %if %{fc1} || %{fc4} || %{fc5} || %{fc6} || %{fc7}
203 %define _dist %(grep Fedora /etc/redhat-release)
205 %if %{centos5} || %{centos4} || %{centos3}
206 %define _dist %(grep CentOS /etc/redhat-release)
208 %if %{sl5} ||%{sl4} || %{sl3}
209 %define _dist %(grep 'Scientific Linux' /etc/redhat-release)
211 %if %{fc3} && ! %{rhel4} && ! %{centos4} && ! %{sl4}
212 %define _dist %(grep Fedora /etc/redhat-release)
214 %if %{wb3} && ! %{rhel3} && ! %{centos3} && ! %{sl3}
215 %define _dist %(grep White /etc/whitebox-release)
217 %if %{su9} || %{su10} || %{su102}
218 %define _dist %(grep -i SuSE /etc/SuSE-release)
221 %define _dist %(grep Mand /etc/mandrake-release)
223 Distribution: %{_dist}
225 # Should we build gconsole, possible only if gtk= >= 2.4 available.
226 # leaving all the BuildRequires and Requires in place below for now.
227 # su10, fc3 and fc4 now nobuild, tray monitor fails to build as of 2.2.1
228 # release as it needs 2.10
231 %if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{su9} || %{su10}
234 %if %{mdk} && ! %{mdv}
238 # specifically disallow gconsole if desired
239 %{?nobuild_gconsole:%define gconsole 0}
241 # Should we build wxconsole, only wxWidgets >=2.6 is supported
242 # currently only SuSE 10 and FC4/FC5
244 %{?build_wxconsole:%define wxconsole 1}
246 # Should we build bat
249 %{?build_bat:%define bat 1}
251 # should we turn on python support
253 %{?build_python:%define python 1}
255 # Mandriva somehow forces the manpage file extension to bz2 rather than gz
257 %define manpage_ext bz2
259 %define manpage_ext gz
262 # for client only build
273 %{expand: %%define gccver %(rpm -q --queryformat %%{version} gcc)}
274 %{expand: %%define gccrel %(rpm -q --queryformat %%{release} gcc)}
276 BuildRequires: gcc, gcc-c++, make, autoconf
277 BuildRequires: ncurses-devel, perl
278 BuildRequires: libstdc++-devel = %{gccver}-%{gccrel}, libxml2-devel, zlib-devel
279 BuildRequires: openssl-devel
281 BuildRequires: python, python-devel
282 %{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
285 BuildRequires: pkgconfig, pango-devel, atk-devel
288 BuildRequires: qt-devel >= 4.2
291 BuildRequires: libtermcap-devel
292 BuildRequires: glibc-devel >= 2.2
295 BuildRequires: termcap
296 BuildRequires: glibc-devel >= 2.3
298 %if %{su9} && %{gconsole}
299 BuildRequires: libgnome >= 2.0
300 BuildRequires: gtk2-devel >= 2.0
301 BuildRequires: libgnomeui-devel >= 2.0
302 BuildRequires: ORBit2-devel
303 BuildRequires: libart_lgpl-devel >= 2.0
304 BuildRequires: libbonobo-devel >= 2.0
305 BuildRequires: libbonoboui-devel >= 2.0
306 BuildRequires: bonobo-activation-devel
307 BuildRequires: gconf2-devel
308 BuildRequires: linc-devel
309 BuildRequires: freetype2-devel
312 BuildRequires: termcap
313 BuildRequires: glibc-devel >= 2.3
315 %if %{su10} && %{gconsole}
316 BuildRequires: libgnome >= 2.12
317 BuildRequires: gtk2-devel >= 2.8
318 BuildRequires: libgnomeui-devel >= 2.12
319 BuildRequires: ORBit2-devel
320 BuildRequires: libart_lgpl-devel >= 2.3
321 BuildRequires: libbonobo-devel >= 2.10
322 BuildRequires: libbonoboui-devel >= 2.10
323 BuildRequires: bonobo-activation-devel
324 BuildRequires: gconf2-devel
325 BuildRequires: freetype2-devel
326 BuildRequires: cairo-devel
327 BuildRequires: fontconfig-devel >= 2.3
328 BuildRequires: gnome-vfs2-devel >= 2.12
329 BuildRequires: libpng-devel
332 BuildRequires: termcap
333 BuildRequires: glibc-devel >= 2.5
335 %if %{su102} && %{gconsole}
336 BuildRequires: libgnome >= 2.16
337 BuildRequires: gtk2-devel >= 2.10
338 BuildRequires: libgnomeui-devel >= 2.16
339 BuildRequires: ORBit2-devel
340 BuildRequires: libart_lgpl-devel >= 2.3
341 BuildRequires: libbonobo-devel >= 2.16
342 BuildRequires: libbonoboui-devel >= 2.16
343 BuildRequires: bonobo-activation-devel
344 BuildRequires: gconf2-devel
345 BuildRequires: freetype2-devel
346 BuildRequires: cairo-devel
347 BuildRequires: fontconfig-devel >= 2.4
348 BuildRequires: gnome-vfs2-devel >= 2.16
349 BuildRequires: libpng-devel
352 BuildRequires: libtermcap-devel
353 BuildRequires: libstdc++-static-devel
354 BuildRequires: glibc-static-devel
355 BuildRequires: glibc-devel >= 2.3
357 %if %{mdk} && !%{mdv} && %{gconsole}
358 BuildRequires: gtk2-devel >= 2.0
359 BuildRequires: libgnomeui2-devel >= 2.0
360 BuildRequires: libORBit2-devel
361 BuildRequires: libart_lgpl-devel >= 2.0
362 BuildRequires: libbonobo2_0-devel
363 BuildRequires: libbonoboui2_0-devel
364 BuildRequires: libbonobo-activation-devel
365 BuildRequires: libGConf2-devel
366 BuildRequires: freetype2-devel
368 %if %{mdv} && %{gconsole}
369 BuildRequires: gtk2-devel >= 2.8
370 BuildRequires: libgnomeui2-devel >= 2.10
371 BuildRequires: libORBit2-devel
372 BuildRequires: libart_lgpl-devel >= 2.3
373 BuildRequires: libbonobo2_0-devel
374 BuildRequires: libbonoboui2_0-devel
375 BuildRequires: libbonobo-activation-devel
376 BuildRequires: libGConf2-devel
377 BuildRequires: freetype2-devel
380 BuildRequires: libtermcap-devel
381 BuildRequires: glibc-devel >= 2.3
383 %if %{fc3} && %{gconsole}
384 BuildRequires: gtk2-devel >= 2.4
385 BuildRequires: libgnomeui-devel >= 2.8
386 BuildRequires: ORBit2-devel
387 BuildRequires: libart_lgpl-devel >= 2.3
388 BuildRequires: libbonobo-devel >= 2.8
389 BuildRequires: libbonoboui-devel >= 2.8
390 BuildRequires: bonobo-activation-devel
391 BuildRequires: GConf2-devel
392 BuildRequires: freetype-devel
395 BuildRequires: libtermcap-devel
396 BuildRequires: glibc-devel >= 2.3
398 %if %{fc4} && %{gconsole}
399 BuildRequires: gtk2-devel >= 2.6
400 BuildRequires: libgnomeui-devel >= 2.10
401 BuildRequires: ORBit2-devel
402 BuildRequires: libart_lgpl-devel >= 2.3
403 BuildRequires: libbonobo-devel >= 2.8
404 BuildRequires: libbonoboui-devel >= 2.8
405 BuildRequires: bonobo-activation-devel
406 BuildRequires: GConf2-devel
407 BuildRequires: freetype-devel
410 BuildRequires: libtermcap-devel
411 BuildRequires: glibc-devel >= 2.4
413 %if %{fc5} && %{gconsole}
414 BuildRequires: gtk2-devel >= 2.8
415 BuildRequires: libgnomeui-devel >= 2.14
416 BuildRequires: ORBit2-devel
417 BuildRequires: libart_lgpl-devel >= 2.3
418 BuildRequires: libbonobo-devel >= 2.14
419 BuildRequires: libbonoboui-devel >= 2.14
420 BuildRequires: GConf2-devel
421 BuildRequires: freetype-devel
424 BuildRequires: libtermcap-devel
425 BuildRequires: glibc-devel >= 2.5
427 %if %{fc6} && %{gconsole}
428 BuildRequires: gtk2-devel >= 2.10
429 BuildRequires: libgnomeui-devel >= 2.16
430 BuildRequires: ORBit2-devel
431 BuildRequires: libart_lgpl-devel >= 2.3
432 BuildRequires: libbonobo-devel >= 2.16
433 BuildRequires: libbonoboui-devel >= 2.16
434 BuildRequires: GConf2-devel
435 BuildRequires: freetype-devel
438 BuildRequires: libtermcap-devel
439 BuildRequires: glibc-devel >= 2.5
441 %if %{fc7} && %{gconsole}
442 BuildRequires: gtk2-devel >= 2.10
443 BuildRequires: libgnomeui-devel >= 2.18
444 BuildRequires: ORBit2-devel
445 BuildRequires: libart_lgpl-devel >= 2.3
446 BuildRequires: libbonobo-devel >= 2.18
447 BuildRequires: libbonoboui-devel >= 2.18
448 BuildRequires: GConf2-devel
449 BuildRequires: freetype-devel
451 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7}
452 BuildRequires: libtermcap-devel
453 BuildRequires: glibc-devel >= 2.3
455 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7} && %{gconsole}
456 BuildRequires: gtk2-devel >= 2.0
457 BuildRequires: libgnomeui-devel >= 2.0
458 BuildRequires: ORBit2-devel
459 BuildRequires: libart_lgpl-devel >= 2.0
460 BuildRequires: libbonobo-devel >= 2.0
461 BuildRequires: libbonoboui-devel >= 2.0
462 BuildRequires: bonobo-activation-devel
463 BuildRequires: GConf2-devel
464 BuildRequires: linc-devel
465 BuildRequires: freetype-devel
468 %if %{mysql} && ! %{mysql4} && ! %{mysql5}
469 BuildRequires: mysql-devel >= 3.23
472 %if %{mysql} && %{mysql4}
473 BuildRequires: mysql-devel >= 4.0
476 %if %{mysql} && %{mysql5}
477 BuildRequires: mysql-devel >= 5.0
480 %if %{postgresql} && %{wb3}
481 BuildRequires: rh-postgresql-devel >= 7
484 %if %{postgresql} && ! %{wb3}
485 BuildRequires: postgresql-devel >= 7
489 BuildRequires: wxGTK-devel >= 2.6
513 Summary: Bacula - The Network Backup Solution
514 Group: System Environment/Daemons
515 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
516 Conflicts: bacula-client
517 Obsoletes: bacula-rescue
519 %if %{su9} || %{su10} || %{su102}
523 Requires: ncurses, libstdc++, zlib, openssl, mtx
526 Requires: glibc >= 2.2
529 %if %{su9} || %{su10}
530 Requires: glibc >= 2.3
534 Requires: glibc >= 2.5
537 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{fc5} && ! %{fc6} && ! %{fc7}
538 Requires: glibc >= 2.3
542 Requires: glibc >= 2.4
546 Requires: glibc >= 2.5
550 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4} && ! %{mysql5}
551 Requires: mysql >= 3.23
552 Requires: mysql-server >= 3.23
554 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{mdk} && %{mysql4}
555 Requires: mysql >= 4.0
556 Requires: mysql-server >= 4.0
558 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && %{mysql5}
559 Requires: mysql >= 5.0
560 Requires: mysql-server >= 5.0
563 %if %{mysql} && %{su9} && ! %{mysql4}
564 Requires: mysql >= 3.23
565 Requires: mysql-client >= 3.23
567 %if %{mysql} && %{su9} && %{mysql4}
568 Requires: mysql >= 4.0
569 Requires: mysql-client >= 4.0
571 %if %{mysql} && %{su10} && %{mysql4}
572 Requires: mysql >= 4.0
573 Requires: mysql-client >= 4.0
575 %if %{mysql} && %{su10} && %{mysql5}
576 Requires: mysql >= 5.0
577 Requires: mysql-client >= 5.0
579 %if %{mysql} && %{su102} && %{mysql5}
580 Requires: mysql >= 5.0
581 Requires: mysql-client >= 5.0
584 %if %{mysql} && %{mdk} && ! %{mysql4}
585 Requires: mysql >= 3.23
586 Requires: mysql-client >= 3.23
588 %if %{mysql} && %{mdk} && %{mysql4}
589 Requires: mysql >= 4.0
590 Requires: mysql-client >= 4.0
593 %if %{postgresql} && %{wb3}
594 Requires: rh-postgresql >= 7
595 Requires: rh-postgresql-server >= 7
597 %if %{postgresql} && ! %{wb3}
598 Requires: postgresql >= 7
599 Requires: postgresql-server >= 7
609 %description postgresql
613 Requires: python >= %{pyver}
627 This build requires MySQL to be installed separately as the catalog database.
630 This build requires PostgreSQL to be installed separately as the catalog database.
633 This build incorporates sqlite as the catalog database, statically compiled.
636 This build includes python scripting support.
641 Summary: Bacula - The Network Backup Solution
642 Group: System Environment/Daemons
646 This is Bacula's version of mtx tape utilities for Linux distributions that
647 do not provide their own mtx package
651 Summary: Bacula - The Network Backup Solution
652 Group: System Environment/Daemons
654 Conflicts: bacula-mysql
655 Conflicts: bacula-sqlite
656 Conflicts: bacula-postgresql
657 Obsoletes: bacula-rescue
659 %if %{su9} || %{su10} || %{su102}
663 Requires: libstdc++, zlib, openssl
666 Requires: glibc >= 2.2
669 %if %{su9} || %{su10}
670 Requires: glibc >= 2.3
674 Requires: glibc >= 2.5
677 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{fc5} && ! %{fc6}
678 Requires: glibc >= 2.3
682 Requires: glibc >= 2.4
686 Requires: glibc >= 2.5
691 Requires: python >= %{pyver}
705 This is the File daemon (Client) only package. It includes the command line
708 This build includes python scripting support.
714 Summary: Bacula - The Network Backup Solution
715 Group: System Environment/Daemons
717 %description updatedb
728 This package installs scripts for updating older versions of the bacula
734 Summary: Bacula - The Network Backup Solution
735 Group: System Environment/Daemons
736 Requires: atk, libstdc++, zlib, pango, libxml2, bacula-fd, openssl
739 %if %{gconsole} && %{su9}
740 Requires: gtk2 >= 2.0
741 Requires: libgnome >= 2.0
742 Requires: libgnomeui >= 2.0
743 Requires: glibc >= 2.3
745 Requires: libart_lgpl >= 2.0
746 Requires: libbonobo >= 2.0
747 Requires: libbonoboui >= 2.0
748 Requires: bonobo-activation
753 %if %{gconsole} && %{su10}
754 Requires: gtk2 >= 2.8
755 Requires: libgnome >= 2.12
756 Requires: libgnomeui >= 2.12
757 Requires: glibc >= 2.3
759 Requires: libart_lgpl >= 2.3
760 Requires: libbonobo >= 2.10
761 Requires: libbonoboui >= 2.10
762 Requires: bonobo-activation
766 Requires: fontconfig >= 2.3
767 Requires: gnome-vfs2 >= 2.12
770 %if %{gconsole} && %{su102}
771 Requires: gtk2 >= 2.10
772 Requires: libgnome >= 2.16
773 Requires: libgnomeui >= 2.16
774 Requires: glibc >= 2.5
776 Requires: libart_lgpl >= 2.3
777 Requires: libbonobo >= 2.16
778 Requires: libbonoboui >= 2.16
779 Requires: bonobo-activation
783 Requires: fontconfig >= 2.4
784 Requires: gnome-vfs2 >= 2.16
787 %if %{gconsole} && %{mdk} && !%{mdv}
788 Requires: gtk2 >= 2.0
789 Requires: libgnomeui2
790 Requires: glibc >= 2.3
792 Requires: libart_lgpl >= 2.0
793 Requires: libbonobo >= 2.0
794 Requires: libbonoboui >= 2.0
798 %if %{gconsole} && %{mdv}
799 Requires: gtk2 >= 2.8
800 Requires: libgnomeui2
801 Requires: glibc >= 2.3
803 Requires: libart_lgpl >= 2.3
804 Requires: libbonobo >= 2.10
805 Requires: libbonoboui >= 2.10
809 %if %{gconsole} && %{fc3}
810 Requires: gtk2 >= 2.4
811 Requires: libgnomeui >= 2.8
812 Requires: glibc >= 2.3
814 Requires: libart_lgpl >= 2.3
815 Requires: libbonobo >= 2.8
816 Requires: libbonoboui >= 2.8
817 Requires: bonobo-activation
821 %if %{gconsole} && %{fc4}
822 Requires: gtk2 >= 2.6
823 Requires: libgnomeui >= 2.10
824 Requires: glibc >= 2.3
826 Requires: libart_lgpl >= 2.3
827 Requires: libbonobo >= 2.8
828 Requires: libbonoboui >= 2.8
829 Requires: bonobo-activation
833 %if %{gconsole} && %{fc5}
834 Requires: gtk2 >= 2.8
835 Requires: libgnomeui >= 2.14
836 Requires: glibc >= 2.4
838 Requires: libart_lgpl >= 2.3
839 Requires: libbonobo >= 2.14
840 Requires: libbonoboui >= 2.14
844 %if %{gconsole} && %{fc6}
845 Requires: gtk2 >= 2.10
846 Requires: libgnomeui >= 2.16
847 Requires: glibc >= 2.5
849 Requires: libart_lgpl >= 2.3
850 Requires: libbonobo >= 2.16
851 Requires: libbonoboui >= 2.16
855 %if %{gconsole} && %{fc7}
856 Requires: gtk2 >= 2.10
857 Requires: libgnomeui >= 2.18
858 Requires: glibc >= 2.5
860 Requires: libart_lgpl >= 2.3
861 Requires: libbonobo >= 2.18
862 Requires: libbonoboui >= 2.18
866 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7}
867 Requires: gtk2 >= 2.0
868 Requires: libgnomeui >= 2.0
869 Requires: glibc >= 2.3
871 Requires: libart_lgpl >= 2.0
872 Requires: libbonobo >= 2.0
873 Requires: libbonoboui >= 2.0
874 Requires: bonobo-activation
879 %if %{gconsole} && %{su9}
882 %if %{gconsole} && %{su10}
885 %if %{gconsole} && %{su102}
888 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102}
893 %description gconsole
904 This is the Gnome Console package. It is an add-on to the client or
910 Summary: Bacula - The Network Backup Solution
911 Group: System Environment/Daemons
912 Requires: wxGTK >= 2.6, libstdc++, openssl
915 %if %{wxconsole} && %{su10}
916 Requires: gtk2 >= 2.8
919 %if %{wxconsole} && %{su102}
920 Requires: gtk2 >= 2.10
923 %if %{wxconsole} && %{fc3}
924 Requires: gtk2 >= 2.4
927 %if %{wxconsole} && %{fc4}
928 Requires: gtk2 >= 2.6
931 %if %{wxconsole} && %{fc5}
932 Requires: gtk2 >= 2.8
935 %if %{wxconsole} && %{fc6}
936 Requires: gtk2 >= 2.10
939 %if %{wxconsole} && %{fc7}
940 Requires: gtk2 >= 2.10
944 %description wxconsole
955 This is the WXWindows Console package. It is an add-on to the client or
961 Summary: Bacula - The Network Backup Solution
962 Group: System Environment/Daemons
965 %if %{bat} && %{su10}
967 Requires: glibc >= 2.4
977 %if %{bat} && %{su102}
979 Requires: glibc >= 2.5
991 Requires: glibc >= 2.4
1001 %if %{bat} && %{fc6}
1003 Requires: glibc >= 2.5
1004 Requires: fontconfig
1013 %if %{bat} && %{fc7}
1015 Requires: glibc >= 2.5
1016 Requires: fontconfig
1037 This is the Bacula Administration Tool package. It is an add-on to
1038 the client or server packages.
1051 %if %{su9} || %{su10} || %{su102}
1052 export LDFLAGS="${LDFLAGS} -L/usr/lib/termcap"
1060 %if ! %{client_only}
1068 # patches for the bundled sqlite scripts
1070 # patch the make_sqlite_tables script for installation bindir
1071 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
1073 # patch the create_sqlite_database script for installation bindir
1074 # not necessary after 1.39.26 no longer references sqlite binary
1075 #patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
1077 # patch the make_catalog_backup script for installation bindir
1078 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
1080 # patch the update_sqlite_tables script for installation bindir
1081 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
1083 # patch the bacula-dir init script to remove sqlite service
1084 %if %{sqlite} && %{su9}
1085 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1087 %if %{sqlite} && %{su10}
1088 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1090 %if %{sqlite} && %{su102}
1091 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1094 # 64 bit lib location hacks
1095 # as of 1.39.18 it should not be necessary to enable x86_64 as configure is
1096 # reported to be fixed to properly detect lib locations.
1098 export LDFLAGS="${LDFLAGS} -L/usr/lib64"
1100 %if %{mysql} && %{x86_64}
1101 export LDFLAGS="${LDFLAGS} -L/usr/lib64/mysql"
1103 %if %{python} && %{x86_64}
1104 export LDFLAGS="${LDFLAGS} -L/usr/lib64/python%{pyver}"
1109 --sbindir=/usr/sbin \
1110 --sysconfdir=%{sysconf_dir} \
1111 --with-scriptdir=%{script_dir} \
1112 --with-working-dir=%{working_dir} \
1113 --with-pid-dir=%{pid_dir} \
1114 --enable-smartalloc \
1115 --enable-client-only \
1125 --sbindir=/usr/sbin \
1126 --sysconfdir=%{sysconf_dir} \
1127 --with-scriptdir=%{script_dir} \
1128 --with-working-dir=%{working_dir} \
1129 --with-pid-dir=%{pid_dir} \
1130 --enable-smartalloc \
1134 %if %{gconsole} && ! %{rh8}
1135 --enable-tray-monitor \
1141 --with-sqlite=${cwd}/%{depkgs}/sqlite \
1147 --enable-bwx-console \
1151 --with-qwt=${cwd}/%{depkgs}/qwt \
1157 --enable-client-only \
1159 %if %{rh7} || %{rh8} || %{rh9} || %{fc1} || %{fc3} || %{wb3}
1160 --disable-batch-insert \
1162 --mandir=%{_mandir} \
1163 --with-subsys-dir=/var/lock/subsys \
1164 --with-dir-user=%{director_daemon_user} \
1165 --with-dir-group=%{daemon_group} \
1166 --with-sd-user=%{storage_daemon_user} \
1167 --with-sd-group=%{storage_daemon_group} \
1168 --with-fd-user=%{file_daemon_user} \
1169 --with-fd-group=%{daemon_group} \
1170 --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
1171 --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
1172 --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
1173 --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
1174 --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
1175 --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
1183 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1184 mkdir -p $RPM_BUILD_ROOT/etc/init.d
1185 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
1186 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/logfiles
1187 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/services
1188 mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
1189 mkdir -p $RPM_BUILD_ROOT%{script_dir}/updatedb
1191 %if %{gconsole} || %{wxconsole} || %{bat}
1192 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
1193 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
1196 %if %{gconsole} || %{wxconsole} || %{bat}
1197 %define usermode_iftrick 1
1199 %define usermode_iftrick 0
1202 %if %{usermode_iftrick} && ! %{su9} && ! %{su10} && ! %{su102}
1203 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
1204 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
1205 mkdir -p $RPM_BUILD_ROOT/usr/bin
1209 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
1213 prefix=$RPM_BUILD_ROOT/usr \
1214 sbindir=$RPM_BUILD_ROOT/usr/sbin \
1215 sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1216 scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1217 working_dir=$RPM_BUILD_ROOT%{working_dir} \
1218 piddir=$RPM_BUILD_ROOT%{pid_dir} \
1219 mandir=$RPM_BUILD_ROOT%{_mandir} \
1222 %if ! %{client_only}
1225 prefix=$RPM_BUILD_ROOT/usr \
1226 sbindir=$RPM_BUILD_ROOT/usr/sbin \
1227 sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1228 scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1229 working_dir=$RPM_BUILD_ROOT%{working_dir} \
1230 piddir=$RPM_BUILD_ROOT%{pid_dir} \
1231 mandir=$RPM_BUILD_ROOT%{_mandir} \
1236 # make install in manpages installs _everything_ shotgun style
1237 # so now delete what we will not be packaging
1239 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
1242 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bat.1.%{manpage_ext}
1245 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
1246 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
1249 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bsmtp.1.%{manpage_ext}
1250 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1251 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1252 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bcopy.8.%{manpage_ext}
1253 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bextract.8.%{manpage_ext}
1254 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bls.8.%{manpage_ext}
1255 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bscan.8.%{manpage_ext}
1256 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/btape.8.%{manpage_ext}
1257 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/dbcheck.8.%{manpage_ext}
1260 # fixme - make installs the mysql scripts for sqlite build
1262 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1263 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1264 rm -f $RPM_BUILD_ROOT%{script_dir}/grant_mysql_privileges
1267 # fixme - make installs the mysql scripts for postgresql build
1269 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1270 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1273 # fixme - make installs gconsole script for build without gconsole
1275 rm -f $RPM_BUILD_ROOT%{script_dir}/gconsole
1278 rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
1280 # install the init scripts
1281 %if %{su9} || %{su10} || %{su102}
1282 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1283 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1284 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1287 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1288 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1289 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1291 %if ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk}
1292 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1293 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1294 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1296 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
1298 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1299 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1302 # install the menu stuff
1303 %if %{gconsole} && %{su9}
1304 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1305 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1306 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1307 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1309 %if %{gconsole} && %{su10}
1310 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1311 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1312 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1313 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1315 %if %{gconsole} && %{su102}
1316 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1317 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1318 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1319 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1321 %if %{wxconsole} && %{su10}
1322 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1323 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1325 %if %{wxconsole} && %{su102}
1326 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1327 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1329 %if %{bat} && %{su102}
1330 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1331 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1333 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{fc6} || %{fc7} || %{mdk}
1338 %if %{gconsole} && %{iftrick}
1339 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1340 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1341 cp -p scripts/bgnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bgnome-console
1342 cp -p scripts/bgnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/bgnome-console
1343 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bgnome-console
1345 %if %{gconsole} && ! %{rh8}
1346 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1347 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1349 %if %{wxconsole} && %{iftrick}
1350 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1351 cp -p scripts/wxconsole.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1352 cp -p scripts/wxconsole.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bwx-console
1353 cp -p scripts/wxconsole.pamd $RPM_BUILD_ROOT/etc/pam.d/bwx-console
1354 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bwx-console
1356 %if %{bat} && %{iftrick}
1357 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1358 cp -p scripts/bat.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1359 cp -p scripts/bat.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bat
1360 cp -p scripts/bat.pamd $RPM_BUILD_ROOT/etc/pam.d/bat
1361 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bat
1366 cp -p %{depkgs}/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
1367 cp -p %{depkgs}/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
1368 cp -p %{depkgs}/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
1371 # install the logrotate file
1372 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
1374 # install the updatedb scripts
1375 cp -p updatedb/* $RPM_BUILD_ROOT%{script_dir}/updatedb/
1377 # install the logwatch scripts
1378 %if ! %{client_only}
1379 cp -p scripts/logwatch/bacula $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1380 cp -p scripts/logwatch/logfile.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1381 cp -p scripts/logwatch/services.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1382 chmod 755 $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1383 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1384 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1387 # install the rescue files
1388 mkdir $RPM_BUILD_ROOT%{sysconf_dir}/rescue
1389 cp -p %{_rescuesrc}/Makefile* $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1390 cp -p %{_rescuesrc}/README $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1391 cp -p %{_rescuesrc}/configure $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1392 cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1393 cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1394 cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT%{sysconf_dir}/rescue/
1395 touch $RPM_BUILD_ROOT%{sysconf_dir}/rescue/linux/cdrom/rpm_release
1396 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT%{sysconf_dir}/rescue/linux/cdrom/bacula/bin/bacula-fd
1397 rm -f src/filed/static-bacula-fd
1399 # install bat since make doesn't at the moment
1401 cp -p src/qt-console/bat $RPM_BUILD_ROOT/usr/sbin/bat
1402 cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
1405 # now clean up permissions that are left broken by the install
1406 %if ! %{client_only}
1407 chmod o-r $RPM_BUILD_ROOT%{script_dir}/query.sql
1409 chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
1410 %if %{gconsole} && ! %{rh8}
1411 chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
1412 chmod 644 $RPM_BUILD_ROOT%{sysconf_dir}/tray-monitor.conf
1415 # fix me - building enable-client-only installs files not included in bacula-client package
1417 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula
1418 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-dir
1419 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-sd
1420 rm -f $RPM_BUILD_ROOT%{script_dir}/disk-changer
1421 rm -f $RPM_BUILD_ROOT%{script_dir}/dvd-handler
1422 rm -f $RPM_BUILD_ROOT%{script_dir}/mtx-changer
1423 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1424 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1425 rm -rf $RPM_BUILD_ROOT%{script_dir}/updatedb
1429 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1430 rm -rf $RPM_BUILD_DIR/%{name}-docs-%{docs_version}
1431 rm -rf $RPM_BUILD_DIR/%{name}-rescue-%{_rescuever}
1432 rm -rf $RPM_BUILD_DIR/depkgs
1433 rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
1436 # MySQL specific files
1438 %defattr(-, root, root)
1439 %attr(-, root, %{daemon_group}) %{script_dir}/create_mysql_database
1440 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_database
1441 %attr(-, root, %{daemon_group}) %{script_dir}/make_mysql_tables
1442 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_tables
1443 %attr(-, root, %{daemon_group}) %{script_dir}/update_mysql_tables
1444 %attr(-, root, %{daemon_group}) %{script_dir}/grant_mysql_privileges
1445 %attr(-, root, %{daemon_group}) %{script_dir}/startmysql
1446 %attr(-, root, %{daemon_group}) %{script_dir}/stopmysql
1451 %defattr(-,root,root)
1452 %attr(-, root, %{daemon_group}) %{script_dir}/create_sqlite_database
1453 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite_database
1454 %attr(-, root, %{daemon_group}) %{script_dir}/grant_sqlite_privileges
1455 %attr(-, root, %{daemon_group}) %{script_dir}/make_sqlite_tables
1456 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite_tables
1457 %attr(-, root, %{daemon_group}) %{script_dir}/update_sqlite_tables
1458 %{sqlite_bindir}/libsqlite.a
1459 %{sqlite_bindir}/sqlite.h
1460 %{sqlite_bindir}/sqlite
1465 %defattr(-,root,root)
1466 %attr(-, root, %{daemon_group}) %{script_dir}/create_postgresql_database
1467 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_database
1468 %attr(-, root, %{daemon_group}) %{script_dir}/make_postgresql_tables
1469 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_tables
1470 %attr(-, root, %{daemon_group}) %{script_dir}/update_postgresql_tables
1471 %attr(-, root, %{daemon_group}) %{script_dir}/grant_postgresql_privileges
1474 # The rest is DB backend independent
1475 %if ! %{client_only}
1476 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1477 %attr(-, root, %{daemon_group}) %{script_dir}/bacula
1478 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1479 %attr(-, root, %{daemon_group}) %{script_dir}/create_bacula_database
1480 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_database
1481 %attr(-, root, %{daemon_group}) %{script_dir}/grant_bacula_privileges
1482 %attr(-, root, %{daemon_group}) %{script_dir}/make_bacula_tables
1483 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_tables
1484 %attr(-, root, %{daemon_group}) %{script_dir}/update_bacula_tables
1485 %attr(-, root, %{daemon_group}) %{script_dir}/make_catalog_backup
1486 %attr(-, root, %{daemon_group}) %{script_dir}/delete_catalog_backup
1487 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1488 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1489 %attr(-, root, %{daemon_group}) %{sysconf_dir}/rescue
1490 %attr(-, root, %{daemon_group}) %{script_dir}/disk-changer
1491 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-dir
1492 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
1493 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-sd
1494 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
1495 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
1496 %attr(-, root, %{storage_daemon_group}) %{script_dir}/dvd-handler
1497 %attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
1498 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
1500 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1501 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1503 /etc/logrotate.d/bacula
1504 /etc/log.d/scripts/services/bacula
1505 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-dir.conf
1506 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1507 %attr(-, root, %{storage_daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-sd.conf
1508 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1509 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
1510 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/services/bacula.conf
1511 %attr(-, root, %{daemon_group}) %config(noreplace) %{script_dir}/query.sql
1513 %attr(-, %{storage_daemon_user}, %{daemon_group}) %dir %{working_dir}
1515 /usr/sbin/bacula-dir
1523 /usr/sbin/btraceback
1529 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1530 %{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1531 %{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1532 %{_mandir}/man8/bacula.8.%{manpage_ext}
1533 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1534 %{_mandir}/man8/bcopy.8.%{manpage_ext}
1535 %{_mandir}/man8/bextract.8.%{manpage_ext}
1536 %{_mandir}/man8/bls.8.%{manpage_ext}
1537 %{_mandir}/man8/bscan.8.%{manpage_ext}
1538 %{_mandir}/man8/btape.8.%{manpage_ext}
1539 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1540 %{_mandir}/man8/dbcheck.8.%{manpage_ext}
1541 %{_mandir}/man1/bsmtp.1.%{manpage_ext}
1546 # test for bacula database older than version 9
1547 # note: this ASSUMES no password has been set for bacula database
1548 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1553 # test for bacula database older than version 9
1554 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
1555 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1560 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1563 %if ! %{client_only}
1564 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "9" ]; then
1565 echo "This bacula upgrade will update a bacula database from version 9 to 10."
1566 echo "You appear to be running database version $DB_VER. You must first update"
1567 echo "your database to version 9 and then install this upgrade. The alternative"
1568 echo "is to use %{script_dir}/drop_%{db_backend}_tables to delete all your your current"
1569 echo "catalog information, then do the upgrade. Information on updating a"
1570 echo "database older than version 9 can be found in the release notes."
1579 %if ! %{client_only}
1580 # check for and copy %{sysconf_dir}/console.conf to bconsole.conf
1581 if [ -s %{sysconf_dir}/console.conf ];then
1582 cp -p %{sysconf_dir}/console.conf %{sysconf_dir}/bconsole.conf
1585 # create the daemon users and groups
1586 # first create the groups if they don't exist
1587 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1588 if [ -z "$HAVE_BACULA" ]; then
1589 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1590 echo "The group %{daemon_group} has been added to %{group_file}."
1591 echo "See the manual chapter \"Running Bacula\" for details."
1593 HAVE_BACULA=`grep %{storage_daemon_group} %{group_file} 2>/dev/null`
1594 if [ -z "$HAVE_BACULA" ]; then
1595 %{groupadd} -r %{storage_daemon_group} > /dev/null 2>&1
1596 echo "The group %{storage_daemon_group} has been added to %{group_file}."
1597 echo "See the manual chapter \"Running Bacula\" for details."
1599 # now create the users if they do not exist
1600 # we do not use the -g option allowing the primary group to be set to system default
1601 # this will be a unique group on redhat type systems or the group users on some systems
1602 HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
1603 if [ -z "$HAVE_BACULA" ]; then
1604 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{storage_daemon_group} -M -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
1605 echo "The user %{storage_daemon_user} has been added to %{user_file}."
1606 echo "See the manual chapter \"Running Bacula\" for details."
1608 HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
1609 if [ -z "$HAVE_BACULA" ]; then
1610 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
1611 echo "The user %{director_daemon_user} has been added to %{user_file}."
1612 echo "See the manual chapter \"Running Bacula\" for details."
1614 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1615 if [ -z "$HAVE_BACULA" ]; then
1616 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1617 echo "The user %{file_daemon_user} has been added to %{user_file}."
1618 echo "See the manual chapter \"Running Bacula\" for details."
1620 # now we add the supplementary groups, this is ok to call even if the users already exist
1621 # we only do this if the user is NOT root
1622 IS_ROOT=%{director_daemon_user}
1623 if [ "$IS_ROOT" != "root" ]; then
1624 %{usermod} -G %{daemon_group} %{director_daemon_user}
1626 IS_ROOT=%{storage_daemon_user}
1627 if [ "$IS_ROOT" != "root" ]; then
1628 %{usermod} -G %{daemon_group},%{storage_daemon_group} %{storage_daemon_user}
1630 IS_ROOT=%{file_daemon_user}
1631 if [ "$IS_ROOT" != "root" ]; then
1632 %{usermod} -G %{daemon_group} %{file_daemon_user}
1646 %if ! %{client_only}
1648 if [ "$1" -ge 1 ] ; then
1649 /sbin/chkconfig --add bacula-dir
1650 /sbin/chkconfig --add bacula-fd
1651 /sbin/chkconfig --add bacula-sd
1656 # test for an existing database
1657 # note: this ASSUMES no password has been set for bacula database
1658 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1660 # grant privileges and create tables if they do not exist
1661 if [ -z "$DB_VER" ]; then
1662 echo "Hmm, doesn't look like you have an existing database."
1663 echo "Granting privileges for MySQL user bacula..."
1664 %{script_dir}/grant_mysql_privileges
1665 echo "Creating MySQL bacula database..."
1666 %{script_dir}/create_mysql_database
1667 echo "Creating bacula tables..."
1668 %{script_dir}/make_mysql_tables
1670 # check to see if we need to upgrade a 1.38 or lower database
1671 elif [ "$DB_VER" -lt "10" ]; then
1672 echo "This release requires an upgrade to your bacula database."
1673 echo "Backing up your current database..."
1674 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1675 echo "Upgrading bacula database ..."
1676 %{script_dir}/update_mysql_tables
1677 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1683 # test for an existing database
1684 if [ -s %{working_dir}/bacula.db ]; then
1685 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1686 # check to see if we need to upgrade a 1.38 or lower database
1687 if [ "$DB_VER" -lt "10" ] && [ "$DB_VER" -ge "9" ]; then
1688 echo "This release requires an upgrade to your bacula database."
1689 echo "Backing up your current database..."
1690 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1691 echo "Upgrading bacula database ..."
1692 %{script_dir}/update_sqlite_tables
1693 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1696 # create the database and tables
1697 echo "Hmm, doesn't look like you have an existing database."
1698 echo "Creating SQLite database..."
1699 %{script_dir}/create_sqlite_database
1700 echo "Creating the SQLite tables..."
1701 %{script_dir}/make_sqlite_tables
1706 # test for an existing database
1707 # note: this ASSUMES no password has been set for bacula database
1708 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1710 # grant privileges and create tables if they do not exist
1711 if [ -z "$DB_VER" ]; then
1712 echo "Hmm, doesn't look like you have an existing database."
1713 echo "Creating PostgreSQL bacula database..."
1714 %{script_dir}/create_postgresql_database
1715 echo "Creating bacula tables..."
1716 %{script_dir}/make_postgresql_tables
1717 echo "Granting privileges for PostgreSQL user bacula..."
1718 %{script_dir}/grant_postgresql_privileges
1720 # check to see if we need to upgrade a 1.38 or lower database
1721 elif [ "$DB_VER" -lt "10" ]; then
1722 echo "This release requires an upgrade to your bacula database."
1723 echo "Backing up your current database..."
1724 pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1725 echo "Upgrading bacula database ..."
1726 %{script_dir}/update_postgresql_tables
1727 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1732 %if ! %{client_only}
1733 # generate passwords if needed
1734 if [ -d %{sysconf_dir} ]; then
1736 for file in *.conf; do
1737 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
1738 need_password=`grep $string $file 2>/dev/null`
1739 if [ -n "$need_password" ]; then
1740 pass=`openssl rand -base64 33`
1741 sed "s-$string-$pass-g" $file > $file.new
1742 cp -f $file.new $file; rm -f $file.new
1759 %if ! %{client_only}
1762 /sbin/chkconfig --del bacula-dir
1763 /sbin/chkconfig --del bacula-fd
1764 /sbin/chkconfig --del bacula-sd
1769 %if ! %{client_only}
1771 %defattr(-,root,root)
1772 %attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
1773 %attr(-, root, %{storage_daemon_group}) /usr/sbin/mtx
1774 %attr(-, root, %{storage_daemon_group}) /usr/sbin/scsitape
1775 %attr(-, root, %{storage_daemon_group}) /usr/sbin/tapeinfo
1776 %attr(-, root, %{storage_daemon_group}) /usr/sbin/nsmhack
1777 %attr(-, root, %{storage_daemon_group}) /usr/sbin/scsieject
1778 %{_mandir}/man1/loaderinfo.1.%{manpage_ext}
1779 %{_mandir}/man1/mtx.1.%{manpage_ext}
1780 %{_mandir}/man1/scsitape.1.%{manpage_ext}
1781 %{_mandir}/man1/tapeinfo.1.%{manpage_ext}
1782 %{_mandir}/man1/scsieject.1.%{manpage_ext}
1786 %defattr(-,root,root)
1787 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1788 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1789 %{script_dir}/bacula-ctl-fd
1790 /etc/init.d/bacula-fd
1791 %attr(-, root, %{daemon_group}) %{sysconf_dir}/rescue
1793 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1794 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1796 /etc/logrotate.d/bacula
1798 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1799 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1801 %attr(-, root, %{daemon_group}) %dir %{working_dir}
1804 /usr/sbin/btraceback
1805 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1806 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1808 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1809 %{_mandir}/man8/bacula.8.%{manpage_ext}
1810 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1811 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1815 # create the daemon group and user
1816 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1817 if [ -z "$HAVE_BACULA" ]; then
1818 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1819 echo "The group %{daemon_group} has been added to %{group_file}."
1820 echo "See the manual chapter \"Running Bacula\" for details."
1822 # we do not use the -g option allowing the primary group to be set to system default
1823 # this will be a unique group on redhat type systems or the group users on some systems
1824 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1825 if [ -z "$HAVE_BACULA" ]; then
1826 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1827 echo "The user %{file_daemon_user} has been added to %{user_file}."
1828 echo "See the manual chapter \"Running Bacula\" for details."
1830 # now we add the supplementary group, this is ok to call even if the user already exists
1831 # we only do this if the user is NOT root
1832 IS_ROOT=%{file_daemon_user}
1833 if [ "$IS_ROOT" != "root" ]; then
1834 %{usermod} -G %{daemon_group} %{file_daemon_user}
1839 if [ "$1" -ge 1 ] ; then
1840 /sbin/chkconfig --add bacula-fd
1843 # generate passwords if needed
1844 if [ -d %{sysconf_dir} ]; then
1846 for file in *.conf; do
1847 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
1848 need_password=`grep $string $file 2>/dev/null`
1849 if [ -n "$need_password" ]; then
1850 pass=`openssl rand -base64 33`
1851 sed "s-$string-$pass-g" $file > $file.new
1852 cp -f $file.new $file; rm -f $file.new
1861 /sbin/chkconfig --del bacula-fd
1864 %if ! %{client_only}
1866 %defattr(-,root,%{daemon_group})
1867 %{script_dir}/updatedb/*
1870 # create the daemon group
1871 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1872 if [ -z "$HAVE_BACULA" ]; then
1873 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1874 echo "The group %{daemon_group} has been added to %{group_file}."
1875 echo "See the manual chapter \"Running Bacula\" for details."
1879 echo "The database update scripts were installed to %{script_dir}/updatedb"
1884 %defattr(-,root,root)
1885 /usr/sbin/bgnome-console
1886 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1887 %attr(-, root, %{daemon_group}) %{script_dir}/gconsole
1888 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bgnome-console.conf
1889 /usr/share/pixmaps/bacula.png
1890 /usr/share/applications/bacula.desktop
1891 %{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
1894 %if %{gconsole} && ! %{rh8}
1895 /usr/sbin/bacula-tray-monitor
1896 %config(noreplace) %{sysconf_dir}/tray-monitor.conf
1897 /usr/share/pixmaps/bacula-tray-monitor.xpm
1898 /usr/share/applications/bacula-tray-monitor.desktop
1899 %{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
1902 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102}
1903 # add the console helper files
1904 %config(noreplace,missingok) /etc/pam.d/bgnome-console
1905 %config(noreplace,missingok) /etc/security/console.apps/bgnome-console
1906 /usr/bin/bgnome-console
1911 # create the daemon group
1912 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1913 if [ -z "$HAVE_BACULA" ]; then
1914 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1915 echo "The group %{daemon_group} has been added to %{group_file}."
1916 echo "See the manual chapter \"Running Bacula\" for details."
1920 # generate passwords if needed
1921 if [ -d %{sysconf_dir} ]; then
1923 for file in *.conf; do
1924 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
1925 need_password=`grep $string $file 2>/dev/null`
1926 if [ -n "$need_password" ]; then
1927 pass=`openssl rand -base64 33`
1928 sed "s-$string-$pass-g" $file > $file.new
1929 cp -f $file.new $file; rm -f $file.new
1938 %defattr(-,root,root)
1939 /usr/sbin/bwx-console
1940 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
1941 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bwx-console.conf
1942 /usr/share/pixmaps/wxwin16x16.xpm
1943 /usr/share/applications/wxconsole.desktop
1944 %{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
1947 %if %{wxconsole} && ! %{su9} && ! %{su10} && ! %{su102}
1948 # add the console helper files
1949 %config(noreplace,missingok) /etc/pam.d/bwx-console
1950 %config(noreplace,missingok) /etc/security/console.apps/bwx-console
1951 /usr/bin/bwx-console
1956 # create the daemon group
1957 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1958 if [ -z "$HAVE_BACULA" ]; then
1959 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1960 echo "The group %{daemon_group} has been added to %{group_file}."
1961 echo "See the manual chapter \"Running Bacula\" for details."
1965 # generate passwords if needed
1966 if [ -d %{sysconf_dir} ]; then
1968 for file in *.conf; do
1969 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
1970 need_password=`grep $string $file 2>/dev/null`
1971 if [ -n "$need_password" ]; then
1972 pass=`openssl rand -base64 33`
1973 sed "s-$string-$pass-g" $file > $file.new
1974 cp -f $file.new $file; rm -f $file.new
1983 %defattr(-,root,root)
1985 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
1986 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
1987 /usr/share/pixmaps/bat_icon.png
1988 /usr/share/applications/bat.desktop
1989 %{_mandir}/man1/bat.1.%{manpage_ext}
1992 %if %{bat} && ! %{su9} && ! %{su10} && ! %{su102}
1993 # add the console helper files
1994 %config(noreplace,missingok) /etc/pam.d/bat
1995 %config(noreplace,missingok) /etc/security/console.apps/bat
2001 # create the daemon group
2002 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2003 if [ -z "$HAVE_BACULA" ]; then
2004 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2005 echo "The group %{daemon_group} has been added to %{group_file}."
2006 echo "See the manual chapter \"Running Bacula\" for details."
2010 # generate passwords if needed
2011 if [ -d %{sysconf_dir} ]; then
2013 for file in *.conf; do
2014 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
2015 need_password=`grep $string $file 2>/dev/null`
2016 if [ -n "$need_password" ]; then
2017 pass=`openssl rand -base64 33`
2018 sed "s-$string-$pass-g" $file > $file.new
2019 cp -f $file.new $file; rm -f $file.new
2027 * Sun Sep 16 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2028 - fix disable-batch-insert
2029 * Fri Sep 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2031 - turn off gconsole build for fc3, tray monitor fails to build
2032 - add new files for mtx package (09Sep07 depkgs update)
2033 * Sat Sep 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2034 - add --disable-batch-insert for older platforms
2035 - add build targets for rhel5 and clones
2036 * Mon Sep 03 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2038 - turn off gconsole build for su10 & fc4, tray monitor fails to build
2039 * Sat Jul 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2040 - 2.1.26 add make of qwt in depkgs for bat
2041 * Sat Jun 02 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2042 - upgrade Qt requirement for bat to 4.2
2043 * Sun May 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2044 - add fc7 build target
2045 * Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2047 - gnome-console now bgnome-console
2048 - wxconsole now bwx-console
2049 - add build option for bat
2050 * Sat Apr 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2051 - merge Otto Mueller's patch but keep script dir set to /etc/bacula
2052 - add build tag for Scientific Linux per Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk>
2053 * Tue Mar 27 2007 Otto Mueller <otto.mueller@bundestag.de>
2054 - adjust directory locations for FHS-compatibility
2055 sysconf_dir (/etc/bacula), script_dir (/usr/lib/bacula),
2056 working_dir (/var/lib/bacula) and pid_dir (/var/run)
2057 * Mon Feb 26 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2058 - add SuSE 10.2 target
2059 * Sat Jan 20 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2061 - set query.sql as config file
2063 * Sun Jan 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2065 - change determination of gcc version per patch from Marc Hennes
2066 - move BuildRequire for atk-devel to gnome only builds
2068 * Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2070 * Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2071 - 1.39.26 remove create_sqlite_database.in.patch
2072 * Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2073 - change ownership of working_dir on server packages to bacula.bacula so that
2074 - bacula-sd can create bootstrap files
2075 * Sat Sep 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2076 - 1.39.22 remove separate cd and make of manpages the main Makefile does it now
2077 * Sun Aug 06 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2078 - fix manpages file extension for mdk
2079 * Sat Aug 05 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2080 - bug 648 re-enable and update sqlite patches
2084 - lock out gconsole build for gtk+ < 2.4
2085 * Mon Jul 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2086 - move pango-devel BuildRequires into gconsole only build
2087 * Sat Jul 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2088 - add provides and conflicts for standard suse packages
2089 - add third party packager tag support
2090 - add build_client_only tag
2091 - remove bsmtp from client package
2092 - add bacula-ctl-fd to client package
2093 * Thu Jul 13 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2094 - fix directory creation when wxconsole and not gconsole
2095 * Tue Jul 04 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2096 - add check to buildrequires to make sure libstdc++ version matches gcc
2097 * Mon Jul 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2098 - add python build support
2099 - fix LDFLAGS declarations
2100 * Sun Jul 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2101 - add requires for standard compiler toolchain
2102 - move version and release tags up
2104 - add docs_version tag
2105 * Sat Jul 01 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2106 - update rescuever to 1.8.6
2107 * Sun Jun 25 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2108 - update depkgs to 25Jun06
2109 - add mysql5 build tag
2110 * Mon Jun 12 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2111 - 1.38.10 bump rescue version
2112 * Sun Jun 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2113 - fix usermod statements
2115 * Thu Apr 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2116 - add -g param back to useradd statements Bug 605
2117 * Mon Apr 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2118 - redundant code cleanup
2119 * Sun Apr 16 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2120 - add wxconsole package
2121 * Fri Apr 14 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2123 - dependency update for Mandriva
2124 * Sun Apr 08 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2126 - remove -n option from useradd scripts
2127 * Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2129 - fix problem specifying more than one primary group for user bacula
2130 - add build switch to not build gconsole regardless of platform
2131 * Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2132 - add centos3 build tag
2133 - fix link error of static-fd on Mandrake with --disable-nls
2134 * Fri Jan 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2135 - add fc4 dependencies
2136 * Mon Jan 23 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2137 - add SuSE 10.0 build
2138 - remove specific permission in attrib macros
2139 * Sat Jan 21 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2141 - fix usermode required on suse, suse doesn't have usermode (xsu instead)
2142 - refix compat for _dist on SLES9 which seems to have been removed
2143 - added note regarding Aleksandar's use of specific permissions in attrib macros
2144 - need to review and add specific fc4 build currently using fc3 Requires
2145 * Wed Dec 14 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2147 - Reorganize files and pre/post sections to remove repetitions
2148 - Always build separate mtx package
2149 - Fix file ownerships for /etc/bacula and Bacula's working dir
2150 * Wed Nov 23 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2151 - Disable GNOME on RH7
2152 * Fri Nov 18 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2153 - Red Hat and look alikes have mtx RPM, do not build/package our version
2154 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2155 - minor edit to _dist for SLES9 compatibility
2156 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2158 - kern changed location of pdf files and html manual in docs package
2159 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2161 - add docs (from prebuilt tarball) and rescue packages back in
2162 - remove dvd-freespace and dvd-writepart files, add dvd-handler
2163 - remove 3 of 4 sqlite script patches as not needed
2164 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2166 - remove docs and rescue sections (remove static fd)
2167 - add dvd-freespace and dvd-writepart files
2168 - update depkgs to 22Jun05
2169 - change database update to 8 to 9
2170 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2171 - minor cleanups before 1.38 changes
2172 - add popt and popt-devel build dependencies
2173 - add tetex and tetex-dvips dependencies for doc build
2174 - replace deprecated Copyright tag with License
2175 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2176 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
2177 - conflict with sqlite packages. remove readline dependency.
2178 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2179 - release 1.36.3 update docs
2180 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2181 - add centos4 build tag
2182 - add x86_64 build tag
2183 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2184 - add rhel4 build tag
2185 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
2186 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2187 - add rhel3 build tag
2188 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2189 - fix tray-monitor.conf for noreplace
2190 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2191 - fix distribution check for Fedora and Whitebox
2192 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2193 - add logwatch script
2195 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2196 - add build for Fedora Core 3 (linc now included in ORDit2)
2197 - add mysql4 define for Mandrake 10.1
2198 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2199 - fix {group_file} variable in post scripts
2200 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
2201 - add distribution checking and custom Distribution tag
2202 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2203 - ASSIGNMENT OF COPYRIGHT
2204 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
2205 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
2206 - all right, title and interest in and to the copyright in this software RPM
2207 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
2208 - free of all liens, encumbrances or any known claims against said copyright.
2209 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2211 - thanks to Daniel Widyono
2212 - update description for rescue package to describe cdrom creation
2213 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2214 - update depkgs to 29Oct04
2215 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2216 - add cdrom rescue to bacula-rescue package
2217 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2218 - misc fixes from 1.36.0 suse feedback
2219 - fix situation where sqlite database exists but sqlite has been removed.
2220 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2221 - remove tray-monitor from RH8 build
2222 - fix permissions on tray-monitor files
2223 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2224 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
2225 - change database update to 7 to 8 upgrade,
2226 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
2227 - build in 30Jul04, add freetype dependancy to gnome package.
2228 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2229 - add documentation to console for groupadd
2230 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2231 - add support for running daemons as root.bacula
2232 - correct for change in location of floppy rescue files in 1.35.2
2233 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
2234 - updated depgkgs to 30Jul04
2235 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2236 - really, really fix symlink creation for gconsole
2237 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2238 - fix symlink creation in gconsole post install
2239 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2240 - fixed error in gconsole post script
2241 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2242 - add check for gconsole symlink before trying to create it
2243 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2244 - fix some minor permissions issues on doc files that CVS won't let us fix
2245 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2246 - add pkgconfig to BuildRequires
2247 - clean up gnome1/2 menu entries for appropriate packages
2248 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2249 - tightened up doc distribution
2250 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2251 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
2252 - rpm's horrible bug that prevents nested conditional macros prevents me
2253 - from implementing these 2 separate approaches within the conditionals which
2254 - create the separate server packages.
2255 - the solution adopted is to remove the gnome-console files from the server packages
2256 - so bacula-gconsole is now an add on for both client and server packages.
2257 - this also now allows the server packages to be install on machines without
2258 - an X-server and we can still maintain a single spec file.
2259 - added tests to make sure we have defined platform and database macros.
2260 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2261 - corrected mysql prerequisites for suse
2262 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2263 - replaced all cp commands with cp -p
2264 - removed addition of a+x permissions on gnome-console
2265 - corrected permissions on init scripts
2266 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2267 - corrected creation of sqlite_bindir in install from !mysql to sqlite
2269 - various cleanup patches from Michael K. Johnson:
2270 - corrected post install routines for nicer chkconfig
2271 - removed chmod changes in post routines and moved to install section
2272 - removed interactive nature of post routine for rescue package
2273 - added description of building rescue disks to the description of rescue package
2274 - added clean of build root to beginning of install
2275 - removed specifying attr in all file lists
2276 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2277 - added bconsole to client package
2278 - added gconsole package as add-on to client
2279 - removed spurious dependancies on updatedb package (!cut/paste)
2280 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2281 - added updatedb package
2282 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2283 - added postgresql package
2284 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2285 - corrected the if else logic in the dependancy sections
2286 - changes for 1.34 release
2287 - /etc/bacula/console is now /etc/bacula/bconsole
2288 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
2289 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
2290 - /usr/sbin/smtp is now /usr/sbin/bsmtp
2291 - added new /etc/bacula/drop_mysql_database
2292 - added new /etc/bacula/drop_sqlite_database
2293 - added new /etc/bacula/grant_sqlite_privileges
2294 - added new generic bacula database scripts in /etc/bacula
2295 - added pre-install sections to check for database versions older than 6
2296 - added check for /etc/bacula/console.conf and copy to bconsole.conf
2297 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2298 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
2299 - added testing for existing databases before executing any of the database creation scripts
2300 - added defines working_dir and sqlite_bindir in place of hard coded paths
2301 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2302 - added build configuration for SuSE.
2303 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
2304 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2305 - added patch for create_sqlite_database to fix the installed bindir
2306 - added execute of create_sqlite_database to post of sqlite package
2307 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2308 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
2309 - added bacula-fd as Requires for rescue package
2310 - added build tag for Fedora Core 1
2311 - cleaned up dependancies for all builds
2312 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2313 - removed rh_version from package names
2314 - added platform build configuration section to beginning of file
2315 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2316 - removed make_static_bacula script from rescue package install
2317 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2318 - Added define at top of file for depkgs version
2319 - Added rescue sub-package
2320 - Moved requires statements into proper sub-package locations
2321 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2322 - Corrected Requires for Gnome 1.4/2.0 builds
2323 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2324 - Added separate source declaration for depkgs
2325 - added patch for make_catalog_backup script
2326 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2327 - Misc changes to mysql/sqlite build and rh7/8 menu differences
2328 - Added rh_version to sub-package names
2329 - Added installed but missing file /etc/bacula/gconsole
2330 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
2331 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
2332 - Update spec for version 1.31 and combine client
2333 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>