1 # Platform Build Configuration
3 # basic defines for every build
4 %define depkgs ../depkgs
5 %define depkgs_version 24Jul03
6 %define tomsrtbt tomsrtbt-2.0.103
7 %define sqlite_bindir /usr/lib/sqlite
8 %define working_dir /var/bacula
10 # platform defines - set one below or define the build_xxx on the command line
13 %{?build_rh7:%define rh7 1}
15 %{?build_rh8:%define rh8 1}
17 %{?build_rh9:%define rh9 1}
20 %{?build_fc1:%define fc1 1}
21 # Whitebox Enterprise build
23 %{?build_wb3:%define wb3 1}
26 %{?build_su9:%define su9 1}
29 # set for database support desired
31 %{?build_mysql:%define mysql 1}
33 %{?build_sqlite:%define sqlite 1}
35 %{?build_postgresql:%define postgresql 1}
37 Summary: Bacula - The Network Backup Solution
41 Group: System Environment/Daemons
43 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
44 Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
45 Source2:http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/%{tomsrtbt}.tar.gz
46 BuildRoot: %{_tmppath}/%{name}-root
47 URL: http://www.bacula.org/
48 Vendor: The Bacula Team
49 Distribution: The Bacula Team
50 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
51 BuildRequires: readline-devel, atk-devel, ncurses-devel, pango-devel
52 BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel
54 BuildRequires: libtermcap-devel
55 BuildRequires: gtk+-devel >= 1.2
56 BuildRequires: gnome-libs-devel >= 1.4
57 BuildRequires: glibc-devel >= 2.2
58 BuildRequires: ORBit-devel
59 BuildRequires: bonobo-devel
60 BuildRequires: GConf-devel
63 BuildRequires: termcap
64 BuildRequires: gtk2-devel >= 2.0
65 BuildRequires: libgnomeui-devel >= 2.0
66 BuildRequires: glibc-devel >= 2.3
67 BuildRequires: ORBit2-devel
68 BuildRequires: libart_lgpl-devel >= 2.0
69 BuildRequires: libbonobo-devel >= 2.0
70 BuildRequires: libbonoboui-devel >= 2.0
71 BuildRequires: bonobo-activation-devel
72 BuildRequires: gconf2-devel
73 BuildRequires: linc-devel
75 %if ! %{rh7} && ! %{su9}
76 BuildRequires: libtermcap-devel
77 BuildRequires: gtk2-devel >= 2.0
78 BuildRequires: libgnomeui-devel >= 2.0
79 BuildRequires: glibc-devel >= 2.3
80 BuildRequires: ORBit2-devel
81 BuildRequires: libart_lgpl-devel >= 2.0
82 BuildRequires: libbonobo-devel >= 2.0
83 BuildRequires: libbonoboui-devel >= 2.0
84 BuildRequires: bonobo-activation-devel
85 BuildRequires: GConf2-devel
86 BuildRequires: linc-devel
90 BuildRequires: mysql-devel >= 3.23
93 %if %{postgresql} && %{wb3}
94 BuildRequires: rh-postgresql-devel >= 7
97 %if %{postgresql} && ! %{wb3}
98 BuildRequires: postgresql-devel >= 7
102 Bacula - It comes by night and sucks the vital essence from your computers.
104 Bacula is a set of computer programs that permit you (or the system
105 administrator) to manage backup, recovery, and verification of computer
106 data across a network of computers of different kinds. In technical terms,
107 it is a network client/server based backup program. Bacula is relatively
108 easy to use and efficient, while offering many advanced storage management
109 features that make it easy to find and recover lost or damaged files.
110 Bacula source code has been released under the GPL version 2 license.
122 Summary: Bacula - The Network Backup Solution
123 Group: System Environment/Daemons
124 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
125 Conflicts: bacula-client, bacula-gconsole
126 Requires: readline, perl, atk, ncurses, pango, libstdc++
127 Requires: libxml2, zlib
129 Requires: gtk+ >= 1.2
130 Requires: gnome-libs >= 1.4
131 Requires: glibc >= 2.2
138 Requires: gtk2 >= 2.0
139 Requires: libgnomeui >= 2.0
140 Requires: glibc >= 2.3
142 Requires: libart_lgpl >= 2.0
143 Requires: libbonobo >= 2.0
144 Requires: libbonoboui >= 2.0
145 Requires: bonobo-activation
150 %if ! %{rh7} && ! %{su9}
151 Requires: gtk2 >= 2.0
152 Requires: libgnomeui >= 2.0
153 Requires: glibc >= 2.3
155 Requires: libart_lgpl >= 2.0
156 Requires: libbonobo >= 2.0
157 Requires: libbonoboui >= 2.0
158 Requires: bonobo-activation
163 %if %{mysql} && ! %{su9}
164 Requires: mysql >= 3.23
165 Requires: mysql-server >= 3.23
167 %if %{mysql} && %{su9}
168 Requires: mysql >= 3.23
169 Requires: mysql-client >= 3.23
171 %if %{postgresql} && %{wb3}
172 Requires: rh-postgresql >= 7
173 Requires: rh-postgresql-server >= 7
175 %if %{postgresql} && ! %{wb3}
176 Requires: postgresql >= 7
177 Requires: postgresql-server >= 7
187 %description postgresql
190 Bacula - It comes by night and sucks the vital essence from your computers.
192 Bacula is a set of computer programs that permit you (or the system
193 administrator) to manage backup, recovery, and verification of computer
194 data across a network of computers of different kinds. In technical terms,
195 it is a network client/server based backup program. Bacula is relatively
196 easy to use and efficient, while offering many advanced storage management
197 features that make it easy to find and recover lost or damaged files.
198 Bacula source code has been released under the GPL version 2 license.
201 This build requires MySQL to be installed separately as the catalog database.
204 This build requires PostgreSQL to be installed separately as the catalog database.
207 This build incorporates sqlite as the catalog database, statically compiled.
211 Summary: Bacula - The Network Backup Solution
212 Group: System Environment/Daemons
214 Requires: readline, perl, libstdc++, zlib
217 Requires: glibc >= 2.2
221 Requires: glibc >= 2.3
224 %if ! %{rh7} && ! %{su9}
225 Requires: glibc >= 2.3
230 Bacula - It comes by night and sucks the vital essence from your computers.
232 Bacula is a set of computer programs that permit you (or the system
233 administrator) to manage backup, recovery, and verification of computer
234 data across a network of computers of different kinds. In technical terms,
235 it is a network client/server based backup program. Bacula is relatively
236 easy to use and efficient, while offering many advanced storage management
237 features that make it easy to find and recover lost or damaged files.
238 Bacula source code has been released under the GPL version 2 license.
240 This is the File daemon (Client) only package. It includes the command line
245 Summary: Bacula - The Network Backup Solution
246 Group: System Environment/Daemons
247 Requires: coreutils, util-linux, libc5, bacula-fd
250 Bacula - It comes by night and sucks the vital essence from your computers.
252 Bacula is a set of computer programs that permit you (or the system
253 administrator) to manage backup, recovery, and verification of computer
254 data across a network of computers of different kinds. In technical terms,
255 it is a network client/server based backup program. Bacula is relatively
256 easy to use and efficient, while offering many advanced storage management
257 features that make it easy to find and recover lost or damaged files.
258 Bacula source code has been released under the GPL version 2 license.
260 This package installs scripts for disaster recovery and builds rescue
261 floppy disks for bare metal recovery. This package includes tomsrtbt
262 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool
263 to build a boot floppy disk.
265 You need to have the bacula-sqlite, bacula-mysql, bacula-postgresql or
266 bacula-client package for your platform installed and configured before
267 installing this package.
269 To create a boot disk run "./getdiskinfo" from the /etc/bacula/rescue
270 directory (this is done when the package is first installed),
271 then run "./install.s" from the /etc/bacula/rescue/tomsrtbt/
272 directory. To make the bacula rescue disk run
273 "./make_rescue_disk --copy-static-bacula --copy-etc-files"
274 from the /etc/bacula/rescue directory. To recreate the rescue
275 information for this system run ./getdiskinfo again.
279 Summary: Bacula - The Network Backup Solution
280 Group: System Environment/Daemons
282 %description updatedb
283 Bacula - It comes by night and sucks the vital essence from your computers.
285 Bacula is a set of computer programs that permit you (or the system
286 administrator) to manage backup, recovery, and verification of computer
287 data across a network of computers of different kinds. In technical terms,
288 it is a network client/server based backup program. Bacula is relatively
289 easy to use and efficient, while offering many advanced storage management
290 features that make it easy to find and recover lost or damaged files.
291 Bacula source code has been released under the GPL version 2 license.
293 This package installs scripts for updating older versions of the bacula
297 Summary: Bacula - The Network Backup Solution
298 Group: System Environment/Daemons
299 Requires: readline, libstdc++, zlib, pango, bacula-client
300 Conflicts: bacula-server
303 Requires: gtk+ >= 1.2
304 Requires: gnome-libs >= 1.4
305 Requires: glibc >= 2.2
311 Requires: gtk2 >= 2.0
312 Requires: libgnomeui >= 2.0
313 Requires: glibc >= 2.3
315 Requires: libart_lgpl >= 2.0
316 Requires: libbonobo >= 2.0
317 Requires: libbonoboui >= 2.0
318 Requires: bonobo-activation
322 %if ! %{rh7} && ! %{su9}
323 Requires: gtk2 >= 2.0
324 Requires: libgnomeui >= 2.0
325 Requires: glibc >= 2.3
327 Requires: libart_lgpl >= 2.0
328 Requires: libbonobo >= 2.0
329 Requires: libbonoboui >= 2.0
330 Requires: bonobo-activation
335 %description gconsole
336 Bacula - It comes by night and sucks the vital essence from your computers.
338 Bacula is a set of computer programs that permit you (or the system
339 administrator) to manage backup, recovery, and verification of computer
340 data across a network of computers of different kinds. In technical terms,
341 it is a network client/server based backup program. Bacula is relatively
342 easy to use and efficient, while offering many advanced storage management
343 features that make it easy to find and recover lost or damaged files.
344 Bacula source code has been released under the GPL version 2 license.
346 This is the Gnome Console package. It is an add-on to the client package.
356 export LDFLAGS="-L/usr/lib/termcap"
367 # patches for the bundled sqlite scripts
369 # patch the make_sqlite_tables script for installation bindir
370 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
372 # patch the create_sqlite_database script for installation bindir
373 patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
375 # patch the make_catalog_backup script for installation bindir
376 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
378 # patch the update_sqlite_tables script for installation bindir
379 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
383 --sbindir=/usr/sbin \
384 --sysconfdir=/etc/bacula \
385 --with-scriptdir=/etc/bacula \
386 --enable-smartalloc \
393 --with-sqlite=${cwd}/../depkgs/sqlite \
398 --with-working-dir=%{working_dir} \
399 --with-pid-dir=/var/run \
400 --with-subsys-dir=/var/lock/subsys
404 strip static-bacula-fd
410 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
411 mkdir -p $RPM_BUILD_ROOT/etc/init.d
412 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
413 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
414 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
415 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
416 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue
417 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt
418 mkdir -p $RPM_BUILD_ROOT/etc/bacula/updatedb
421 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
425 prefix=$RPM_BUILD_ROOT/usr \
426 sbindir=$RPM_BUILD_ROOT/usr/sbin \
427 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
428 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
429 working_dir=$RPM_BUILD_ROOT%{working_dir} \
434 prefix=$RPM_BUILD_ROOT/usr \
435 sbindir=$RPM_BUILD_ROOT/usr/sbin \
436 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
437 working_dir=$RPM_BUILD_ROOT%{working_dir} \
438 mandir=$RPM_BUILD_ROOT/usr/man \
442 # fixme - make installs the mysql scripts for sqlite build
444 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
445 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
446 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
449 # fixme - make installs the mysql scripts for postgresql build
451 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
452 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
455 # install the init scripts
457 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
458 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
459 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
461 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
462 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
463 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
465 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
467 # install the menu stuff
468 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
469 cp -p scripts/bacula.desktop.gnome1 $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
470 cp -p scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
474 cp -p ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
475 cp -p ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
476 cp -p ../depkgs/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
479 # install the logrotate file
480 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
482 # install the rescue stuff
483 # these are the rescue scripts
484 cp -p rescue/linux/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/
485 cp -p rescue/linux/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/
486 cp -p rescue/linux/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/
487 cp -p rescue/linux/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/
488 cp -p rescue/linux/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/
489 cp -p rescue/linux/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/
490 cp -p rescue/linux/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/
491 cp -p rescue/linux/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/
492 cp -p rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/
494 # this is the static file daemon
495 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/bacula-fd
497 # this is the tom's root boot disk
498 cp -p ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
500 # install the updatedb scripts
501 cp -p updatedb/* $RPM_BUILD_ROOT/etc/bacula/updatedb/
503 # now clean up permissions that are left broken by the install
504 chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
505 chmod o-rwx $RPM_BUILD_ROOT/var/bacula
508 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
513 %defattr(-,root,root)
519 /etc/bacula/create_mysql_database
520 /etc/bacula/drop_mysql_database
521 /etc/bacula/make_mysql_tables
522 /etc/bacula/drop_mysql_tables
523 /etc/bacula/update_mysql_tables
524 /etc/bacula/grant_mysql_privileges
525 /etc/bacula/create_bacula_database
526 /etc/bacula/drop_bacula_database
527 /etc/bacula/grant_bacula_privileges
528 /etc/bacula/make_bacula_tables
529 /etc/bacula/drop_bacula_tables
530 /etc/bacula/update_bacula_tables
531 /etc/bacula/make_catalog_backup
532 /etc/bacula/delete_catalog_backup
533 /etc/bacula/startmysql
534 /etc/bacula/stopmysql
535 /etc/bacula/mtx-changer
536 /etc/init.d/bacula-dir
537 /etc/init.d/bacula-fd
538 /etc/init.d/bacula-sd
540 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
542 /usr/share/pixmaps/bacula.png
543 /usr/share/gnome/apps/System/bacula.desktop
544 /usr/share/applications/bacula.desktop
545 %config(noreplace) /etc/bacula/gnome-console.conf
546 /etc/logrotate.d/bacula
548 %config(noreplace) /etc/bacula/bacula-dir.conf
549 %config(noreplace) /etc/bacula/bacula-fd.conf
550 %config(noreplace) /etc/bacula/bacula-sd.conf
551 %config(noreplace) /etc/bacula/bconsole.conf
552 /etc/bacula/query.sql
556 /etc/bacula/btraceback.gdb
559 # test for bacula database older than version 6
560 # note: this ASSUMES no password has been set for bacula database
561 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
563 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
564 echo "This bacula upgrade will update a bacula database from version 6 to 7."
565 echo "You appear to be running database version $DB_VER. You must first update"
566 echo "your database to version 6 and then install this upgrade. The alternative"
567 echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current"
568 echo "catalog information, then do the upgrade. Information on updating a"
569 echo "database older than version 6 can be found in the release notes."
572 # check for and copy /etc/bacula/console.conf to bconsole.conf
573 if [ -s /etc/bacula/console.conf ];then
574 cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
580 if [ "$1" -ge 1 ] ; then
581 /sbin/chkconfig --add bacula-dir
582 /sbin/chkconfig --add bacula-fd
583 /sbin/chkconfig --add bacula-sd
586 # test for an existing database
587 # note: this ASSUMES no password has been set for bacula database
588 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
590 # grant privileges and create tables if they do not exist
591 if [ -z "$DB_VER" ]; then
592 echo "Hmm, doesn't look like you have an existing database."
593 echo "Granting privileges for MySQL user bacula..."
594 /etc/bacula/grant_mysql_privileges
595 echo "Creating MySQL bacula database..."
596 /etc/bacula/create_mysql_database
597 echo "Creating bacula tables..."
598 /etc/bacula/make_mysql_tables
600 # check to see if we need to upgrade a 1.32 or lower database
601 elif [ "$DB_VER" -lt "7" ]; then
602 echo "This release requires an upgrade to your bacula database."
603 echo "Backing up your current database..."
604 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
605 echo "Upgrading bacula database ..."
606 /etc/bacula/update_mysql_tables
607 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
614 /sbin/chkconfig --del bacula-dir
615 /sbin/chkconfig --del bacula-fd
616 /sbin/chkconfig --del bacula-sd
624 %defattr(-,root,root)
630 /etc/bacula/create_bacula_database
631 /etc/bacula/drop_bacula_database
632 /etc/bacula/grant_bacula_privileges
633 /etc/bacula/make_bacula_tables
634 /etc/bacula/drop_bacula_tables
635 /etc/bacula/update_bacula_tables
636 /etc/bacula/create_sqlite_database
637 /etc/bacula/drop_sqlite_database
638 /etc/bacula/grant_sqlite_privileges
639 /etc/bacula/make_sqlite_tables
640 /etc/bacula/drop_sqlite_tables
641 /etc/bacula/update_sqlite_tables
642 /etc/bacula/make_catalog_backup
643 /etc/bacula/delete_catalog_backup
644 /etc/bacula/mtx-changer
645 /etc/init.d/bacula-dir
646 /etc/init.d/bacula-fd
647 /etc/init.d/bacula-sd
649 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
651 /usr/share/pixmaps/bacula.png
652 /usr/share/gnome/apps/System/bacula.desktop
653 /usr/share/applications/bacula.desktop
654 %config(noreplace) /etc/bacula/gnome-console.conf
655 /etc/logrotate.d/bacula
657 %config(noreplace) /etc/bacula/bacula-dir.conf
658 %config(noreplace) /etc/bacula/bacula-fd.conf
659 %config(noreplace) /etc/bacula/bacula-sd.conf
660 %config(noreplace) /etc/bacula/bconsole.conf
661 /etc/bacula/query.sql
662 %{sqlite_bindir}/libsqlite.a
663 %{sqlite_bindir}/sqlite.h
667 %{sqlite_bindir}/sqlite
668 /etc/bacula/btraceback.gdb
671 # test for bacula database older than version 6
672 if [ -s %{working_dir}/bacula.db ];then
673 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
674 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
675 echo "This bacula upgrade will update a bacula database from version 6 to 7."
676 echo "You appear to be running database version $DB_VER. You must first update"
677 echo "your database to version 6 and then install this upgrade. The alternative"
678 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
679 echo "catalog information, then do the upgrade. Information on updating a"
680 echo "database older than version 6 can be found in the release notes."
684 # check for and copy /etc/bacula/console.conf to bconsole.conf
685 if [ -s /etc/bacula/console.conf ];then
686 cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
691 if [ "$1" -ge 1 ] ; then
692 /sbin/chkconfig --add bacula-dir
693 /sbin/chkconfig --add bacula-fd
694 /sbin/chkconfig --add bacula-sd
697 # test for an existing database
698 if [ -s %{working_dir}/bacula.db ]; then
699 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
700 # check to see if we need to upgrade a 1.32 or lower database
701 if [ "$DB_VER" -lt "7" ]; then
702 echo "This release requires an upgrade to your bacula database."
703 echo "Backing up your current database..."
704 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
705 echo "Upgrading bacula database ..."
706 /etc/bacula/update_sqlite_tables
707 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
710 # create the database and tables
711 echo "Hmm, doesn't look like you have an existing database."
712 echo "Creating SQLite database..."
713 /etc/bacula/create_sqlite_database
714 echo "Creating the SQLite tables..."
715 /etc/bacula/make_sqlite_tables
721 /sbin/chkconfig --del bacula-dir
722 /sbin/chkconfig --del bacula-fd
723 /sbin/chkconfig --del bacula-sd
731 %defattr(-,root,root)
737 /etc/bacula/create_postgresql_database
738 /etc/bacula/drop_postgresql_database
739 /etc/bacula/make_postgresql_tables
740 /etc/bacula/drop_postgresql_tables
741 /etc/bacula/update_postgresql_tables
742 /etc/bacula/grant_postgresql_privileges
743 /etc/bacula/create_bacula_database
744 /etc/bacula/drop_bacula_database
745 /etc/bacula/grant_bacula_privileges
746 /etc/bacula/make_bacula_tables
747 /etc/bacula/drop_bacula_tables
748 /etc/bacula/update_bacula_tables
749 /etc/bacula/make_catalog_backup
750 /etc/bacula/delete_catalog_backup
751 /etc/bacula/mtx-changer
752 /etc/init.d/bacula-dir
753 /etc/init.d/bacula-fd
754 /etc/init.d/bacula-sd
756 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
758 /usr/share/pixmaps/bacula.png
759 /usr/share/gnome/apps/System/bacula.desktop
760 /usr/share/applications/bacula.desktop
761 %config(noreplace) /etc/bacula/gnome-console.conf
762 /etc/logrotate.d/bacula
764 %config(noreplace) /etc/bacula/bacula-dir.conf
765 %config(noreplace) /etc/bacula/bacula-fd.conf
766 %config(noreplace) /etc/bacula/bacula-sd.conf
767 %config(noreplace) /etc/bacula/bconsole.conf
768 /etc/bacula/query.sql
772 /etc/bacula/btraceback.gdb
776 if [ "$1" -ge 1 ] ; then
777 /sbin/chkconfig --add bacula-dir
778 /sbin/chkconfig --add bacula-fd
779 /sbin/chkconfig --add bacula-sd
782 # test for an existing database
783 # note: this ASSUMES no password has been set for bacula database
784 DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null`
786 # grant privileges and create tables if they do not exist
787 if [ -z "$DB_VER" ]; then
788 echo "Hmm, doesn't look like you have an existing database."
789 echo "Granting privileges for PostgreSQL user bacula..."
790 /etc/bacula/grant_postgresql_privileges
791 echo "Creating PostgreSQL bacula database..."
792 /etc/bacula/create_postgresql_database
793 echo "Creating bacula tables..."
794 /etc/bacula/make_postgresql_tables
799 /sbin/chkconfig --del bacula-dir
800 /sbin/chkconfig --del bacula-fd
801 /sbin/chkconfig --del bacula-sd
807 %defattr(-,root,root)
811 /etc/init.d/bacula-fd
813 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
814 /etc/logrotate.d/bacula
816 %config(noreplace) /etc/bacula/bacula-fd.conf
817 %config(noreplace) /etc/bacula/bconsole.conf
822 /etc/bacula/btraceback.gdb
829 if [ "$1" -ge 1 ] ; then
830 /sbin/chkconfig --add bacula-fd
836 /sbin/chkconfig --del bacula-fd
840 %defattr(-,root,root)
841 /etc/bacula/rescue/backup.etc.list
842 /etc/bacula/rescue/format_floppy
843 /etc/bacula/rescue/getdiskinfo
844 /etc/bacula/rescue/make_rescue_disk
845 /etc/bacula/rescue/restore_bacula
846 /etc/bacula/rescue/restore_etc
847 /etc/bacula/rescue/run_grub
848 /etc/bacula/rescue/run_lilo
849 /etc/bacula/rescue/sfdisk.bz2
850 /etc/bacula/rescue/bacula-fd
851 /etc/bacula/rescue/tomsrtbt/*
854 # link our current installed conf file to the rescue directory
855 ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
858 echo "Creating rescue files for this system..."
859 cd /etc/bacula/rescue
863 # remove the files created after the initial rpm installation
864 rm -f /etc/bacula/rescue/bacula-fd.conf
865 rm -f /etc/bacula/rescue/partition.*
866 rm -f /etc/bacula/rescue/format.*
867 rm -f /etc/bacula/rescue/mount_drives
868 rm -f /etc/bacula/rescue/start_network
869 rm -f /etc/bacula/rescue/sfdisk
870 rm -rf /etc/bacula/rescue/diskinfo/*
873 %defattr(-,root,root)
874 /etc/bacula/updatedb/*
877 echo "The database update scripts were installed to /etc/bacula/updatedb"
880 %defattr(-,root,root)
881 /usr/sbin/gnome-console
883 %config(noreplace) /etc/bacula/gnome-console.conf
884 /usr/share/pixmaps/bacula.png
885 /usr/share/gnome/apps/System/bacula.desktop
886 /usr/share/applications/bacula.desktop
892 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
893 - corrected mysql prerequisites for suse
894 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
895 - replaced all cp commands with cp -p
896 - removed addition of a+x permissions on gnome-console
897 - corrected permissions on init scripts
898 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
899 - corrected creation of sqlite_bindir in install from !mysql to sqlite
901 - various cleanup patches from Michael K. Johnson:
902 - corrected post install routines for nicer chkconfig
903 - removed chmod changes in post routines and moved to install section
904 - removed interactive nature of post routine for rescue package
905 - added description of building rescue disks to the description of rescue package
906 - added clean of build root to beginning of install
907 - removed specifying attr in all file lists
908 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
909 - added bconsole to client package
910 - added gconsole package as add-on to client
911 - removed spurious dependancies on updatedb package (!cut/paste)
912 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
913 - added updatedb package
914 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
915 - added postgresql package
916 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
917 - corrected the if else logic in the dependancy sections
918 - changes for 1.34 release
919 - /etc/bacula/console is now /etc/bacula/bconsole
920 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
921 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
922 - /usr/sbin/smtp is now /usr/sbin/bsmtp
923 - added new /etc/bacula/drop_mysql_database
924 - added new /etc/bacula/drop_sqlite_database
925 - added new /etc/bacula/grant_sqlite_privileges
926 - added new generic bacula database scripts in /etc/bacula
927 - added pre-install sections to check for database versions older than 6
928 - added check for /etc/bacula/console.conf and copy to bconsole.conf
929 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
930 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
931 - added testing for existing databases before executing any of the database creation scripts
932 - added defines working_dir and sqlite_bindir in place of hard coded paths
933 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
934 - added build configuration for SuSE.
935 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
936 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
937 - added patch for create_sqlite_database to fix the installed bindir
938 - added execute of create_sqlite_database to post of sqlite package
939 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
940 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
941 - added bacula-fd as Requires for rescue package
942 - added build tag for Fedora Core 1
943 - cleaned up dependancies for all builds
944 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
945 - removed rh_version from package names
946 - added platform build configuration section to beginning of file
947 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
948 - removed make_static_bacula script from rescue package install
949 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
950 - Added define at top of file for depkgs version
951 - Added rescue sub-package
952 - Moved requires statements into proper sub-package locations
953 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
954 - Corrected Requires for Gnome 1.4/2.0 builds
955 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
956 - Added separate source declaration for depkgs
957 - added patch for make_catalog_backup script
958 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
959 - Misc changes to mysql/sqlite build and rh7/8 menu differences
960 - Added rh_version to sub-package names
961 - Added installed but missing file /etc/bacula/gconsole
962 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
963 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
964 - Update spec for version 1.31 and combine client
965 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>