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 platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
454 cp platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
455 cp platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
457 cp platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
458 cp platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
459 cp platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
462 # install the menu stuff
463 cp scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
464 cp scripts/bacula.desktop.gnome1 $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
465 cp scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
469 cp ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
470 cp ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
471 cp ../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 rescue/linux/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/
480 cp rescue/linux/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/
481 cp rescue/linux/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/
482 cp rescue/linux/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/
483 cp rescue/linux/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/
484 cp rescue/linux/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/
485 cp rescue/linux/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/
486 cp rescue/linux/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/
487 cp rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/
489 # this is the static file daemon
490 cp src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/bacula-fd
492 # this is the tom's root boot disk
493 cp ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
495 # install the updatedb scripts
496 cp updatedb/* $RPM_BUILD_ROOT/etc/bacula/updatedb/
498 # now clean up permissions that are left broken by the install
499 chmod a+x $RPM_BUILD_ROOT/usr/sbin/gnome-console
500 chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
501 chmod o-rwx $RPM_BUILD_ROOT/var/bacula
504 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
509 %defattr(-,root,root)
515 /etc/bacula/create_mysql_database
516 /etc/bacula/drop_mysql_database
517 /etc/bacula/make_mysql_tables
518 /etc/bacula/drop_mysql_tables
519 /etc/bacula/update_mysql_tables
520 /etc/bacula/grant_mysql_privileges
521 /etc/bacula/create_bacula_database
522 /etc/bacula/drop_bacula_database
523 /etc/bacula/grant_bacula_privileges
524 /etc/bacula/make_bacula_tables
525 /etc/bacula/drop_bacula_tables
526 /etc/bacula/update_bacula_tables
527 /etc/bacula/make_catalog_backup
528 /etc/bacula/delete_catalog_backup
529 /etc/bacula/startmysql
530 /etc/bacula/stopmysql
531 /etc/bacula/mtx-changer
532 /etc/init.d/bacula-dir
533 /etc/init.d/bacula-fd
534 /etc/init.d/bacula-sd
536 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
538 /usr/share/pixmaps/bacula.png
539 /usr/share/gnome/apps/System/bacula.desktop
540 /usr/share/applications/bacula.desktop
541 %config(noreplace) /etc/bacula/gnome-console.conf
542 /etc/logrotate.d/bacula
544 %config(noreplace) /etc/bacula/bacula-dir.conf
545 %config(noreplace) /etc/bacula/bacula-fd.conf
546 %config(noreplace) /etc/bacula/bacula-sd.conf
547 %config(noreplace) /etc/bacula/bconsole.conf
548 /etc/bacula/query.sql
552 /etc/bacula/btraceback.gdb
555 # test for bacula database older than version 6
556 # note: this ASSUMES no password has been set for bacula database
557 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
559 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
560 echo "This bacula upgrade will update a bacula database from version 6 to 7."
561 echo "You appear to be running database version $DB_VER. You must first update"
562 echo "your database to version 6 and then install this upgrade. The alternative"
563 echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current"
564 echo "catalog information, then do the upgrade. Information on updating a"
565 echo "database older than version 6 can be found in the release notes."
568 # check for and copy /etc/bacula/console.conf to bconsole.conf
569 if [ -s /etc/bacula/console.conf ];then
570 cp /etc/bacula/console.conf /etc/bacula/bconsole.conf
576 if [ "$1" -ge 1 ] ; then
577 /sbin/chkconfig --add bacula-dir
578 /sbin/chkconfig --add bacula-fd
579 /sbin/chkconfig --add bacula-sd
582 # test for an existing database
583 # note: this ASSUMES no password has been set for bacula database
584 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
586 # grant privileges and create tables if they do not exist
587 if [ -z "$DB_VER" ]; then
588 echo "Hmm, doesn't look like you have an existing database."
589 echo "Granting privileges for MySQL user bacula..."
590 /etc/bacula/grant_mysql_privileges
591 echo "Creating MySQL bacula database..."
592 /etc/bacula/create_mysql_database
593 echo "Creating bacula tables..."
594 /etc/bacula/make_mysql_tables
596 # check to see if we need to upgrade a 1.32 or lower database
597 elif [ "$DB_VER" -lt "7" ]; then
598 echo "This release requires an upgrade to your bacula database."
599 echo "Backing up your current database..."
600 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
601 echo "Upgrading bacula database ..."
602 /etc/bacula/update_mysql_tables
603 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
610 /sbin/chkconfig --del bacula-dir
611 /sbin/chkconfig --del bacula-fd
612 /sbin/chkconfig --del bacula-sd
620 %defattr(-,root,root)
626 /etc/bacula/create_bacula_database
627 /etc/bacula/drop_bacula_database
628 /etc/bacula/grant_bacula_privileges
629 /etc/bacula/make_bacula_tables
630 /etc/bacula/drop_bacula_tables
631 /etc/bacula/update_bacula_tables
632 /etc/bacula/create_sqlite_database
633 /etc/bacula/drop_sqlite_database
634 /etc/bacula/grant_sqlite_privileges
635 /etc/bacula/make_sqlite_tables
636 /etc/bacula/drop_sqlite_tables
637 /etc/bacula/update_sqlite_tables
638 /etc/bacula/make_catalog_backup
639 /etc/bacula/delete_catalog_backup
640 /etc/bacula/mtx-changer
641 /etc/init.d/bacula-dir
642 /etc/init.d/bacula-fd
643 /etc/init.d/bacula-sd
645 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
647 /usr/share/pixmaps/bacula.png
648 /usr/share/gnome/apps/System/bacula.desktop
649 /usr/share/applications/bacula.desktop
650 %config(noreplace) /etc/bacula/gnome-console.conf
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
658 %{sqlite_bindir}/libsqlite.a
659 %{sqlite_bindir}/sqlite.h
663 %{sqlite_bindir}/sqlite
664 /etc/bacula/btraceback.gdb
667 # test for bacula database older than version 6
668 if [ -s %{working_dir}/bacula.db ];then
669 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
670 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
671 echo "This bacula upgrade will update a bacula database from version 6 to 7."
672 echo "You appear to be running database version $DB_VER. You must first update"
673 echo "your database to version 6 and then install this upgrade. The alternative"
674 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
675 echo "catalog information, then do the upgrade. Information on updating a"
676 echo "database older than version 6 can be found in the release notes."
680 # check for and copy /etc/bacula/console.conf to bconsole.conf
681 if [ -s /etc/bacula/console.conf ];then
682 cp /etc/bacula/console.conf /etc/bacula/bconsole.conf
687 if [ "$1" -ge 1 ] ; then
688 /sbin/chkconfig --add bacula-dir
689 /sbin/chkconfig --add bacula-fd
690 /sbin/chkconfig --add bacula-sd
693 # test for an existing database
694 if [ -s %{working_dir}/bacula.db ]; then
695 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
696 # check to see if we need to upgrade a 1.32 or lower database
697 if [ "$DB_VER" -lt "7" ]; then
698 echo "This release requires an upgrade to your bacula database."
699 echo "Backing up your current database..."
700 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
701 echo "Upgrading bacula database ..."
702 /etc/bacula/update_sqlite_tables
703 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
706 # create the database and tables
707 echo "Hmm, doesn't look like you have an existing database."
708 echo "Creating SQLite database..."
709 /etc/bacula/create_sqlite_database
710 echo "Creating the SQLite tables..."
711 /etc/bacula/make_sqlite_tables
717 /sbin/chkconfig --del bacula-dir
718 /sbin/chkconfig --del bacula-fd
719 /sbin/chkconfig --del bacula-sd
727 %defattr(-,root,root)
733 /etc/bacula/create_postgresql_database
734 /etc/bacula/drop_postgresql_database
735 /etc/bacula/make_postgresql_tables
736 /etc/bacula/drop_postgresql_tables
737 /etc/bacula/update_postgresql_tables
738 /etc/bacula/grant_postgresql_privileges
739 /etc/bacula/create_bacula_database
740 /etc/bacula/drop_bacula_database
741 /etc/bacula/grant_bacula_privileges
742 /etc/bacula/make_bacula_tables
743 /etc/bacula/drop_bacula_tables
744 /etc/bacula/update_bacula_tables
745 /etc/bacula/make_catalog_backup
746 /etc/bacula/delete_catalog_backup
747 /etc/bacula/mtx-changer
748 /etc/init.d/bacula-dir
749 /etc/init.d/bacula-fd
750 /etc/init.d/bacula-sd
752 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
754 /usr/share/pixmaps/bacula.png
755 /usr/share/gnome/apps/System/bacula.desktop
756 /usr/share/applications/bacula.desktop
757 %config(noreplace) /etc/bacula/gnome-console.conf
758 /etc/logrotate.d/bacula
760 %config(noreplace) /etc/bacula/bacula-dir.conf
761 %config(noreplace) /etc/bacula/bacula-fd.conf
762 %config(noreplace) /etc/bacula/bacula-sd.conf
763 %config(noreplace) /etc/bacula/bconsole.conf
764 /etc/bacula/query.sql
768 /etc/bacula/btraceback.gdb
772 if [ "$1" -ge 1 ] ; then
773 /sbin/chkconfig --add bacula-dir
774 /sbin/chkconfig --add bacula-fd
775 /sbin/chkconfig --add bacula-sd
778 # test for an existing database
779 # note: this ASSUMES no password has been set for bacula database
780 DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null`
782 # grant privileges and create tables if they do not exist
783 if [ -z "$DB_VER" ]; then
784 echo "Hmm, doesn't look like you have an existing database."
785 echo "Granting privileges for PostgreSQL user bacula..."
786 /etc/bacula/grant_postgresql_privileges
787 echo "Creating PostgreSQL bacula database..."
788 /etc/bacula/create_postgresql_database
789 echo "Creating bacula tables..."
790 /etc/bacula/make_postgresql_tables
795 /sbin/chkconfig --del bacula-dir
796 /sbin/chkconfig --del bacula-fd
797 /sbin/chkconfig --del bacula-sd
803 %defattr(-,root,root)
807 /etc/init.d/bacula-fd
809 %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
810 /etc/logrotate.d/bacula
812 %config(noreplace) /etc/bacula/bacula-fd.conf
813 %config(noreplace) /etc/bacula/bconsole.conf
818 /etc/bacula/btraceback.gdb
825 if [ "$1" -ge 1 ] ; then
826 /sbin/chkconfig --add bacula-fd
832 /sbin/chkconfig --del bacula-fd
836 %defattr(-,root,root)
837 /etc/bacula/rescue/backup.etc.list
838 /etc/bacula/rescue/format_floppy
839 /etc/bacula/rescue/getdiskinfo
840 /etc/bacula/rescue/make_rescue_disk
841 /etc/bacula/rescue/restore_bacula
842 /etc/bacula/rescue/restore_etc
843 /etc/bacula/rescue/run_grub
844 /etc/bacula/rescue/run_lilo
845 /etc/bacula/rescue/sfdisk.bz2
846 /etc/bacula/rescue/bacula-fd
847 /etc/bacula/rescue/tomsrtbt/*
850 # link our current installed conf file to the rescue directory
851 ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
854 echo "Creating rescue files for this system..."
855 cd /etc/bacula/rescue
859 # remove the files created after the initial rpm installation
860 rm -f /etc/bacula/rescue/bacula-fd.conf
861 rm -f /etc/bacula/rescue/partition.*
862 rm -f /etc/bacula/rescue/format.*
863 rm -f /etc/bacula/rescue/mount_drives
864 rm -f /etc/bacula/rescue/start_network
865 rm -f /etc/bacula/rescue/sfdisk
866 rm -rf /etc/bacula/rescue/diskinfo/*
869 %defattr(-,root,root)
870 /etc/bacula/updatedb/*
873 echo "The database update scripts were installed to /etc/bacula/updatedb"
876 %defattr(-,root,root)
877 /usr/sbin/gnome-console
879 %config(noreplace) /etc/bacula/gnome-console.conf
880 /usr/share/pixmaps/bacula.png
881 /usr/share/gnome/apps/System/bacula.desktop
882 /usr/share/applications/bacula.desktop
888 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
889 - corrected creation of sqlite_bindir in install from !mysql to sqlite
891 - various cleanup patches from Michael K. Johnson:
892 - corrected post install routines for nicer chkconfig
893 - removed chmod changes in post routines and moved to install section
894 - removed interactive nature of post routine for rescue package
895 - added description of building rescue disks to the description of rescue package
896 - added clean of build root to beginning of install
897 - removed specifying attr in all file lists
898 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
899 - added bconsole to client package
900 - added gconsole package as add-on to client
901 - removed spurious dependancies on updatedb package (!cut/paste)
902 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
903 - added updatedb package
904 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
905 - added postgresql package
906 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
907 - corrected the if else logic in the dependancy sections
908 - changes for 1.34 release
909 - /etc/bacula/console is now /etc/bacula/bconsole
910 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
911 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
912 - /usr/sbin/smtp is now /usr/sbin/bsmtp
913 - added new /etc/bacula/drop_mysql_database
914 - added new /etc/bacula/drop_sqlite_database
915 - added new /etc/bacula/grant_sqlite_privileges
916 - added new generic bacula database scripts in /etc/bacula
917 - added pre-install sections to check for database versions older than 6
918 - added check for /etc/bacula/console.conf and copy to bconsole.conf
919 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
920 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
921 - added testing for existing databases before executing any of the database creation scripts
922 - added defines working_dir and sqlite_bindir in place of hard coded paths
923 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
924 - added build configuration for SuSE.
925 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
926 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
927 - added patch for create_sqlite_database to fix the installed bindir
928 - added execute of create_sqlite_database to post of sqlite package
929 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
930 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
931 - added bacula-fd as Requires for rescue package
932 - added build tag for Fedora Core 1
933 - cleaned up dependancies for all builds
934 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
935 - removed rh_version from package names
936 - added platform build configuration section to beginning of file
937 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
938 - removed make_static_bacula script from rescue package install
939 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
940 - Added define at top of file for depkgs version
941 - Added rescue sub-package
942 - Moved requires statements into proper sub-package locations
943 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
944 - Corrected Requires for Gnome 1.4/2.0 builds
945 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
946 - Added separate source declaration for depkgs
947 - added patch for make_catalog_backup script
948 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
949 - Misc changes to mysql/sqlite build and rh7/8 menu differences
950 - Added rh_version to sub-package names
951 - Added installed but missing file /etc/bacula/gconsole
952 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
953 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
954 - Update spec for version 1.31 and combine client
955 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>