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
164 Requires: mysql >= 3.23
165 Requires: mysql-server >= 3.23
167 %if %{postgresql} && %{wb3}
168 Requires: rh-postgresql >= 7
169 Requires: rh-postgresql-server >= 7
171 %if %{postgresql} && ! %{wb3}
172 Requires: postgresql >= 7
173 Requires: postgresql-server >= 7
183 %description postgresql
186 Bacula - It comes by night and sucks the vital essence from your computers.
188 Bacula is a set of computer programs that permit you (or the system
189 administrator) to manage backup, recovery, and verification of computer
190 data across a network of computers of different kinds. In technical terms,
191 it is a network client/server based backup program. Bacula is relatively
192 easy to use and efficient, while offering many advanced storage management
193 features that make it easy to find and recover lost or damaged files.
194 Bacula source code has been released under the GPL version 2 license.
197 This build requires MySQL to be installed separately as the catalog database.
200 This build requires PostgreSQL to be installed separately as the catalog database.
203 This build incorporates sqlite as the catalog database, statically compiled.
207 Summary: Bacula - The Network Backup Solution
208 Group: System Environment/Daemons
210 Requires: readline, perl, libstdc++, zlib
213 Requires: glibc >= 2.2
217 Requires: glibc >= 2.3
220 %if ! %{rh7} && ! %{su9}
221 Requires: glibc >= 2.3
226 Bacula - It comes by night and sucks the vital essence from your computers.
228 Bacula is a set of computer programs that permit you (or the system
229 administrator) to manage backup, recovery, and verification of computer
230 data across a network of computers of different kinds. In technical terms,
231 it is a network client/server based backup program. Bacula is relatively
232 easy to use and efficient, while offering many advanced storage management
233 features that make it easy to find and recover lost or damaged files.
234 Bacula source code has been released under the GPL version 2 license.
236 This is the File daemon (Client) only package. It includes the command line
241 Summary: Bacula - The Network Backup Solution
242 Group: System Environment/Daemons
243 Requires: coreutils, util-linux, libc5, bacula-fd
246 Bacula - It comes by night and sucks the vital essence from your computers.
248 Bacula is a set of computer programs that permit you (or the system
249 administrator) to manage backup, recovery, and verification of computer
250 data across a network of computers of different kinds. In technical terms,
251 it is a network client/server based backup program. Bacula is relatively
252 easy to use and efficient, while offering many advanced storage management
253 features that make it easy to find and recover lost or damaged files.
254 Bacula source code has been released under the GPL version 2 license.
256 This package installs scripts for disaster recovery and builds rescue
257 floppy disks for bare metal recovery. This package includes tomsrtbt
258 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool
259 to build a boot floppy disk.
261 You need to have the bacula-sqlite, bacula-mysql, bacula-postgresql or
262 bacula-client package for your platform installed and configured before
263 installing this package.
265 To create a boot disk run "./getdiskinfo" from the /etc/bacula/rescue
266 directory (this is done when the package is first installed),
267 then run "./install.s" from the /etc/bacula/rescue/tomsrtbt/
268 directory. To make the bacula rescue disk run
269 "./make_rescue_disk --copy-static-bacula --copy-etc-files"
270 from the /etc/bacula/rescue directory. To recreate the rescue
271 information for this system run ./getdiskinfo again.
275 Summary: Bacula - The Network Backup Solution
276 Group: System Environment/Daemons
278 %description updatedb
279 Bacula - It comes by night and sucks the vital essence from your computers.
281 Bacula is a set of computer programs that permit you (or the system
282 administrator) to manage backup, recovery, and verification of computer
283 data across a network of computers of different kinds. In technical terms,
284 it is a network client/server based backup program. Bacula is relatively
285 easy to use and efficient, while offering many advanced storage management
286 features that make it easy to find and recover lost or damaged files.
287 Bacula source code has been released under the GPL version 2 license.
289 This package installs scripts for updating older versions of the bacula
293 Summary: Bacula - The Network Backup Solution
294 Group: System Environment/Daemons
295 Requires: readline, libstdc++, zlib, pango, bacula-client
296 Conflicts: bacula-server
299 Requires: gtk+ >= 1.2
300 Requires: gnome-libs >= 1.4
301 Requires: glibc >= 2.2
307 Requires: gtk2 >= 2.0
308 Requires: libgnomeui >= 2.0
309 Requires: glibc >= 2.3
311 Requires: libart_lgpl >= 2.0
312 Requires: libbonobo >= 2.0
313 Requires: libbonoboui >= 2.0
314 Requires: bonobo-activation
318 %if ! %{rh7} && ! %{su9}
319 Requires: gtk2 >= 2.0
320 Requires: libgnomeui >= 2.0
321 Requires: glibc >= 2.3
323 Requires: libart_lgpl >= 2.0
324 Requires: libbonobo >= 2.0
325 Requires: libbonoboui >= 2.0
326 Requires: bonobo-activation
331 %description gconsole
332 Bacula - It comes by night and sucks the vital essence from your computers.
334 Bacula is a set of computer programs that permit you (or the system
335 administrator) to manage backup, recovery, and verification of computer
336 data across a network of computers of different kinds. In technical terms,
337 it is a network client/server based backup program. Bacula is relatively
338 easy to use and efficient, while offering many advanced storage management
339 features that make it easy to find and recover lost or damaged files.
340 Bacula source code has been released under the GPL version 2 license.
342 This is the Gnome Console package. It is an add-on to the client package.
352 export LDFLAGS="-L/usr/lib/termcap"
363 # patches for the bundled sqlite scripts
365 # patch the make_sqlite_tables script for installation bindir
366 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
368 # patch the create_sqlite_database script for installation bindir
369 patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
371 # patch the make_catalog_backup script for installation bindir
372 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
374 # patch the update_sqlite_tables script for installation bindir
375 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
379 --sbindir=/usr/sbin \
380 --sysconfdir=/etc/bacula \
381 --with-scriptdir=/etc/bacula \
382 --enable-smartalloc \
389 --with-sqlite=${cwd}/../depkgs/sqlite \
394 --with-working-dir=%{working_dir} \
395 --with-pid-dir=/var/run \
396 --with-subsys-dir=/var/lock/subsys
400 strip static-bacula-fd
406 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
407 mkdir -p $RPM_BUILD_ROOT/etc/init.d
408 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
409 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
410 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
411 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
412 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue
413 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt
414 mkdir -p $RPM_BUILD_ROOT/etc/bacula/updatedb
417 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
421 prefix=$RPM_BUILD_ROOT/usr \
422 sbindir=$RPM_BUILD_ROOT/usr/sbin \
423 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
424 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
425 working_dir=$RPM_BUILD_ROOT%{working_dir} \
430 prefix=$RPM_BUILD_ROOT/usr \
431 sbindir=$RPM_BUILD_ROOT/usr/sbin \
432 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
433 working_dir=$RPM_BUILD_ROOT%{working_dir} \
434 mandir=$RPM_BUILD_ROOT/usr/man \
438 # fixme - make installs the mysql scripts for sqlite build
440 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
441 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
442 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
445 # fixme - make installs the mysql scripts for postgresql build
447 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
448 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
451 # install the init scripts
453 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
454 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
455 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
457 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
458 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
459 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
462 # install the menu stuff
463 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
464 cp -p scripts/bacula.desktop.gnome1 $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
465 cp -p scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
469 cp -p ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
470 cp -p ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
471 cp -p ../depkgs/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
474 # install the logrotate file
475 cp scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
477 # install the rescue stuff
478 # these are the rescue scripts
479 cp -p rescue/linux/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/
480 cp -p rescue/linux/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/
481 cp -p rescue/linux/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/
482 cp -p rescue/linux/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/
483 cp -p rescue/linux/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/
484 cp -p rescue/linux/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/
485 cp -p rescue/linux/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/
486 cp -p rescue/linux/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/
487 cp -p rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/
489 # this is the static file daemon
490 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/bacula-fd
492 # this is the tom's root boot disk
493 cp -p ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
495 # install the updatedb scripts
496 cp -p updatedb/* $RPM_BUILD_ROOT/etc/bacula/updatedb/
498 # now clean up permissions that are left broken by the install
499 chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
500 chmod o-rwx $RPM_BUILD_ROOT/var/bacula
503 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
508 %defattr(-,root,root)
514 /etc/bacula/create_mysql_database
515 /etc/bacula/drop_mysql_database
516 /etc/bacula/make_mysql_tables
517 /etc/bacula/drop_mysql_tables
518 /etc/bacula/update_mysql_tables
519 /etc/bacula/grant_mysql_privileges
520 /etc/bacula/create_bacula_database
521 /etc/bacula/drop_bacula_database
522 /etc/bacula/grant_bacula_privileges
523 /etc/bacula/make_bacula_tables
524 /etc/bacula/drop_bacula_tables
525 /etc/bacula/update_bacula_tables
526 /etc/bacula/make_catalog_backup
527 /etc/bacula/delete_catalog_backup
528 /etc/bacula/startmysql
529 /etc/bacula/stopmysql
530 /etc/bacula/mtx-changer
531 /etc/init.d/bacula-dir
532 /etc/init.d/bacula-fd
533 /etc/init.d/bacula-sd
535 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
537 /usr/share/pixmaps/bacula.png
538 /usr/share/gnome/apps/System/bacula.desktop
539 /usr/share/applications/bacula.desktop
540 %config(noreplace) /etc/bacula/gnome-console.conf
541 /etc/logrotate.d/bacula
543 %config(noreplace) /etc/bacula/bacula-dir.conf
544 %config(noreplace) /etc/bacula/bacula-fd.conf
545 %config(noreplace) /etc/bacula/bacula-sd.conf
546 %config(noreplace) /etc/bacula/bconsole.conf
547 /etc/bacula/query.sql
551 /etc/bacula/btraceback.gdb
554 # test for bacula database older than version 6
555 # note: this ASSUMES no password has been set for bacula database
556 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
558 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
559 echo "This bacula upgrade will update a bacula database from version 6 to 7."
560 echo "You appear to be running database version $DB_VER. You must first update"
561 echo "your database to version 6 and then install this upgrade. The alternative"
562 echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current"
563 echo "catalog information, then do the upgrade. Information on updating a"
564 echo "database older than version 6 can be found in the release notes."
567 # check for and copy /etc/bacula/console.conf to bconsole.conf
568 if [ -s /etc/bacula/console.conf ];then
569 cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
575 if [ "$1" -ge 1 ] ; then
576 /sbin/chkconfig --add bacula-dir
577 /sbin/chkconfig --add bacula-fd
578 /sbin/chkconfig --add bacula-sd
581 # test for an existing database
582 # note: this ASSUMES no password has been set for bacula database
583 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
585 # grant privileges and create tables if they do not exist
586 if [ -z "$DB_VER" ]; then
587 echo "Hmm, doesn't look like you have an existing database."
588 echo "Granting privileges for MySQL user bacula..."
589 /etc/bacula/grant_mysql_privileges
590 echo "Creating MySQL bacula database..."
591 /etc/bacula/create_mysql_database
592 echo "Creating bacula tables..."
593 /etc/bacula/make_mysql_tables
595 # check to see if we need to upgrade a 1.32 or lower database
596 elif [ "$DB_VER" -lt "7" ]; then
597 echo "This release requires an upgrade to your bacula database."
598 echo "Backing up your current database..."
599 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
600 echo "Upgrading bacula database ..."
601 /etc/bacula/update_mysql_tables
602 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
609 /sbin/chkconfig --del bacula-dir
610 /sbin/chkconfig --del bacula-fd
611 /sbin/chkconfig --del bacula-sd
619 %defattr(-,root,root)
625 /etc/bacula/create_bacula_database
626 /etc/bacula/drop_bacula_database
627 /etc/bacula/grant_bacula_privileges
628 /etc/bacula/make_bacula_tables
629 /etc/bacula/drop_bacula_tables
630 /etc/bacula/update_bacula_tables
631 /etc/bacula/create_sqlite_database
632 /etc/bacula/drop_sqlite_database
633 /etc/bacula/grant_sqlite_privileges
634 /etc/bacula/make_sqlite_tables
635 /etc/bacula/drop_sqlite_tables
636 /etc/bacula/update_sqlite_tables
637 /etc/bacula/make_catalog_backup
638 /etc/bacula/delete_catalog_backup
639 /etc/bacula/mtx-changer
640 /etc/init.d/bacula-dir
641 /etc/init.d/bacula-fd
642 /etc/init.d/bacula-sd
644 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
646 /usr/share/pixmaps/bacula.png
647 /usr/share/gnome/apps/System/bacula.desktop
648 /usr/share/applications/bacula.desktop
649 %config(noreplace) /etc/bacula/gnome-console.conf
650 /etc/logrotate.d/bacula
652 %config(noreplace) /etc/bacula/bacula-dir.conf
653 %config(noreplace) /etc/bacula/bacula-fd.conf
654 %config(noreplace) /etc/bacula/bacula-sd.conf
655 %config(noreplace) /etc/bacula/bconsole.conf
656 /etc/bacula/query.sql
657 %{sqlite_bindir}/libsqlite.a
658 %{sqlite_bindir}/sqlite.h
662 %{sqlite_bindir}/sqlite
663 /etc/bacula/btraceback.gdb
666 # test for bacula database older than version 6
667 if [ -s %{working_dir}/bacula.db ];then
668 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
669 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
670 echo "This bacula upgrade will update a bacula database from version 6 to 7."
671 echo "You appear to be running database version $DB_VER. You must first update"
672 echo "your database to version 6 and then install this upgrade. The alternative"
673 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
674 echo "catalog information, then do the upgrade. Information on updating a"
675 echo "database older than version 6 can be found in the release notes."
679 # check for and copy /etc/bacula/console.conf to bconsole.conf
680 if [ -s /etc/bacula/console.conf ];then
681 cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
686 if [ "$1" -ge 1 ] ; then
687 /sbin/chkconfig --add bacula-dir
688 /sbin/chkconfig --add bacula-fd
689 /sbin/chkconfig --add bacula-sd
692 # test for an existing database
693 if [ -s %{working_dir}/bacula.db ]; then
694 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
695 # check to see if we need to upgrade a 1.32 or lower database
696 if [ "$DB_VER" -lt "7" ]; then
697 echo "This release requires an upgrade to your bacula database."
698 echo "Backing up your current database..."
699 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
700 echo "Upgrading bacula database ..."
701 /etc/bacula/update_sqlite_tables
702 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
705 # create the database and tables
706 echo "Hmm, doesn't look like you have an existing database."
707 echo "Creating SQLite database..."
708 /etc/bacula/create_sqlite_database
709 echo "Creating the SQLite tables..."
710 /etc/bacula/make_sqlite_tables
716 /sbin/chkconfig --del bacula-dir
717 /sbin/chkconfig --del bacula-fd
718 /sbin/chkconfig --del bacula-sd
726 %defattr(-,root,root)
732 /etc/bacula/create_postgresql_database
733 /etc/bacula/drop_postgresql_database
734 /etc/bacula/make_postgresql_tables
735 /etc/bacula/drop_postgresql_tables
736 /etc/bacula/update_postgresql_tables
737 /etc/bacula/grant_postgresql_privileges
738 /etc/bacula/create_bacula_database
739 /etc/bacula/drop_bacula_database
740 /etc/bacula/grant_bacula_privileges
741 /etc/bacula/make_bacula_tables
742 /etc/bacula/drop_bacula_tables
743 /etc/bacula/update_bacula_tables
744 /etc/bacula/make_catalog_backup
745 /etc/bacula/delete_catalog_backup
746 /etc/bacula/mtx-changer
747 /etc/init.d/bacula-dir
748 /etc/init.d/bacula-fd
749 /etc/init.d/bacula-sd
751 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
753 /usr/share/pixmaps/bacula.png
754 /usr/share/gnome/apps/System/bacula.desktop
755 /usr/share/applications/bacula.desktop
756 %config(noreplace) /etc/bacula/gnome-console.conf
757 /etc/logrotate.d/bacula
759 %config(noreplace) /etc/bacula/bacula-dir.conf
760 %config(noreplace) /etc/bacula/bacula-fd.conf
761 %config(noreplace) /etc/bacula/bacula-sd.conf
762 %config(noreplace) /etc/bacula/bconsole.conf
763 /etc/bacula/query.sql
767 /etc/bacula/btraceback.gdb
771 if [ "$1" -ge 1 ] ; then
772 /sbin/chkconfig --add bacula-dir
773 /sbin/chkconfig --add bacula-fd
774 /sbin/chkconfig --add bacula-sd
777 # test for an existing database
778 # note: this ASSUMES no password has been set for bacula database
779 DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null`
781 # grant privileges and create tables if they do not exist
782 if [ -z "$DB_VER" ]; then
783 echo "Hmm, doesn't look like you have an existing database."
784 echo "Granting privileges for PostgreSQL user bacula..."
785 /etc/bacula/grant_postgresql_privileges
786 echo "Creating PostgreSQL bacula database..."
787 /etc/bacula/create_postgresql_database
788 echo "Creating bacula tables..."
789 /etc/bacula/make_postgresql_tables
794 /sbin/chkconfig --del bacula-dir
795 /sbin/chkconfig --del bacula-fd
796 /sbin/chkconfig --del bacula-sd
802 %defattr(-,root,root)
806 /etc/init.d/bacula-fd
808 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
809 /etc/logrotate.d/bacula
811 %config(noreplace) /etc/bacula/bacula-fd.conf
812 %config(noreplace) /etc/bacula/bconsole.conf
817 /etc/bacula/btraceback.gdb
824 if [ "$1" -ge 1 ] ; then
825 /sbin/chkconfig --add bacula-fd
831 /sbin/chkconfig --del bacula-fd
835 %defattr(-,root,root)
836 /etc/bacula/rescue/backup.etc.list
837 /etc/bacula/rescue/format_floppy
838 /etc/bacula/rescue/getdiskinfo
839 /etc/bacula/rescue/make_rescue_disk
840 /etc/bacula/rescue/restore_bacula
841 /etc/bacula/rescue/restore_etc
842 /etc/bacula/rescue/run_grub
843 /etc/bacula/rescue/run_lilo
844 /etc/bacula/rescue/sfdisk.bz2
845 /etc/bacula/rescue/bacula-fd
846 /etc/bacula/rescue/tomsrtbt/*
849 # link our current installed conf file to the rescue directory
850 ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
853 echo "Creating rescue files for this system..."
854 cd /etc/bacula/rescue
858 # remove the files created after the initial rpm installation
859 rm -f /etc/bacula/rescue/bacula-fd.conf
860 rm -f /etc/bacula/rescue/partition.*
861 rm -f /etc/bacula/rescue/format.*
862 rm -f /etc/bacula/rescue/mount_drives
863 rm -f /etc/bacula/rescue/start_network
864 rm -f /etc/bacula/rescue/sfdisk
865 rm -rf /etc/bacula/rescue/diskinfo/*
868 %defattr(-,root,root)
869 /etc/bacula/updatedb/*
872 echo "The database update scripts were installed to /etc/bacula/updatedb"
875 %defattr(-,root,root)
876 /usr/sbin/gnome-console
878 %config(noreplace) /etc/bacula/gnome-console.conf
879 /usr/share/pixmaps/bacula.png
880 /usr/share/gnome/apps/System/bacula.desktop
881 /usr/share/applications/bacula.desktop
887 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
888 - replaced all cp commands with cp -p
889 - removed addition of a+x permissions on gnome-console
890 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
891 - corrected creation of sqlite_bindir in install from !mysql to sqlite
893 - various cleanup patches from Michael K. Johnson:
894 - corrected post install routines for nicer chkconfig
895 - removed chmod changes in post routines and moved to install section
896 - removed interactive nature of post routine for rescue package
897 - added description of building rescue disks to the description of rescue package
898 - added clean of build root to beginning of install
899 - removed specifying attr in all file lists
900 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
901 - added bconsole to client package
902 - added gconsole package as add-on to client
903 - removed spurious dependancies on updatedb package (!cut/paste)
904 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
905 - added updatedb package
906 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
907 - added postgresql package
908 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
909 - corrected the if else logic in the dependancy sections
910 - changes for 1.34 release
911 - /etc/bacula/console is now /etc/bacula/bconsole
912 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
913 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
914 - /usr/sbin/smtp is now /usr/sbin/bsmtp
915 - added new /etc/bacula/drop_mysql_database
916 - added new /etc/bacula/drop_sqlite_database
917 - added new /etc/bacula/grant_sqlite_privileges
918 - added new generic bacula database scripts in /etc/bacula
919 - added pre-install sections to check for database versions older than 6
920 - added check for /etc/bacula/console.conf and copy to bconsole.conf
921 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
922 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
923 - added testing for existing databases before executing any of the database creation scripts
924 - added defines working_dir and sqlite_bindir in place of hard coded paths
925 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
926 - added build configuration for SuSE.
927 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
928 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
929 - added patch for create_sqlite_database to fix the installed bindir
930 - added execute of create_sqlite_database to post of sqlite package
931 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
932 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
933 - added bacula-fd as Requires for rescue package
934 - added build tag for Fedora Core 1
935 - cleaned up dependancies for all builds
936 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
937 - removed rh_version from package names
938 - added platform build configuration section to beginning of file
939 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
940 - removed make_static_bacula script from rescue package install
941 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
942 - Added define at top of file for depkgs version
943 - Added rescue sub-package
944 - Moved requires statements into proper sub-package locations
945 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
946 - Corrected Requires for Gnome 1.4/2.0 builds
947 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
948 - Added separate source declaration for depkgs
949 - added patch for make_catalog_backup script
950 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
951 - Misc changes to mysql/sqlite build and rh7/8 menu differences
952 - Added rh_version to sub-package names
953 - Added installed but missing file /etc/bacula/gconsole
954 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
955 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
956 - Update spec for version 1.31 and combine client
957 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>