1 # Platform Build Configuration
3 # basic defines for every build
4 %define depkgs ../depkgs
5 %define depkgs_version 08Mar04
6 %define tomsrtbt tomsrtbt-2.0.103
7 %define sqlite_bindir /usr/lib/sqlite
8 %define working_dir /var/bacula
9 %define daemon_user root
10 %define daemon_group bacula
11 %define group_file /etc/group
12 %define groupadd /usr/sbin/groupadd
14 # platform defines - set one below or define the build_xxx on the command line
17 %{?build_rh7:%define rh7 1}
19 %{?build_rh8:%define rh8 1}
21 %{?build_rh9:%define rh9 1}
24 %{?build_fc1:%define fc1 1}
25 # Whitebox Enterprise build
26 # this should also work for RHEL
28 %{?build_wb3:%define wb3 1}
30 # this is known to build on SuSE 8.2 and 9.0
32 %{?build_su9:%define su9 1}
35 %{?build_mdk:%define mdk 1}
37 # test for a platform definition
38 %if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{wb3} && ! %{su9} && ! %{mdk}
39 %{error: You must specify a platform. Please examine the spec file.}
44 # set for database support desired or define the build_xxx on the command line
46 %{?build_mysql:%define mysql 1}
48 %{?build_sqlite:%define sqlite 1}
50 %{?build_postgresql:%define postgresql 1}
52 # test for a database definition
53 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql}
54 %{error: You must specify database support. Please examine the spec file.}
58 Summary: Bacula - The Network Backup Solution
62 Group: System Environment/Daemons
64 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
65 Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
66 Source2:http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/%{tomsrtbt}.tar.gz
67 Source3: Release_Notes-%{version}-%{release}.tar.gz
68 BuildRoot: %{_tmppath}/%{name}-root
69 URL: http://www.bacula.org/
70 Vendor: The Bacula Team
71 Distribution: The Bacula Team
72 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
73 BuildRequires: readline-devel, atk-devel, ncurses-devel, pango-devel
74 BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel, pkgconfig
76 BuildRequires: libtermcap-devel
77 BuildRequires: gtk+-devel >= 1.2
78 BuildRequires: gnome-libs-devel >= 1.4
79 BuildRequires: glibc-devel >= 2.2
80 BuildRequires: ORBit-devel
81 BuildRequires: bonobo-devel
82 BuildRequires: GConf-devel
83 BuildRequires: freetype-devel
86 BuildRequires: termcap
87 BuildRequires: libgnome >= 2.0
88 BuildRequires: gtk2-devel >= 2.0
89 BuildRequires: libgnomeui-devel >= 2.0
90 BuildRequires: glibc-devel >= 2.3
91 BuildRequires: ORBit2-devel
92 BuildRequires: libart_lgpl-devel >= 2.0
93 BuildRequires: libbonobo-devel >= 2.0
94 BuildRequires: libbonoboui-devel >= 2.0
95 BuildRequires: bonobo-activation-devel
96 BuildRequires: gconf2-devel
97 BuildRequires: linc-devel
98 BuildRequires: freetype2-devel
101 BuildRequires: libtermcap-devel
102 BuildRequires: gtk2-devel >= 2.0
103 BuildRequires: libgnomeui2-devel >= 2.0
104 BuildRequires: glibc-devel >= 2.3
105 BuildRequires: libORBit2-devel
106 BuildRequires: libart_lgpl-devel >= 2.0
107 BuildRequires: libbonobo2_0-devel
108 BuildRequires: libbonoboui2_0-devel
109 BuildRequires: libbonobo-activation-devel
110 BuildRequires: libGConf2-devel
111 BuildRequires: libstdc++-static-devel
112 BuildRequires: glibc-static-devel
113 BuildRequires: freetype2-devel
115 %if ! %{rh7} && ! %{su9} && ! %{mdk}
116 BuildRequires: libtermcap-devel
117 BuildRequires: gtk2-devel >= 2.0
118 BuildRequires: libgnomeui-devel >= 2.0
119 BuildRequires: glibc-devel >= 2.3
120 BuildRequires: ORBit2-devel
121 BuildRequires: libart_lgpl-devel >= 2.0
122 BuildRequires: libbonobo-devel >= 2.0
123 BuildRequires: libbonoboui-devel >= 2.0
124 BuildRequires: bonobo-activation-devel
125 BuildRequires: GConf2-devel
126 BuildRequires: linc-devel
127 BuildRequires: freetype-devel
131 BuildRequires: mysql-devel >= 3.23
134 %if %{postgresql} && %{wb3}
135 BuildRequires: rh-postgresql-devel >= 7
138 %if %{postgresql} && ! %{wb3}
139 BuildRequires: postgresql-devel >= 7
143 Bacula - It comes by night and sucks the vital essence from your computers.
145 Bacula is a set of computer programs that permit you (or the system
146 administrator) to manage backup, recovery, and verification of computer
147 data across a network of computers of different kinds. In technical terms,
148 it is a network client/server based backup program. Bacula is relatively
149 easy to use and efficient, while offering many advanced storage management
150 features that make it easy to find and recover lost or damaged files.
151 Bacula source code has been released under the GPL version 2 license.
163 Summary: Bacula - The Network Backup Solution
164 Group: System Environment/Daemons
165 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
166 Conflicts: bacula-client
167 Requires: readline, ncurses, libstdc++, zlib
169 Conflicts: sqlite, sqlite-tools
172 Requires: glibc >= 2.2
176 Requires: glibc >= 2.3
179 %if ! %{rh7} && ! %{su9}
180 Requires: glibc >= 2.3
183 %if %{mysql} && ! %{su9} && ! %{mdk}
184 Requires: mysql >= 3.23
185 Requires: mysql-server >= 3.23
187 %if %{mysql} && %{su9}
188 Requires: mysql >= 3.23
189 Requires: mysql-client >= 3.23
191 %if %{mysql} && %{mdk}
192 Requires: mysql >= 3.23
193 Requires: mysql-client >= 3.23
195 %if %{postgresql} && %{wb3}
196 Requires: rh-postgresql >= 7
197 Requires: rh-postgresql-server >= 7
199 %if %{postgresql} && ! %{wb3}
200 Requires: postgresql >= 7
201 Requires: postgresql-server >= 7
211 %description postgresql
214 Bacula - It comes by night and sucks the vital essence from your computers.
216 Bacula is a set of computer programs that permit you (or the system
217 administrator) to manage backup, recovery, and verification of computer
218 data across a network of computers of different kinds. In technical terms,
219 it is a network client/server based backup program. Bacula is relatively
220 easy to use and efficient, while offering many advanced storage management
221 features that make it easy to find and recover lost or damaged files.
222 Bacula source code has been released under the GPL version 2 license.
225 This build requires MySQL to be installed separately as the catalog database.
228 This build requires PostgreSQL to be installed separately as the catalog database.
231 This build incorporates sqlite as the catalog database, statically compiled.
235 Summary: Bacula - The Network Backup Solution
236 Group: System Environment/Daemons
238 Requires: readline, libstdc++, zlib
241 Requires: glibc >= 2.2
245 Requires: glibc >= 2.3
248 %if ! %{rh7} && ! %{su9}
249 Requires: glibc >= 2.3
254 Bacula - It comes by night and sucks the vital essence from your computers.
256 Bacula is a set of computer programs that permit you (or the system
257 administrator) to manage backup, recovery, and verification of computer
258 data across a network of computers of different kinds. In technical terms,
259 it is a network client/server based backup program. Bacula is relatively
260 easy to use and efficient, while offering many advanced storage management
261 features that make it easy to find and recover lost or damaged files.
262 Bacula source code has been released under the GPL version 2 license.
264 This is the File daemon (Client) only package. It includes the command line
269 Summary: Bacula - The Network Backup Solution
270 Group: System Environment/Daemons
271 Requires: coreutils, util-linux, libc5, bacula-fd
274 Bacula - It comes by night and sucks the vital essence from your computers.
276 Bacula is a set of computer programs that permit you (or the system
277 administrator) to manage backup, recovery, and verification of computer
278 data across a network of computers of different kinds. In technical terms,
279 it is a network client/server based backup program. Bacula is relatively
280 easy to use and efficient, while offering many advanced storage management
281 features that make it easy to find and recover lost or damaged files.
282 Bacula source code has been released under the GPL version 2 license.
284 This package installs scripts for disaster recovery and builds rescue
285 floppy disks for bare metal recovery. This package includes tomsrtbt
286 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool
287 to build a boot floppy disk.
289 You need to have the bacula-sqlite, bacula-mysql, bacula-postgresql or
290 bacula-client package for your platform installed and configured before
291 installing this package.
293 To create a boot disk run "./getdiskinfo" from the /etc/bacula/rescue
294 directory (this is done when the package is first installed),
295 then run "./install.s" from the /etc/bacula/rescue/tomsrtbt/
296 directory. To make the bacula rescue disk run
297 "./make_rescue_disk --copy-static-bacula --copy-etc-files"
298 from the /etc/bacula/rescue directory. To recreate the rescue
299 information for this system run ./getdiskinfo again.
303 Summary: Bacula - The Network Backup Solution
304 Group: System Environment/Daemons
306 %description updatedb
307 Bacula - It comes by night and sucks the vital essence from your computers.
309 Bacula is a set of computer programs that permit you (or the system
310 administrator) to manage backup, recovery, and verification of computer
311 data across a network of computers of different kinds. In technical terms,
312 it is a network client/server based backup program. Bacula is relatively
313 easy to use and efficient, while offering many advanced storage management
314 features that make it easy to find and recover lost or damaged files.
315 Bacula source code has been released under the GPL version 2 license.
317 This package installs scripts for updating older versions of the bacula
321 Summary: Bacula - The Network Backup Solution
322 Group: System Environment/Daemons
323 Requires: readline, atk, libstdc++, zlib, pango, libxml2, bacula-fd
326 Requires: gtk+ >= 1.2
327 Requires: gnome-libs >= 1.4
328 Requires: glibc >= 2.2
335 Requires: gtk2 >= 2.0
336 Requires: libgnome >= 2.0
337 Requires: libgnomeui >= 2.0
338 Requires: glibc >= 2.3
340 Requires: libart_lgpl >= 2.0
341 Requires: libbonobo >= 2.0
342 Requires: libbonoboui >= 2.0
343 Requires: bonobo-activation
349 Requires: gtk2 >= 2.0
350 Requires: libgnomeui2
351 Requires: glibc >= 2.3
353 Requires: libart_lgpl >= 2.0
354 Requires: libbonobo >= 2.0
355 Requires: libbonoboui >= 2.0
359 %if ! %{rh7} && ! %{su9} && ! %{mdk}
360 Requires: gtk2 >= 2.0
361 Requires: libgnomeui >= 2.0
362 Requires: glibc >= 2.3
364 Requires: libart_lgpl >= 2.0
365 Requires: libbonobo >= 2.0
366 Requires: libbonoboui >= 2.0
367 Requires: bonobo-activation
378 %description gconsole
379 Bacula - It comes by night and sucks the vital essence from your computers.
381 Bacula is a set of computer programs that permit you (or the system
382 administrator) to manage backup, recovery, and verification of computer
383 data across a network of computers of different kinds. In technical terms,
384 it is a network client/server based backup program. Bacula is relatively
385 easy to use and efficient, while offering many advanced storage management
386 features that make it easy to find and recover lost or damaged files.
387 Bacula source code has been released under the GPL version 2 license.
389 This is the Gnome Console package. It is an add-on to the client or
402 export LDFLAGS="-L/usr/lib/termcap"
413 # patches for the bundled sqlite scripts
415 # patch the make_sqlite_tables script for installation bindir
416 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
418 # patch the create_sqlite_database script for installation bindir
419 patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
421 # patch the make_catalog_backup script for installation bindir
422 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
424 # patch the update_sqlite_tables script for installation bindir
425 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
427 # patch the bacula-dir init script to remove sqlite service
428 %if %{sqlite} && %{su9}
429 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
434 --sbindir=/usr/sbin \
435 --sysconfdir=/etc/bacula \
436 --with-scriptdir=/etc/bacula \
437 --enable-smartalloc \
440 %if ! %{rh7} && ! %{rh8}
441 --enable-tray-monitor \
447 --with-sqlite=${cwd}/%{depkgs}/sqlite \
452 --with-working-dir=%{working_dir} \
453 --with-pid-dir=/var/run \
454 --with-subsys-dir=/var/lock/subsys \
455 --with-dir-user=%{daemon_user} \
456 --with-dir-group=%{daemon_group} \
457 --with-sd-user=%{daemon_user} \
458 --with-sd-group=%{daemon_group} \
459 --with-fd-user=%{daemon_user} \
460 --with-fd-group=%{daemon_group}
464 strip static-bacula-fd
470 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
471 mkdir -p $RPM_BUILD_ROOT/etc/init.d
472 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
473 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
475 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
477 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
479 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue
480 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt
481 mkdir -p $RPM_BUILD_ROOT/etc/bacula/updatedb
483 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
484 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
485 mkdir -p $RPM_BUILD_ROOT/usr/bin
489 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
493 prefix=$RPM_BUILD_ROOT/usr \
494 sbindir=$RPM_BUILD_ROOT/usr/sbin \
495 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
496 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
497 working_dir=$RPM_BUILD_ROOT%{working_dir} \
502 prefix=$RPM_BUILD_ROOT/usr \
503 sbindir=$RPM_BUILD_ROOT/usr/sbin \
504 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
505 working_dir=$RPM_BUILD_ROOT%{working_dir} \
506 mandir=$RPM_BUILD_ROOT/usr/man \
510 # setup the manual for the doc dir and correct some broken CVS permissions
512 cp -p doc/html-manual/*.html html-manual/
513 cp -p doc/html-manual/*.jpg html-manual/
514 cp -p doc/html-manual/*.gif html-manual/
515 cp -p doc/html-manual/*.css html-manual/
516 chmod 644 html-manual/*
517 chmod 644 doc/bacula.pdf
519 # fixme - make installs the mysql scripts for sqlite build
521 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
522 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
523 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
526 # fixme - make installs the mysql scripts for postgresql build
528 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
529 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
532 # install the init scripts
534 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
535 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
536 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
539 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
540 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
541 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
543 %if ! %{su9} && ! %{mdk}
544 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
545 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
546 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
548 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
550 # install the menu stuff
552 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
553 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
554 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
555 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
558 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
559 cp -p scripts/bacula.desktop.gnome1.consolehelper $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
560 cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console
561 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console
562 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console
564 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{mdk}
565 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
566 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
567 cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console
568 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console
569 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console
571 %if ! %{rh7} && ! %{rh8}
572 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
573 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
578 cp -p %{depkgs}/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
579 cp -p %{depkgs}/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
580 cp -p %{depkgs}/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
583 # install the logrotate file
584 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
586 # install the rescue stuff
587 # these are the rescue scripts
588 cp -p rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/
589 cp -p rescue/linux/floppy/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/
590 cp -p rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/
591 cp -p rescue/linux/floppy/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/
592 cp -p rescue/linux/floppy/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/
593 cp -p rescue/linux/floppy/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/
594 cp -p rescue/linux/floppy/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/
595 cp -p rescue/linux/floppy/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/
596 cp -p rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/
598 # this is the static file daemon
599 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/bacula-fd
601 # this is the tom's root boot disk
602 cp -p ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
604 # install the updatedb scripts
605 cp -p updatedb/* $RPM_BUILD_ROOT/etc/bacula/updatedb/
607 # now clean up permissions that are left broken by the install
608 chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
609 chmod o-rwx $RPM_BUILD_ROOT/var/bacula
610 %if ! %{rh7} && ! %{rh8}
611 chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
612 chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf
616 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
621 %defattr(-,root,root)
625 /etc/bacula/create_mysql_database
626 /etc/bacula/drop_mysql_database
627 /etc/bacula/make_mysql_tables
628 /etc/bacula/drop_mysql_tables
629 /etc/bacula/update_mysql_tables
630 /etc/bacula/grant_mysql_privileges
631 /etc/bacula/create_bacula_database
632 /etc/bacula/drop_bacula_database
633 /etc/bacula/grant_bacula_privileges
634 /etc/bacula/make_bacula_tables
635 /etc/bacula/drop_bacula_tables
636 /etc/bacula/update_bacula_tables
637 /etc/bacula/make_catalog_backup
638 /etc/bacula/delete_catalog_backup
639 /etc/bacula/startmysql
640 /etc/bacula/stopmysql
641 /etc/bacula/mtx-changer
642 /etc/bacula/btraceback.dbx
643 /etc/bacula/btraceback.gdb
644 /etc/init.d/bacula-dir
645 /etc/init.d/bacula-fd
646 /etc/init.d/bacula-sd
648 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
651 /etc/logrotate.d/bacula
653 %config(noreplace) /etc/bacula/bacula-dir.conf
654 %config(noreplace) /etc/bacula/bacula-fd.conf
655 %config(noreplace) /etc/bacula/bacula-sd.conf
656 %config(noreplace) /etc/bacula/bconsole.conf
657 /etc/bacula/query.sql
676 /usr/sbin/static-bacula-fd
679 # test for bacula database older than version 7
680 # note: this ASSUMES no password has been set for bacula database
681 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
683 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then
684 echo "This bacula upgrade will update a bacula database from version 7 to 8."
685 echo "You appear to be running database version $DB_VER. You must first update"
686 echo "your database to version 7 and then install this upgrade. The alternative"
687 echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current"
688 echo "catalog information, then do the upgrade. Information on updating a"
689 echo "database older than version 7 can be found in the release notes."
692 # check for and copy /etc/bacula/console.conf to bconsole.conf
693 if [ -s /etc/bacula/console.conf ];then
694 cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
700 if [ "$1" -ge 1 ] ; then
701 /sbin/chkconfig --add bacula-dir
702 /sbin/chkconfig --add bacula-fd
703 /sbin/chkconfig --add bacula-sd
706 # test for an existing database
707 # note: this ASSUMES no password has been set for bacula database
708 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
710 # grant privileges and create tables if they do not exist
711 if [ -z "$DB_VER" ]; then
712 echo "Hmm, doesn't look like you have an existing database."
713 echo "Granting privileges for MySQL user bacula..."
714 /etc/bacula/grant_mysql_privileges
715 echo "Creating MySQL bacula database..."
716 /etc/bacula/create_mysql_database
717 echo "Creating bacula tables..."
718 /etc/bacula/make_mysql_tables
720 # check to see if we need to upgrade a 1.34 or lower database
721 elif [ "$DB_VER" -lt "8" ]; then
722 echo "This release requires an upgrade to your bacula database."
723 echo "Backing up your current database..."
724 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
725 echo "Upgrading bacula database ..."
726 /etc/bacula/update_mysql_tables
727 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
731 # create the daemon group
732 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
733 if [ -z $HAVE_BACULA ]; then
734 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
735 echo "The group %{daemon_group} has been added to %{groupfile}."
736 echo "See the manual chapter Running Bacula for details."
742 /sbin/chkconfig --del bacula-dir
743 /sbin/chkconfig --del bacula-fd
744 /sbin/chkconfig --del bacula-sd
752 %defattr(-,root,root)
756 /etc/bacula/create_bacula_database
757 /etc/bacula/drop_bacula_database
758 /etc/bacula/grant_bacula_privileges
759 /etc/bacula/make_bacula_tables
760 /etc/bacula/drop_bacula_tables
761 /etc/bacula/update_bacula_tables
762 /etc/bacula/create_sqlite_database
763 /etc/bacula/drop_sqlite_database
764 /etc/bacula/grant_sqlite_privileges
765 /etc/bacula/make_sqlite_tables
766 /etc/bacula/drop_sqlite_tables
767 /etc/bacula/update_sqlite_tables
768 /etc/bacula/make_catalog_backup
769 /etc/bacula/delete_catalog_backup
770 /etc/bacula/mtx-changer
771 /etc/bacula/btraceback.dbx
772 /etc/bacula/btraceback.gdb
773 /etc/init.d/bacula-dir
774 /etc/init.d/bacula-fd
775 /etc/init.d/bacula-sd
777 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
780 /etc/logrotate.d/bacula
782 %config(noreplace) /etc/bacula/bacula-dir.conf
783 %config(noreplace) /etc/bacula/bacula-fd.conf
784 %config(noreplace) /etc/bacula/bacula-sd.conf
785 %config(noreplace) /etc/bacula/bconsole.conf
786 /etc/bacula/query.sql
787 %{sqlite_bindir}/libsqlite.a
788 %{sqlite_bindir}/sqlite.h
807 /usr/sbin/static-bacula-fd
808 %{sqlite_bindir}/sqlite
812 # test for bacula database older than version 7
813 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
814 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
815 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then
816 echo "This bacula upgrade will update a bacula database from version 7 to 8."
817 echo "You appear to be running database version $DB_VER. You must first update"
818 echo "your database to version 7 and then install this upgrade. The alternative"
819 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
820 echo "catalog information, then do the upgrade. Information on updating a"
821 echo "database older than version 7 can be found in the release notes."
825 # check for and copy /etc/bacula/console.conf to bconsole.conf
826 if [ -s /etc/bacula/console.conf ];then
827 cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
832 if [ "$1" -ge 1 ] ; then
833 /sbin/chkconfig --add bacula-dir
834 /sbin/chkconfig --add bacula-fd
835 /sbin/chkconfig --add bacula-sd
838 # test for an existing database
839 if [ -s %{working_dir}/bacula.db ]; then
840 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
841 # check to see if we need to upgrade a 1.34 or lower database
842 if [ "$DB_VER" -lt "7" ]; then
843 echo "This bacula upgrade requires a database update to version 8. You appear to"
844 echo "be running database version $DB_VER. You must update your database using the"
845 echo "upgrade scripts in the bacula-updatedb package. The alternative"
846 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
847 echo "catalog information, then /etc/bacula/make_sqlite_tables. Information on updating a"
848 echo "database older than version 7 can be found in the release notes."
851 if [ "$DB_VER" -lt "8" ] && [ "$DB_VER" -ge "7" ]; then
852 echo "This release requires an upgrade to your bacula database."
853 echo "Backing up your current database..."
854 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
855 echo "Upgrading bacula database ..."
856 /etc/bacula/update_sqlite_tables
857 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
860 # create the database and tables
861 echo "Hmm, doesn't look like you have an existing database."
862 echo "Creating SQLite database..."
863 /etc/bacula/create_sqlite_database
864 echo "Creating the SQLite tables..."
865 /etc/bacula/make_sqlite_tables
868 # create the daemon group
869 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
870 if [ -z $HAVE_BACULA ]; then
871 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
872 echo "The group %{daemon_group} has been added to %{groupfile}."
873 echo "See the manual chapter Running Bacula for details."
879 /sbin/chkconfig --del bacula-dir
880 /sbin/chkconfig --del bacula-fd
881 /sbin/chkconfig --del bacula-sd
889 %defattr(-,root,root)
893 /etc/bacula/create_postgresql_database
894 /etc/bacula/drop_postgresql_database
895 /etc/bacula/make_postgresql_tables
896 /etc/bacula/drop_postgresql_tables
897 /etc/bacula/update_postgresql_tables
898 /etc/bacula/grant_postgresql_privileges
899 /etc/bacula/create_bacula_database
900 /etc/bacula/drop_bacula_database
901 /etc/bacula/grant_bacula_privileges
902 /etc/bacula/make_bacula_tables
903 /etc/bacula/drop_bacula_tables
904 /etc/bacula/update_bacula_tables
905 /etc/bacula/make_catalog_backup
906 /etc/bacula/delete_catalog_backup
907 /etc/bacula/mtx-changer
908 /etc/bacula/btraceback.dbx
909 /etc/bacula/btraceback.gdb
910 /etc/init.d/bacula-dir
911 /etc/init.d/bacula-fd
912 /etc/init.d/bacula-sd
914 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
917 /etc/logrotate.d/bacula
919 %config(noreplace) /etc/bacula/bacula-dir.conf
920 %config(noreplace) /etc/bacula/bacula-fd.conf
921 %config(noreplace) /etc/bacula/bacula-sd.conf
922 %config(noreplace) /etc/bacula/bconsole.conf
923 /etc/bacula/query.sql
942 /usr/sbin/static-bacula-fd
945 # test for bacula database older than version 7
946 # note: this ASSUMES no password has been set for bacula database
947 DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null`
949 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then
950 echo "This bacula upgrade will update a bacula database from version 7 to 8."
951 echo "You appear to be running database version $DB_VER. You must first update"
952 echo "your database to version 7 and then install this upgrade. The alternative"
953 echo "is to use /etc/bacula/drop_postgresql_tables to delete all your your current"
954 echo "catalog information, then do the upgrade. Information on updating a"
955 echo "database older than version 7 can be found in the release notes."
961 if [ "$1" -ge 1 ] ; then
962 /sbin/chkconfig --add bacula-dir
963 /sbin/chkconfig --add bacula-fd
964 /sbin/chkconfig --add bacula-sd
967 # test for an existing database
968 # note: this ASSUMES no password has been set for bacula database
969 DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null`
971 # grant privileges and create tables if they do not exist
972 if [ -z "$DB_VER" ]; then
973 echo "Hmm, doesn't look like you have an existing database."
974 echo "Granting privileges for PostgreSQL user bacula..."
975 /etc/bacula/grant_postgresql_privileges
976 echo "Creating PostgreSQL bacula database..."
977 /etc/bacula/create_postgresql_database
978 echo "Creating bacula tables..."
979 /etc/bacula/make_postgresql_tables
981 # check to see if we need to upgrade a 1.34 or lower database
982 elif [ "$DB_VER" -lt "8" ]; then
983 echo "This release requires an upgrade to your bacula database."
984 echo "Backing up your current database..."
985 pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
986 echo "Upgrading bacula database ..."
987 /etc/bacula/update_postgresql_tables
988 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
992 # create the daemon group
993 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
994 if [ -z $HAVE_BACULA ]; then
995 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
996 echo "The group %{daemon_group} has been added to %{groupfile}."
997 echo "See the manual chapter Running Bacula for details."
1004 /sbin/chkconfig --del bacula-dir
1005 /sbin/chkconfig --del bacula-fd
1006 /sbin/chkconfig --del bacula-sd
1012 %defattr(-,root,root)
1014 /etc/bacula/bconsole
1015 /etc/init.d/bacula-fd
1017 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
1018 /etc/logrotate.d/bacula
1020 %config(noreplace) /etc/bacula/bacula-fd.conf
1021 %config(noreplace) /etc/bacula/bconsole.conf
1025 /usr/sbin/btraceback
1026 /etc/bacula/btraceback.gdb
1027 /etc/bacula/btraceback.dbx
1034 if [ "$1" -ge 1 ] ; then
1035 /sbin/chkconfig --add bacula-fd
1038 # create the daemon group
1039 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
1040 if [ -z $HAVE_BACULA ]; then
1041 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1042 echo "The group %{daemon_group} has been added to %{groupfile}."
1043 echo "See the manual chapter Running Bacula for details."
1049 /sbin/chkconfig --del bacula-fd
1053 %defattr(-,root,root)
1054 /etc/bacula/rescue/backup.etc.list
1055 /etc/bacula/rescue/format_floppy
1056 /etc/bacula/rescue/getdiskinfo
1057 /etc/bacula/rescue/make_rescue_disk
1058 /etc/bacula/rescue/restore_bacula
1059 /etc/bacula/rescue/restore_etc
1060 /etc/bacula/rescue/run_grub
1061 /etc/bacula/rescue/run_lilo
1062 /etc/bacula/rescue/sfdisk.bz2
1063 /etc/bacula/rescue/bacula-fd
1064 /etc/bacula/rescue/tomsrtbt/*
1067 # link our current installed conf file to the rescue directory
1068 ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
1071 echo "Creating rescue files for this system..."
1072 cd /etc/bacula/rescue
1076 # remove the files created after the initial rpm installation
1077 rm -f /etc/bacula/rescue/bacula-fd.conf
1078 rm -f /etc/bacula/rescue/partition.*
1079 rm -f /etc/bacula/rescue/format.*
1080 rm -f /etc/bacula/rescue/mount_drives
1081 rm -f /etc/bacula/rescue/start_network
1082 rm -f /etc/bacula/rescue/sfdisk
1083 rm -rf /etc/bacula/rescue/diskinfo/*
1086 %defattr(-,root,root)
1087 /etc/bacula/updatedb/*
1090 echo "The database update scripts were installed to /etc/bacula/updatedb"
1093 %defattr(-,root,root)
1094 /usr/sbin/gnome-console
1095 /etc/bacula/gconsole
1096 %config(noreplace) /etc/bacula/gnome-console.conf
1097 /usr/share/pixmaps/bacula.png
1100 /usr/share/gnome/apps/System/bacula.desktop
1102 /usr/share/applications/bacula.desktop
1105 %if ! %{rh7} && ! %{rh8}
1106 /usr/sbin/bacula-tray-monitor
1107 /etc/bacula/tray-monitor.conf
1108 /usr/share/pixmaps/bacula-tray-monitor.xpm
1109 /usr/share/applications/bacula-tray-monitor.desktop
1113 # add the console helper files
1114 %config(noreplace,missingok) /etc/pam.d/gnome-console
1115 %config(noreplace,missingok) /etc/security/console.apps/gnome-console
1116 /usr/bin/gnome-console
1121 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1122 - misc fixes from 1.36.0 suse feedback
1123 - fix situation where sqlite database exists but sqlite has been removed.
1124 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1125 - remove tray-monitor from RH8 build
1126 - fix permissions on tray-monitor files
1127 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1128 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
1129 - change database update to 7 to 8 upgrade,
1130 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
1131 - build in 30Jul04, add freetype dependancy to gnome package.
1132 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1133 - add documentation to console for groupadd
1134 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1135 - add support for running daemons as root.bacula
1136 - correct for change in location of floppy rescue files in 1.35.2
1137 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
1138 - updated depgkgs to 30Jul04
1139 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1140 - really, really fix symlink creation for gconsole
1141 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1142 - fix symlink creation in gconsole post install
1143 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1144 - fixed error in gconsole post script
1145 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1146 - add check for gconsole symlink before trying to create it
1147 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1148 - fix some minor permissions issues on doc files that CVS won't let us fix
1149 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1150 - add pkgconfig to BuildRequires
1151 - clean up gnome1/2 menu entries for appropriate packages
1152 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1153 - tightened up doc distribution
1154 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1155 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
1156 - rpm's horrible bug that prevents nested conditional macros prevents me
1157 - from implementing these 2 separate approaches within the conditionals which
1158 - create the separate server packages.
1159 - the solution adopted is to remove the gnome-console files from the server packages
1160 - so bacula-gconsole is now an add on for both client and server packages.
1161 - this also now allows the server packages to be install on machines without
1162 - an X-server and we can still maintain a single spec file.
1163 - added tests to make sure we have defined platform and database macros.
1164 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1165 - corrected mysql prerequisites for suse
1166 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1167 - replaced all cp commands with cp -p
1168 - removed addition of a+x permissions on gnome-console
1169 - corrected permissions on init scripts
1170 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1171 - corrected creation of sqlite_bindir in install from !mysql to sqlite
1173 - various cleanup patches from Michael K. Johnson:
1174 - corrected post install routines for nicer chkconfig
1175 - removed chmod changes in post routines and moved to install section
1176 - removed interactive nature of post routine for rescue package
1177 - added description of building rescue disks to the description of rescue package
1178 - added clean of build root to beginning of install
1179 - removed specifying attr in all file lists
1180 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1181 - added bconsole to client package
1182 - added gconsole package as add-on to client
1183 - removed spurious dependancies on updatedb package (!cut/paste)
1184 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1185 - added updatedb package
1186 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1187 - added postgresql package
1188 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1189 - corrected the if else logic in the dependancy sections
1190 - changes for 1.34 release
1191 - /etc/bacula/console is now /etc/bacula/bconsole
1192 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
1193 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
1194 - /usr/sbin/smtp is now /usr/sbin/bsmtp
1195 - added new /etc/bacula/drop_mysql_database
1196 - added new /etc/bacula/drop_sqlite_database
1197 - added new /etc/bacula/grant_sqlite_privileges
1198 - added new generic bacula database scripts in /etc/bacula
1199 - added pre-install sections to check for database versions older than 6
1200 - added check for /etc/bacula/console.conf and copy to bconsole.conf
1201 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1202 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
1203 - added testing for existing databases before executing any of the database creation scripts
1204 - added defines working_dir and sqlite_bindir in place of hard coded paths
1205 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1206 - added build configuration for SuSE.
1207 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
1208 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1209 - added patch for create_sqlite_database to fix the installed bindir
1210 - added execute of create_sqlite_database to post of sqlite package
1211 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1212 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
1213 - added bacula-fd as Requires for rescue package
1214 - added build tag for Fedora Core 1
1215 - cleaned up dependancies for all builds
1216 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1217 - removed rh_version from package names
1218 - added platform build configuration section to beginning of file
1219 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1220 - removed make_static_bacula script from rescue package install
1221 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1222 - Added define at top of file for depkgs version
1223 - Added rescue sub-package
1224 - Moved requires statements into proper sub-package locations
1225 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1226 - Corrected Requires for Gnome 1.4/2.0 builds
1227 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1228 - Added separate source declaration for depkgs
1229 - added patch for make_catalog_backup script
1230 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1231 - Misc changes to mysql/sqlite build and rh7/8 menu differences
1232 - Added rh_version to sub-package names
1233 - Added installed but missing file /etc/bacula/gconsole
1234 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
1235 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
1236 - Update spec for version 1.31 and combine client
1237 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>