3 # Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
5 # Platform Build Configuration
7 # basic defines for every build
10 %define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
13 %{?single_dir_install:%define single_dir 1}
15 # Installation Directory locations
17 %define _prefix /opt/bacula
18 %define _sbindir /opt/bacula/bin
19 %define _bindir /opt/bacula/bin
20 %define _subsysdir /opt/bacula/working
21 %define _mandir /usr/share/man
22 %define sysconf_dir /opt/bacula/etc
23 %define script_dir /opt/bacula/scripts
24 %define working_dir /opt/bacula/working
25 %define pid_dir /opt/bacula/working
26 %define plugin_dir /opt/bacula/plugins
27 %define lib_dir /opt/bacula/lib
30 %define _sbindir %_prefix/sbin
31 %define _bindir %_prefix/bin
32 %define _subsysdir /var/lock/subsys
33 %define _mandir %_prefix/share/man
34 %define sysconf_dir /etc/bacula
35 %define script_dir %_libdir/bacula
36 %define working_dir /var/lib/bacula
37 %define pid_dir /var/run
38 %define plugin_dir %_libdir/bacula/plugins
39 %define lib_dir %_libdir/bacula/lib
42 # Daemon user:group Don't change them unless you know what you are doing
43 %define director_daemon_user bacula
44 %define storage_daemon_user bacula
45 %define file_daemon_user root
46 %define daemon_group bacula
47 # group that has write access to tape devices, usually disk on Linux
48 %define storage_daemon_group disk
51 # probems with mandriva build:
52 # nothing provides libbonobo2_0-devel, nothing provides libbonoboui2_0-devel
54 # set Macros by opensuse_bs, see http://en.opensuse.org/Build_Service/cross_distribution_package_how_to
55 #openSUSE 11.1 %if 0%{?suse_version} == 1110
56 #openSUSE 11.0 %if 0%{?suse_version} == 1100
57 #openSUSE 10.3 %if 0%{?suse_version} == 1030
58 #openSUSE 10.2 %if 0%{?suse_version} == 1020
59 #SUSE Linux 10.1 %if 0%{?suse_version} == 1010
60 #SUSE Linux 10.0 %if 0%{?suse_version} == 1000
61 #SUSE Linux 9.3 %if 0%{?suse_version} == 930
62 #SLES 9 %if 0%{?sles_version} == 9 also set: %if 0%{?suse_version} == 910
63 #SLE 10 %if 0%{?sles_version} == 10 also set: %if 0%{?suse_version} == 1010
64 #SLE 11 %if 0%{?sles_version} == 11 also set: %if 0%{?suse_version} == 1110
65 #CentOS 5 %if 0%{?centos_version} == 501
66 #RHEL 4 %if 0%{?rhel_version} == 406
67 #RHEL 5 %if 0%{?rhel_version} == 501
68 #Fedora 6 with Extras %if 0%{?fedora_version} == 6
69 #Fedora 7 with Extras %if 0%{?fedora_version} == 7
70 #Fedora 8 with Extras %if 0%{?fedora_version} == 8
71 #Fedora 9 with Extras %if 0%{?fedora_version} == 9
72 #Fedora 10 with Extras %if 0%{?fedora_version} == 10
73 #Mandriva 2006 %if 0%{?mandriva_version} == 2006
74 #Mandriva 2007 %if 0%{?mandriva_version} == 2007
75 #Mandriva 2008 %if 0%{?mandriva_version} == 2008
79 # am I running in opensuse build service?
80 # TODO: seems to make problems
82 # choose database backend here
83 # postgres, mysql, sqlite
86 # Build Service: Determine Distribution
89 %define build_x86_64 1
93 %if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
94 BuildRequires: GConf2-devel
95 BuildRequires: freetype-devel
96 BuildRequires: libtermcap-devel
97 BuildRequires: shadow-utils
101 %if 0%{?mandriva_version} == 2007
103 %define _dist "Mandriva 2007"
106 %if 0%{?fedora_version} == 8
108 %define _dist "Fedora Core 8"
109 BuildRequires: redhat-release
112 %if 0%{?fedora_version} == 9
114 %define _dist "Fedora Core 9"
115 BuildRequires: redhat-release
119 %if 0%{?fedora_version} == 10
121 %define _dist "Fedora Core 10"
122 BuildRequires: PolicyKit-gnome
123 BuildRequires: fedora-release
126 %if 0%{?fedora_version} == 11
128 %define _dist "Fedora Core 11"
129 BuildRequires: PolicyKit-gnome
130 BuildRequires: fedora-release
133 %if 0%{?rhel_version} == 501
134 %define build_rhel5 1
135 %define _dist "Red Hat Enterprise Linux Server release 5"
136 BuildRequires: redhat-release
139 %if 0%{?rhel_version} == 406
140 %define build_rhel4 1
141 %define _dist "Red Hat Enterprise Linux Server release 4"
142 BuildRequires: redhat-release
146 %if 0%{?centos_version} == 501
147 %define build_centos5 1
148 %define _dist "CentOS 5"
149 BuildRequires: redhat-release
153 %if 0%{?suse_version} == 1020
154 %define build_su102 1
155 %define _dist "OpenSUSE 10.2"
156 BuildRequires: suse-release
160 %if 0%{?suse_version} == 1030
161 %define build_su103 1
162 %define _dist "OpenSUSE 10.3"
163 BuildRequires: suse-release
166 %if 0%{?suse_version} == 1100
167 %define build_su110 1
168 %define _dist "SUSE 11"
169 BuildRequires: suse-release
173 %if 0%{?suse_version} == 1110
174 %define build_su111 1
175 %define _dist "SUSE 11"
179 %if 0%{?sles_version} == 9
181 %define _dist "SLES 9"
185 %if 0%{?sles_version} == 10
187 %define _dist "SLE 10"
191 %if 0%{?sles_version} == 11
192 %define build_su111 1
193 %define _dist "SLES 11"
200 # any patches for this release
201 # be sure to check the setup section for patch macros
203 #--------------------------------------------------------------------------
204 # it should not be necessary to change anything below here for a release
205 # except for patch macros in the setup section
206 #--------------------------------------------------------------------------
208 %{?contrib_packager:%define _packager %{contrib_packager}}
210 Summary: Bacula - The Network Backup Solution
214 Group: System Environment/Daemons
216 BuildRoot: %{_tmppath}/%{name}-root
217 URL: http://www.bacula.org/
218 Vendor: The Bacula Team
219 Packager: %{_packager}
222 Source0: http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
223 # opensuse build service changes the release itself
225 Source1: Release_Notes-%{version}-1.tar.gz
227 Source1: Release_Notes-%{version}-%{release}.tar.gz
229 Source2: bacula-2.2.7-postgresql.patch
231 # define the basic package description
232 %define blurb Bacula - It comes by night and sucks the vital essence from your computers.
233 %define blurb2 Bacula is a set of computer programs that permit you (or the system
234 %define blurb3 administrator) to manage backup, recovery, and verification of computer
235 %define blurb4 data across a network of computers of different kinds. In technical terms,
236 %define blurb5 it is a network client/server based backup program. Bacula is relatively
237 %define blurb6 easy to use and efficient, while offering many advanced storage management
238 %define blurb7 features that make it easy to find and recover lost or damaged files.
239 %define blurb8 Bacula source code has been released under the GPL version 2 license.
241 %define user_file /etc/passwd
242 %define group_file /etc/group
245 %define useradd /usr/sbin/useradd
246 %define groupadd /usr/sbin/groupadd
247 %define usermod /usr/sbin/usermod
249 # platform defines - set one below or define the build_xxx on the command line
252 %{?build_rh7:%define rh7 1}
254 %{?build_rh8:%define rh8 1}
256 %{?build_rh9:%define rh9 1}
259 %{?build_fc1:%define fc1 1}
261 %{?build_fc3:%define fc3 1}
263 %{?build_fc4:%define fc4 1}
265 %{?build_fc5:%define fc5 1}
267 %{?build_fc6:%define fc6 1}
269 %{?build_fc7:%define fc7 1}
271 %{?build_fc8:%define fc8 1}
273 %{?build_fc9:%define fc9 1}
274 # Whitebox Enterprise build
276 %{?build_wb3:%define wb3 1}
277 # RedHat Enterprise builds
279 %{?build_rhel3:%define rhel3 1}
280 %{?build_rhel3:%define wb3 1}
282 %{?build_rhel4:%define rhel4 1}
283 %{?build_rhel4:%define fc3 1}
285 %{?build_rhel5:%define rhel5 1}
286 %{?build_rhel5:%define fc6 1}
289 %{?build_centos3:%define centos3 1}
290 %{?build_centos3:%define wb3 1}
292 %{?build_centos4:%define centos4 1}
293 %{?build_centos4:%define fc3 1}
295 %{?build_centos5:%define centos5 1}
296 %{?build_centos5:%define fc6 1}
299 %{?build_sl3:%define sl3 1}
300 %{?build_sl3:%define wb3 1}
302 %{?build_sl4:%define sl4 1}
303 %{?build_sl4:%define fc3 1}
305 %{?build_sl5:%define sl5 1}
306 %{?build_sl5:%define fc6 1}
309 %{?build_su9:%define su9 1}
311 %{?build_su10:%define su10 1}
313 %{?build_su102:%define su102 1}
315 %{?build_su103:%define su103 1}
317 %{?build_su110:%define su110 1}
319 %{?build_su111:%define su111 1}
322 %{?build_mdk:%define mdk 1}
324 %{?build_mdv:%define mdv 1}
325 %{?build_mdv:%define mdk 1}
328 %define client_only 0
329 %{?build_client_only:%define client_only 1}
331 # Setup some short cuts
333 %if %{rh7} || %{rh8} || %{rh9}
337 %if %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{fc6} || %{fc7} || %{fc8} || %{fc9}
341 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110} || %{su111}
345 %if %{rhel3} || %{rhel4} || %{rhel5} || %{centos3} || %{centos4} || %{centos5}
349 %if %{sl3} || %{sl4} || %{sl5}
354 # test for a platform definition
355 %if !%{rhat} && !%{rhel} && !%{fed} && !%{wb3} && !%{suse} && !%{mdk}
356 %{error: You must specify a platform. Please examine the spec file.}
361 # set for database support desired or define the build_xxx on the command line
363 %{?build_mysql:%define mysql 1}
364 # if using mysql 4.x define this and mysql above
365 # currently: Mandrake 10.1, SuSE 9.x & 10.0, RHEL4 and Fedora Core 4
367 %{?build_mysql4:%define mysql4 1}
368 %{?build_mysql4:%define mysql 1}
369 # if using mysql 5.x define this and mysql above
370 # currently: SuSE 10.1 and Fedora Core 5
372 %{?build_mysql5:%define mysql5 1}
373 %{?build_mysql5:%define mysql 1}
375 %{?build_sqlite:%define sqlite 1}
377 %{?build_postgresql:%define postgresql 1}
379 # test for a database definition
380 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql} && ! %{client_only}
381 %{error: You must specify database support. Please examine the spec file.}
386 %define db_backend mysql
389 %define db_backend sqlite3
392 %define db_backend postgresql
397 %{?build_x86_64:%define x86_64 1}
399 # check what distribution we are
400 %if %{rhat} || %{rhel}
401 %define _dist %(grep Red /etc/redhat-release)
403 %if %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{fc7} || %{fc8} || %{fc9}
404 %define _dist %(grep Fedora /etc/redhat-release)
406 %if %{centos5} || %{centos4} || %{centos3}
407 %define _dist %(grep CentOS /etc/redhat-release)
409 %if %{sl5} ||%{sl4} || %{sl3}
410 %define _dist %(grep 'Scientific Linux' /etc/redhat-release)
412 %if %{wb3} && ! %{rhel3} && ! %{centos3} && ! %{sl3}
413 %define _dist %(grep White /etc/whitebox-release)
416 %define _dist %(grep -i SuSE /etc/SuSE-release)
419 %define _dist %(grep Mand /etc/mandrake-release)
421 %{?DISTNAME:%define _dist %{DISTNAME}}
423 # only set Disribution if not in opensuse build service, as it sets it itself
424 %if ! 0%{?opensuse_bs}
425 %{?DISTNAME:%define _dist %{DISTNAME}}
426 Distribution: %{_dist}
429 %if 0%{?opensuse_bs} && %{mysql} && %{suse}
430 # needed in opensuse_bs, as rpm is installed during build process
431 BuildRequires: libmysqlclient-devel
432 BuildRequires: mysql-client
435 %if 0%{?opensuse_bs} && %{suse} && %{postgresql}
436 BuildRequires: postgresql
437 BuildRequires: postgresql-server
439 BuildRequires: openssl
441 %if 0%{?opensuse_bs} && %{suse}
442 BuildRequires: pwdutils
443 BuildRequires: sysconfig
446 # should we turn on python support
448 %{?build_python:%define python 1}
450 # specifically disallow build of mtx package if desired
452 %{?nobuild_mtx:%define mtx 0}
454 # do we need to patch for old postgresql version?
456 %{?build_old_pgsql:%define old_pgsql 1}
458 # Mandriva somehow forces the manpage file extension to bz2 rather than gz
460 %define manpage_ext bz2
462 %define manpage_ext gz
465 # for client only build
474 BuildRequires: gcc, gcc-c++, make, autoconf
475 BuildRequires: glibc, glibc-devel
476 BuildRequires: ncurses-devel, perl
477 BuildRequires: libstdc++-devel, zlib-devel
478 BuildRequires: openssl-devel
479 BuildRequires: libacl-devel
480 BuildRequires: pkgconfig
482 BuildRequires: libxml2-devel
485 BuildRequires: python, python-devel
486 %{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
490 BuildRequires: libtermcap-devel
491 BuildRequires: libxml-devel
494 BuildRequires: termcap
497 BuildRequires: libtermcap-devel
498 BuildRequires: libstdc++-static-devel
499 BuildRequires: glibc-static-devel
501 %if %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{fc7} || %{fc8} || %{fc9}
502 BuildRequires: libtermcap-devel
504 %if !%{rh7} && !%{su9} && !%{su10} && !%{su102} && !%{su103} && !%{su110} && !%{su111} && !%{mdk} && !%{fc3} && !%{fc4} && !%{fc5} && !%{fc6} && !%{fc7} && !%{fc8} && !%{fc9}
505 #BuildRequires: libtermcap-devel
508 %if %{sqlite} && %{su10}
509 BuildRequires: sqlite2-devel
511 %if %{sqlite} && ! %{su10}
512 BuildRequires: sqlite-devel
516 BuildRequires: mysql-devel
519 %if %{postgresql} && %{wb3}
520 BuildRequires: rh-postgresql-devel >= 7
523 %if %{postgresql} && ! %{wb3}
524 BuildRequires: postgresql-devel >= 7
548 Summary: Bacula - The Network Backup Solution
549 Group: System Environment/Daemons
550 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
551 Conflicts: bacula-client
553 Requires: ncurses, libstdc++, zlib, openssl
556 %if %{rhel} || %{rhat} || %{fed}
567 %if %{suse} || %{mdk}
568 Requires: mysql-client
570 Requires: mysql-server
574 %if %{postgresql} && %{wb3}
575 Requires: rh-postgresql >= 7
576 Requires: rh-postgresql-server >= 7
578 %if %{postgresql} && ! %{wb3}
579 Requires: postgresql >= 7
580 Requires: postgresql-server >= 7
593 %description postgresql
597 Requires: python >= %{pyver}
611 This build requires MySQL to be installed separately as the catalog database.
614 This build requires PostgreSQL to be installed separately as the catalog database.
617 This build incorporates sqlite3 as the catalog database, statically compiled.
620 This build includes python scripting support.
624 Summary: Bacula - The Network Backup Solution
625 Group: System Environment/Daemons
627 Conflicts: bacula-mysql
628 Conflicts: bacula-sqlite
629 Conflicts: bacula-postgresql
635 Requires: libstdc++, zlib, openssl
645 Requires: python >= %{pyver}
659 This is the File daemon (Client) only package. It includes the command line
662 This build includes python scripting support.
668 Summary: Bacula - The Network Backup Solution
669 Group: System Environment/Daemons
671 %description updatedb
682 This package installs scripts for updating older versions of the bacula
688 Summary: Bacula - The Network Backup Solution
689 Group: System Environment/Daemons
702 This package installs the Bacula pdf and html documentation.
704 # Must explicitly enable debug pkg on SuSE
705 # but not in opensuse_bs
706 %if ! 0%{?opensuse_bs}
709 export LDFLAGS="${LDFLAGS} -L/usr/lib/termcap"
720 %if %{wb3} || %{old_pgsql}
721 patch -p3 src/cats/postgresql.c < %SOURCE5
724 # patches for the bundled sqlite scripts
726 # patch the make_sqlite_tables script for installation bindir
727 #patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
728 #patch src/cats/make_sqlite3_tables.in src/cats/make_sqlite3_tables.in.patch
730 # patch the create_sqlite_database script for installation bindir
731 #patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
732 #patch src/cats/create_sqlite3_database.in src/cats/create_sqlite3_database.in.patch
734 # patch the make_catalog_backup script for installation bindir
735 #patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
737 # patch the update_sqlite_tables script for installation bindir
738 #patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
739 #patch src/cats/update_sqlite3_tables.in src/cats/update_sqlite3_tables.in.patch
741 # patch the bacula-dir init script to remove sqlite service
742 %if %{sqlite} && %{su9}
743 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
745 %if %{sqlite} && %{su10}
746 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
748 %if %{sqlite} && %{su102}
749 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
751 %if %{sqlite} && %{su103}
752 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
754 %if %{sqlite} && %{su110}
755 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
757 %if %{sqlite} && %{su111}
758 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
761 # 64 bit lib location hacks
762 # as of 1.39.18 it should not be necessary to enable x86_64 as configure is
763 # reported to be fixed to properly detect lib locations.
765 export LDFLAGS="${LDFLAGS} -L/usr/lib64"
767 %if %{mysql} && %{x86_64}
768 export LDFLAGS="${LDFLAGS} -L/usr/lib64/mysql"
770 %if %{python} && %{x86_64}
771 export LDFLAGS="${LDFLAGS} -L/usr/lib64/python%{pyver}"
774 # Red Hat's 64 bit installation of QT4 appears to be broken so:
776 %if %{rhel5} || %{centos5} || %{sl5}
780 # Main Bacula configuration
782 --prefix=%{_prefix} \
783 --sbindir=%{_sbindir} \
784 --sysconfdir=%{sysconf_dir} \
785 --mandir=%{_mandir} \
786 --with-scriptdir=%{script_dir} \
787 --with-working-dir=%{working_dir} \
788 --with-plugindir=%{script_dir} \
789 --with-pid-dir=%{pid_dir} \
790 --with-subsys-dir=%{_subsysdir} \
791 --enable-smartalloc \
793 --disable-bwx-console \
794 --disable-tray-monitor \
799 %if %{su9} || %{su10}
814 --enable-client-only \
816 %if %{rh7} || %{rh8} || %{rh9} || %{fc1} || %{fc3} || %{wb3}
817 --disable-batch-insert \
819 --with-dir-user=%{director_daemon_user} \
820 --with-dir-group=%{daemon_group} \
821 --with-sd-user=%{storage_daemon_user} \
822 --with-sd-group=%{storage_daemon_group} \
823 --with-fd-user=%{file_daemon_user} \
824 --with-fd-group=%{daemon_group} \
825 --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
826 --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
827 --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
828 --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
829 --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
830 --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
838 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
839 mkdir -p $RPM_BUILD_ROOT/etc/init.d
840 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
841 mkdir -p $RPM_BUILD_ROOT/etc/logwatch/conf/logfiles
842 mkdir -p $RPM_BUILD_ROOT/etc/logwatch/conf/services
843 mkdir -p $RPM_BUILD_ROOT/etc/logwatch/scripts/services
844 mkdir -p $RPM_BUILD_ROOT%{script_dir}/updatedb
846 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
847 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
848 #mkdir -p $RPM_BUILD_ROOT%{_bindir}
850 make DESTDIR=$RPM_BUILD_ROOT install
853 # Program docs not installed on client
854 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-dir.8.%{manpage_ext}
855 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-sd.8.%{manpage_ext}
856 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bcopy.8.%{manpage_ext}
857 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bextract.8.%{manpage_ext}
858 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bls.8.%{manpage_ext}
859 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bscan.8.%{manpage_ext}
860 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/btape.8.%{manpage_ext}
861 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/dbcheck.8.%{manpage_ext}
862 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bsmtp.1.%{manpage_ext}
864 # Docs for programs that are depreciated
865 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
866 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
867 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
868 rm -f $RPM_BUILD_ROOT%{script_dir}/gconsole
870 # fixme - make installs the mysql scripts for sqlite build
872 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
873 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
874 rm -f $RPM_BUILD_ROOT%{script_dir}/grant_mysql_privileges
877 # fixme - make installs the mysql scripts for postgresql build
879 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
880 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
883 # install the init scripts
885 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
886 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
887 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
890 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
891 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
892 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
894 %if ! %{suse} && ! %{mdk}
895 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
896 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
897 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
899 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
901 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-dir
902 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-sd
905 # install the logrotate file
906 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
908 # install the updatedb scripts
909 cp -p updatedb/* $RPM_BUILD_ROOT%{script_dir}/updatedb/
911 # install the logwatch scripts
913 cp -p scripts/logwatch/bacula $RPM_BUILD_ROOT/etc/logwatch/scripts/services/bacula
914 cp -p scripts/logwatch/logfile.bacula.conf $RPM_BUILD_ROOT/etc/logwatch/conf/logfiles/bacula.conf
915 cp -p scripts/logwatch/services.bacula.conf $RPM_BUILD_ROOT/etc/logwatch/conf/services/bacula.conf
916 chmod 755 $RPM_BUILD_ROOT/etc/logwatch/scripts/services/bacula
917 chmod 644 $RPM_BUILD_ROOT/etc/logwatch/conf/logfiles/bacula.conf
918 chmod 644 $RPM_BUILD_ROOT/etc/logwatch/conf/services/bacula.conf
921 # now clean up permissions that are left broken by the install
922 chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
924 # fix me - building enable-client-only installs files not included in bacula-client package
926 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula
927 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-dir
928 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-sd
929 rm -f $RPM_BUILD_ROOT%{script_dir}/disk-changer
930 rm -f $RPM_BUILD_ROOT%{script_dir}/dvd-handler
931 rm -f $RPM_BUILD_ROOT%{script_dir}/mtx-changer
932 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
933 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
934 rm -rf $RPM_BUILD_ROOT%{script_dir}/updatedb
935 rm -f $RPM_BUILD_ROOT%{script_dir}/bconsole
936 rm -f $RPM_BUILD_ROOT%{script_dir}/bpipe-fd.so
937 rm -f $RPM_BUILD_ROOT%{script_dir}/mtx-changer.conf
938 rm -f $RPM_BUILD_ROOT%{_sbindir}/bacula
942 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
944 rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-1.txt
946 rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
951 # MySQL specific files
953 %defattr(-, root, root)
954 %attr(-, root, %{daemon_group}) %{script_dir}/create_mysql_database
955 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_database
956 %attr(-, root, %{daemon_group}) %{script_dir}/make_mysql_tables
957 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_tables
958 %attr(-, root, %{daemon_group}) %{script_dir}/update_mysql_tables
959 %attr(-, root, %{daemon_group}) %{script_dir}/grant_mysql_privileges
960 %attr(-, root, %{daemon_group}) %{script_dir}/startmysql
961 %attr(-, root, %{daemon_group}) %{script_dir}/stopmysql
965 %if %{su9} || %{su10}
966 # use sqlite2 on SLE_10 and SLES9
968 %defattr(-,root,root)
969 %attr(-, root, %{daemon_group}) %{script_dir}/create_sqlite_database
970 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite_database
971 %attr(-, root, %{daemon_group}) %{script_dir}/grant_sqlite_privileges
972 %attr(-, root, %{daemon_group}) %{script_dir}/make_sqlite_tables
973 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite_tables
974 %attr(-, root, %{daemon_group}) %{script_dir}/update_sqlite_tables
977 %defattr(-,root,root)
978 %attr(-, root, %{daemon_group}) %{script_dir}/create_sqlite3_database
979 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite3_database
980 %attr(-, root, %{daemon_group}) %{script_dir}/grant_sqlite3_privileges
981 %attr(-, root, %{daemon_group}) %{script_dir}/make_sqlite3_tables
982 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite3_tables
983 %attr(-, root, %{daemon_group}) %{script_dir}/update_sqlite3_tables
991 %defattr(-,root,root)
992 %attr(-, root, %{daemon_group}) %{script_dir}/create_postgresql_database
993 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_database
994 %attr(-, root, %{daemon_group}) %{script_dir}/make_postgresql_tables
995 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_tables
996 %attr(-, root, %{daemon_group}) %{script_dir}/update_postgresql_tables
997 %attr(-, root, %{daemon_group}) %{script_dir}/grant_postgresql_privileges
998 # The rest is DB backend independent
1000 # opensuse_bs: directories not owned by any package
1003 %if ! %{client_only}
1004 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1005 %attr(-, root, %{daemon_group}) %{script_dir}/bacula
1006 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1007 %attr(-, root, %{daemon_group}) %{script_dir}/create_bacula_database
1008 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_database
1009 %attr(-, root, %{daemon_group}) %{script_dir}/grant_bacula_privileges
1010 %attr(-, root, %{daemon_group}) %{script_dir}/make_bacula_tables
1011 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_tables
1012 %attr(-, root, %{daemon_group}) %{script_dir}/update_bacula_tables
1013 %attr(-, root, %{daemon_group}) %{script_dir}/make_catalog_backup
1014 %attr(-, root, %{daemon_group}) %{script_dir}/delete_catalog_backup
1015 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1016 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1017 %attr(-, root, %{daemon_group}) %{script_dir}/disk-changer
1018 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-dir
1019 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
1020 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-sd
1021 %attr(-, root, %{daemon_group}) %{script_dir}/bpipe-fd.so
1022 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
1023 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
1024 %attr(-, root, %{storage_daemon_group}) %{script_dir}/dvd-handler
1025 %attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
1026 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
1027 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer.conf
1029 /etc/logrotate.d/bacula
1030 /etc/logwatch/scripts/services/bacula
1031 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-dir.conf
1032 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1033 %attr(-, root, %{storage_daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-sd.conf
1034 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1035 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/logwatch/conf/logfiles/bacula.conf
1036 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/logwatch/conf/services/bacula.conf
1037 %attr(-, root, %{daemon_group}) %config(noreplace) %{script_dir}/query.sql
1039 %attr(-, %{storage_daemon_user}, %{daemon_group}) %dir %{working_dir}
1041 %{_sbindir}/bacula-dir
1042 %{_sbindir}/bacula-fd
1043 %{_sbindir}/bacula-sd
1046 %{_sbindir}/bextract
1050 %{_sbindir}/btraceback
1051 %{_sbindir}/bconsole
1056 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1057 %{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1058 %{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1059 %{_mandir}/man8/bacula.8.%{manpage_ext}
1060 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1061 %{_mandir}/man8/bcopy.8.%{manpage_ext}
1062 %{_mandir}/man8/bextract.8.%{manpage_ext}
1063 %{_mandir}/man8/bls.8.%{manpage_ext}
1064 %{_mandir}/man8/bscan.8.%{manpage_ext}
1065 %{_mandir}/man8/btape.8.%{manpage_ext}
1066 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1067 %{_mandir}/man8/dbcheck.8.%{manpage_ext}
1068 %{_mandir}/man1/bsmtp.1.%{manpage_ext}
1069 %{_mandir}/man1/bat.1.%{manpage_ext}
1076 # test for bacula database older than version 10
1077 # note: this ASSUMES no password has been set for bacula database
1078 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1083 # test for bacula database older than version 10 and sqlite3
1084 if [ -s %{working_dir}/bacula.db ]; then
1085 DB_VER=`echo "select * from Version;" | sqlite3 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1091 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1094 %if ! %{client_only}
1095 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "10" ]; then
1096 echo "This bacula upgrade will update a bacula database from version 10 to 11."
1097 echo "You appear to be running database version $DB_VER. You must first update"
1098 echo "your database to version 10 and then install this upgrade. The alternative"
1099 echo "is to use %{script_dir}/drop_%{db_backend}_tables to delete all your your current"
1100 echo "catalog information, then do the upgrade. Information on updating a"
1101 echo "database older than version 10 can be found in the release notes."
1107 %if ! %{client_only}
1108 # check for and copy %{sysconf_dir}/console.conf to bconsole.conf
1109 if [ -s %{sysconf_dir}/console.conf ];then
1110 cp -p %{sysconf_dir}/console.conf %{sysconf_dir}/bconsole.conf
1113 # create the daemon users and groups
1114 # first create the groups if they don't exist
1115 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1116 if [ -z "$HAVE_BACULA" ]; then
1117 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1118 echo "The group %{daemon_group} has been added to %{group_file}."
1119 echo "See the manual chapter \"Running Bacula\" for details."
1121 HAVE_BACULA=`grep %{storage_daemon_group} %{group_file} 2>/dev/null`
1122 if [ -z "$HAVE_BACULA" ]; then
1123 %{groupadd} -r %{storage_daemon_group} > /dev/null 2>&1
1124 echo "The group %{storage_daemon_group} has been added to %{group_file}."
1125 echo "See the manual chapter \"Running Bacula\" for details."
1127 # now create the users if they do not exist
1128 # we do not use the -g option allowing the primary group to be set to system default
1129 # this will be a unique group on redhat type systems or the group users on some systems
1130 HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
1131 if [ -z "$HAVE_BACULA" ]; then
1132 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{storage_daemon_group} -M -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
1133 echo "The user %{storage_daemon_user} has been added to %{user_file}."
1134 echo "See the manual chapter \"Running Bacula\" for details."
1136 HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
1137 if [ -z "$HAVE_BACULA" ]; then
1138 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
1139 echo "The user %{director_daemon_user} has been added to %{user_file}."
1140 echo "See the manual chapter \"Running Bacula\" for details."
1142 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1143 if [ -z "$HAVE_BACULA" ]; then
1144 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1145 echo "The user %{file_daemon_user} has been added to %{user_file}."
1146 echo "See the manual chapter \"Running Bacula\" for details."
1148 # now we add the supplementary groups, this is ok to call even if the users already exist
1149 # we only do this if the user is NOT root
1150 IS_ROOT=%{director_daemon_user}
1151 if [ "$IS_ROOT" != "root" ]; then
1152 %{usermod} -G %{daemon_group} %{director_daemon_user}
1154 IS_ROOT=%{storage_daemon_user}
1155 if [ "$IS_ROOT" != "root" ]; then
1156 %{usermod} -G %{daemon_group},%{storage_daemon_group} %{storage_daemon_user}
1158 IS_ROOT=%{file_daemon_user}
1159 if [ "$IS_ROOT" != "root" ]; then
1160 %{usermod} -G %{daemon_group} %{file_daemon_user}
1173 %if ! %{client_only}
1175 if [ "$1" -ge 1 ] ; then
1176 %if %{suse} && %{mysql}
1177 /sbin/chkconfig --add mysql
1179 %if %{suse} && %{postgresql}
1180 /sbin/chkconfig --add postgresql
1182 /sbin/chkconfig --add bacula-dir
1183 /sbin/chkconfig --add bacula-fd
1184 /sbin/chkconfig --add bacula-sd
1190 #check, if mysql can be called successfully at all
1191 if mysql 2>/dev/null bacula -e 'select * from Version;' ; then
1193 # test for an existing database
1194 # note: this ASSUMES no password has been set for bacula database
1195 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1197 # grant privileges and create tables if they do not exist
1198 if [ -z "$DB_VER" ]; then
1199 echo "Hmm, it doesn't look like you have an existing database."
1200 echo "Granting privileges for MySQL user bacula..."
1201 %{script_dir}/grant_mysql_privileges
1202 echo "Creating MySQL bacula database..."
1203 %{script_dir}/create_mysql_database
1204 echo "Creating bacula tables..."
1205 %{script_dir}/make_mysql_tables
1207 # check to see if we need to upgrade a 2.x database
1208 elif [ "$DB_VER" -lt "11" ]; then
1209 echo "This release requires an upgrade to your bacula database."
1210 echo "Backing up your current database..."
1211 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1212 echo "Upgrading bacula database ..."
1213 %{script_dir}/update_mysql_tables
1214 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1221 # test for an existing database
1222 if [ -s %{working_dir}/bacula.db ]; then
1223 DB_VER=`echo "select * from Version;" | sqlite3 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1224 # check to see if we need to upgrade a 2.x database
1225 if [ "$DB_VER" -lt "11" ] && [ "$DB_VER" -ge "10" ]; then
1226 echo "This release requires an upgrade to your bacula database."
1227 echo "Backing up your current database..."
1228 echo ".dump" | sqlite3 %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1229 echo "Upgrading bacula database ..."
1230 %{script_dir}/update_sqlite3_tables
1231 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1234 # create the database and tables
1235 echo "Hmm, it doesn't look like you have an existing database."
1236 echo "Creating SQLite database..."
1237 %{script_dir}/create_sqlite3_database
1238 echo "Creating the SQLite tables..."
1239 %{script_dir}/make_sqlite3_tables
1240 chown %{director_daemon_user}.%{daemon_group} %{working_dir}/bacula.db
1245 # check if psql can be called successfully at all
1246 if echo 'select * from Version;' | psql bacula 2>/dev/null; then
1248 # test for an existing database
1249 # note: this ASSUMES no password has been set for bacula database
1250 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1252 # grant privileges and create tables if they do not exist
1253 if [ -z "$DB_VER" ]; then
1254 echo "Hmm, doesn't look like you have an existing database."
1255 echo "Creating PostgreSQL bacula database..."
1256 %{script_dir}/create_postgresql_database
1257 echo "Creating bacula tables..."
1258 %{script_dir}/make_postgresql_tables
1259 echo "Granting privileges for PostgreSQL user bacula..."
1260 %{script_dir}/grant_postgresql_privileges
1262 # check to see if we need to upgrade a 2.x database
1263 elif [ "$DB_VER" -lt "11" ]; then
1264 echo "This release requires an upgrade to your bacula database."
1265 echo "Backing up your current database..."
1266 pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1267 echo "Upgrading bacula database ..."
1268 %{script_dir}/update_postgresql_tables
1269 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1275 %if ! %{client_only}
1276 if [ -d %{sysconf_dir} ]; then
1278 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
1279 pass=`openssl rand -base64 33`
1280 for file in *.conf; do
1281 sed "s@${string}@${pass}@g" $file > $file.new
1282 cp -f $file.new $file; rm -f $file.new
1285 # put actual hostname in conf file
1287 string="XXX_HOSTNAME_XXX"
1288 for file in *.conf; do
1289 sed "s@${string}@${host}@g" $file >$file.new
1290 cp -f $file.new $file; rm -f $file.new
1295 exit 0 # always exit successfull, as otherwise opensuse build service complains
1307 %if ! %{client_only}
1310 /sbin/chkconfig --del bacula-dir
1311 /sbin/chkconfig --del bacula-fd
1312 /sbin/chkconfig --del bacula-sd
1317 # added: run ldconfig in postun
1330 %defattr(-,root,root)
1331 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1332 %{script_dir}/bacula-ctl-fd
1333 /etc/init.d/bacula-fd
1335 /etc/logrotate.d/bacula
1337 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1338 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1339 %attr(-, root, %{daemon_group}) %dir %{working_dir}
1341 %{_sbindir}/bacula-fd
1342 %{_sbindir}/btraceback
1343 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1344 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1345 %{_sbindir}/bconsole
1346 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1347 %{_mandir}/man8/bacula.8.%{manpage_ext}
1348 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1349 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1350 %{_mandir}/man1/bat.1.%{manpage_ext}
1352 %{_libdir}/libbaccfg.*
1353 %{_libdir}/libbacfind.*
1354 %{_libdir}/libbacpy.*
1356 #opensuse_bs: directories not owned by any package
1360 # create the daemon group and user
1361 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1362 if [ -z "$HAVE_BACULA" ]; then
1363 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1364 echo "The group %{daemon_group} has been added to %{group_file}."
1365 echo "See the manual chapter \"Running Bacula\" for details."
1367 # we do not use the -g option allowing the primary group to be set to system default
1368 # this will be a unique group on redhat type systems or the group users on some systems
1369 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1370 if [ -z "$HAVE_BACULA" ]; then
1371 %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1372 echo "The user %{file_daemon_user} has been added to %{user_file}."
1373 echo "See the manual chapter \"Running Bacula\" for details."
1375 # now we add the supplementary group, this is ok to call even if the user already exists
1376 # we only do this if the user is NOT root
1377 IS_ROOT=%{file_daemon_user}
1378 if [ "$IS_ROOT" != "root" ]; then
1379 %{usermod} -G %{daemon_group} %{file_daemon_user}
1384 if [ "$1" -ge 1 ] ; then
1385 /sbin/chkconfig --add bacula-fd
1388 if [ -d %{sysconf_dir} ]; then
1390 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
1391 pass=`openssl rand -base64 33`
1392 for file in *.conf; do
1393 sed "s@${string}@${pass}@g" $file > $file.new
1394 cp -f $file.new $file; rm -f $file.new
1397 # put actual hostname in conf file
1399 string="XXX_HOSTNAME_XXX"
1400 for file in *.conf; do
1401 sed "s@${string}@${host}@g" $file >$file.new
1402 cp -f $file.new $file; rm -f $file.new
1411 /sbin/chkconfig --del bacula-fd
1417 %if ! %{client_only}
1419 %defattr(-,root,%{daemon_group})
1420 %{script_dir}/updatedb/*
1421 #oensuse_bs: directories not owned by any package
1422 %{script_dir}/updatedb
1425 # create the daemon group
1426 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1427 if [ -z "$HAVE_BACULA" ]; then
1428 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1429 echo "The group %{daemon_group} has been added to %{group_file}."
1430 echo "See the manual chapter \"Running Bacula\" for details."
1434 echo "The database update scripts were installed to %{script_dir}/updatedb"
1438 * Mon Aug 10 2009 Philipp Storz <philipp.storz@dass-it.de>
1439 - changes to work with opensuse build service
1440 * Sat Jun 20 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
1441 - Fix bat install which is now handled by make and uses shared libs
1442 * Sat May 16 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
1443 - fix libxml dependency for rh7 per Pasi Kärkkäinen <pasik@iki.fi>
1444 * Mon May 04 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
1445 - Fix post ldconfig problem in client only build
1446 * Sun May 03 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
1447 - remove more files installed by client-only build not needed by client package
1448 - remove libbacsql files from client package
1449 * Sat May 02 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
1451 - update for new docs configuration
1452 * Sat Apr 25 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
1453 - add switch to pass Distribution tag
1454 * Sun Apr 5 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
1456 - database update version 10 to 11
1457 - make now installs docs so we rm from buildroot
1458 - add shared libs in %_libdir and other misc new files
1459 * Wed Dec 31 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1461 * Sat Nov 08 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1462 - set paths for QT using pkgconfig
1463 * Sat Oct 11 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1464 - release 2.4.3 update depkgs to 11Sep08 remove file nmshack from mtx package
1465 * Sun Sep 07 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1466 - adjust /opt/bacula install
1467 - add build switch to supress rescue package
1468 * Sun Aug 24 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1469 - add support for install to /opt/bacula
1470 * Sun Aug 17 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1471 - remove libtermcap dependancy for FC9
1472 * Mon Aug 04 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1473 - fix bat dependencies
1474 * Sat Jun 28 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1476 * Sat May 24 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1478 * Sun Mar 30 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1479 - FHS compatibility changes
1480 * Sat Feb 16 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1481 - remove fix for false buffer overflow detection with glibc >= 2.7
1482 * Sat Feb 09 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
1483 - fix for false buffer overflow detection with glibc >= 2.7