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
125 Requires: readline, perl, atk, ncurses, pango, libstdc++
126 Requires: libxml2, zlib
128 Requires: gtk+ >= 1.2
129 Requires: gnome-libs >= 1.4
130 Requires: glibc >= 2.2
137 Requires: gtk2 >= 2.0
138 Requires: libgnomeui >= 2.0
139 Requires: glibc >= 2.3
141 Requires: libart_lgpl >= 2.0
142 Requires: libbonobo >= 2.0
143 Requires: libbonoboui >= 2.0
144 Requires: bonobo-activation
149 %if ! %{rh7} && ! %{su9}
150 Requires: gtk2 >= 2.0
151 Requires: libgnomeui >= 2.0
152 Requires: glibc >= 2.3
154 Requires: libart_lgpl >= 2.0
155 Requires: libbonobo >= 2.0
156 Requires: libbonoboui >= 2.0
157 Requires: bonobo-activation
163 Requires: mysql >= 3.23
164 Requires: mysql-server >= 3.23
166 %if %{postgresql} && %{wb3}
167 Requires: rh-postgresql >= 7
168 Requires: rh-postgresql-server >= 7
170 %if %{postgresql} && ! %{wb3}
171 Requires: postgresql >= 7
172 Requires: postgresql-server >= 7
182 %description postgresql
185 Bacula - It comes by night and sucks the vital essence from your computers.
187 Bacula is a set of computer programs that permit you (or the system
188 administrator) to manage backup, recovery, and verification of computer
189 data across a network of computers of different kinds. In technical terms,
190 it is a network client/server based backup program. Bacula is relatively
191 easy to use and efficient, while offering many advanced storage management
192 features that make it easy to find and recover lost or damaged files.
193 Bacula source code has been released under the GPL version 2 license.
196 This build requires MySQL to be installed separately as the catalog database.
199 This build requires PostgreSQL to be installed separately as the catalog database.
202 This build incorporates sqlite as the catalog database, statically compiled.
206 Summary: Bacula - The Network Backup Solution
207 Group: System Environment/Daemons
209 Requires: readline, perl, libstdc++, zlib
211 Requires: gtk+ >= 1.2
212 Requires: gnome-libs >= 1.4
213 Requires: glibc >= 2.2
215 Requires: gtk2 >= 2.0
216 Requires: libgnomeui >= 2.0
217 Requires: glibc >= 2.3
221 Bacula - It comes by night and sucks the vital essence from your computers.
223 Bacula is a set of computer programs that permit you (or the system
224 administrator) to manage backup, recovery, and verification of computer
225 data across a network of computers of different kinds. In technical terms,
226 it is a network client/server based backup program. Bacula is relatively
227 easy to use and efficient, while offering many advanced storage management
228 features that make it easy to find and recover lost or damaged files.
229 Bacula source code has been released under the GPL version 2 license.
231 This is the File daemon (Client) only package.
235 Summary: Bacula - The Network Backup Solution
236 Group: System Environment/Daemons
237 Requires: coreutils, util-linux, libc5, bacula-fd
240 Bacula - It comes by night and sucks the vital essence from your computers.
242 Bacula is a set of computer programs that permit you (or the system
243 administrator) to manage backup, recovery, and verification of computer
244 data across a network of computers of different kinds. In technical terms,
245 it is a network client/server based backup program. Bacula is relatively
246 easy to use and efficient, while offering many advanced storage management
247 features that make it easy to find and recover lost or damaged files.
248 Bacula source code has been released under the GPL version 2 license.
250 This package installs scripts for disaster recovery and builds rescue
251 floppy disks for bare metal recovery. This package includes tomsrtbt
252 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool
253 to build a boot floppy disk.
255 You need to have the bacula-sqlite, bacula-mysql or bacula-client package for
256 your platform installed and configured before installing this package.
266 export LDFLAGS="-L/usr/lib/termcap"
277 # patches for the bundled sqlite scripts
279 # patch the make_sqlite_tables script for installation bindir
280 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
282 # patch the create_sqlite_database script for installation bindir
283 patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
285 # patch the make_catalog_backup script for installation bindir
286 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
288 # patch the update_sqlite_tables script for installation bindir
289 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
293 --sbindir=/usr/sbin \
294 --sysconfdir=/etc/bacula \
295 --with-scriptdir=/etc/bacula \
296 --enable-smartalloc \
303 --with-sqlite=${cwd}/../depkgs/sqlite \
308 --with-working-dir=%{working_dir} \
309 --with-pid-dir=/var/run \
310 --with-subsys-dir=/var/lock/subsys
314 strip static-bacula-fd
320 mkdir -p $RPM_BUILD_ROOT/etc/init.d
321 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
322 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
323 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
324 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
325 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue
326 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt
329 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
333 prefix=$RPM_BUILD_ROOT/usr \
334 sbindir=$RPM_BUILD_ROOT/usr/sbin \
335 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
336 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
337 working_dir=$RPM_BUILD_ROOT%{working_dir} \
342 prefix=$RPM_BUILD_ROOT/usr \
343 sbindir=$RPM_BUILD_ROOT/usr/sbin \
344 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
345 working_dir=$RPM_BUILD_ROOT%{working_dir} \
346 mandir=$RPM_BUILD_ROOT/usr/man \
350 # fixme - make installs the mysql scripts for sqlite build
352 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
353 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
354 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
357 # fixme - make installs the mysql scripts for postgresql build
359 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
360 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
363 # install the init scripts
365 cp platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
366 cp platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
367 cp platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
369 cp platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
370 cp platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
371 cp platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
374 # install the menu stuff
375 cp scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
376 cp scripts/bacula.desktop.gnome1 $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
377 cp scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
381 cp ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
382 cp ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
383 cp ../depkgs/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
386 # install the logrotate file
387 cp scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
389 # install the rescue stuff
390 # these are the rescue scripts
391 cp rescue/linux/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/
392 cp rescue/linux/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/
393 cp rescue/linux/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/
394 cp rescue/linux/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/
395 cp rescue/linux/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/
396 cp rescue/linux/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/
397 cp rescue/linux/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/
398 cp rescue/linux/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/
399 cp rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/
401 # this is the static file daemon
402 cp src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/bacula-fd
404 # this is the tom's root boot disk
405 cp ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
408 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
413 %defattr(-,root,root)
415 %attr(0754,root,root) /etc/bacula/bacula
416 %attr(0754,root,root) /etc/bacula/bconsole
417 %attr(0754,root,root) /etc/bacula/fd
418 %attr(0754,root,root) /etc/bacula/gconsole
419 %attr(0754,root,root) /etc/bacula/create_mysql_database
420 %attr(0754,root,root) /etc/bacula/drop_mysql_database
421 %attr(0754,root,root) /etc/bacula/make_mysql_tables
422 %attr(0754,root,root) /etc/bacula/drop_mysql_tables
423 %attr(0754,root,root) /etc/bacula/update_mysql_tables
424 %attr(0754,root,root) /etc/bacula/grant_mysql_privileges
425 %attr(0754,root,root) /etc/bacula/create_bacula_database
426 %attr(0754,root,root) /etc/bacula/drop_bacula_database
427 %attr(0754,root,root) /etc/bacula/grant_bacula_privileges
428 %attr(0754,root,root) /etc/bacula/make_bacula_tables
429 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
430 %attr(0754,root,root) /etc/bacula/update_bacula_tables
431 %attr(0754,root,root) /etc/bacula/make_catalog_backup
432 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
433 %attr(0754,root,root) /etc/bacula/startmysql
434 %attr(0754,root,root) /etc/bacula/stopmysql
435 %attr(0754,root,root) /etc/bacula/mtx-changer
436 %attr(0754,root,root) /etc/init.d/bacula-dir
437 %attr(0754,root,root) /etc/init.d/bacula-fd
438 %attr(0754,root,root) /etc/init.d/bacula-sd
440 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
441 %attr(0644,root,root) /usr/man/man1/*
442 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
443 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
444 %attr(0644,root,root) /usr/share/applications/bacula.desktop
445 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
446 %attr(0644,root,root) /etc/logrotate.d/bacula
448 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
449 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
450 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
451 %attr(0640,root,root) %config(noreplace) /etc/bacula/bconsole.conf
452 %attr(0640,root,root) /etc/bacula/query.sql
453 %attr(0640,root,root) %dir %{working_dir}
455 %attr(0750,root,root) /usr/sbin/*
456 %attr(0750,root,root) /etc/bacula/btraceback.gdb
459 # test for bacula database older than version 6
460 # note: this ASSUMES no password has been set for bacula database
461 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
463 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
464 echo "This bacula upgrade will update a bacula database from version 6 to 7."
465 echo "You appear to be running database version $DB_VER. You must first update"
466 echo "your database to version 6 and then install this upgrade. The alternative"
467 echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current"
468 echo "catalog information, then do the upgrade. Information on updating a"
469 echo "database older than version 6 can be found in the release notes."
472 # check for and copy /etc/bacula/console.conf to bconsole.conf
473 if [ -s /etc/bacula/console.conf ];then
474 cp /etc/bacula/console.conf /etc/bacula/bconsole.conf
478 # delete then add our links
479 /sbin/chkconfig --del bacula-dir
480 /sbin/chkconfig --del bacula-fd
481 /sbin/chkconfig --del bacula-sd
482 /sbin/chkconfig --add bacula-dir
483 /sbin/chkconfig --add bacula-fd
484 /sbin/chkconfig --add bacula-sd
486 # add execute permissions for console
487 chmod 0755 /usr/sbin/gnome-console
489 # test for an existing database
490 # note: this ASSUMES no password has been set for bacula database
491 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
493 # grant privileges and create tables if they do not exist
494 if [ -z "$DB_VER" ]; then
495 echo "Hmm, doesn't look like you have an existing database."
496 echo "Granting privileges for MySQL user bacula..."
497 /etc/bacula/grant_mysql_privileges
498 echo "Creating MySQL bacula database..."
499 /etc/bacula/create_mysql_database
500 echo "Creating bacula tables..."
501 /etc/bacula/make_mysql_tables
503 # check to see if we need to upgrade a 1.32 or lower database
504 elif [ "$DB_VER" -lt "7" ]; then
505 echo "This release requires an upgrade to your bacula database."
506 echo "Backing up your current database..."
507 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
508 echo "Upgrading bacula database ..."
509 /etc/bacula/update_mysql_tables
510 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
516 /sbin/chkconfig --del bacula-dir
517 /sbin/chkconfig --del bacula-fd
518 /sbin/chkconfig --del bacula-sd
525 %defattr(-,root,root)
527 %attr(0754,root,root) /etc/bacula/bacula
528 %attr(0754,root,root) /etc/bacula/bconsole
529 %attr(0754,root,root) /etc/bacula/fd
530 %attr(0754,root,root) /etc/bacula/gconsole
531 %attr(0754,root,root) /etc/bacula/create_bacula_database
532 %attr(0754,root,root) /etc/bacula/drop_bacula_database
533 %attr(0754,root,root) /etc/bacula/grant_bacula_privileges
534 %attr(0754,root,root) /etc/bacula/make_bacula_tables
535 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
536 %attr(0754,root,root) /etc/bacula/update_bacula_tables
537 %attr(0754,root,root) /etc/bacula/create_sqlite_database
538 %attr(0754,root,root) /etc/bacula/drop_sqlite_database
539 %attr(0754,root,root) /etc/bacula/grant_sqlite_privileges
540 %attr(0754,root,root) /etc/bacula/make_sqlite_tables
541 %attr(0754,root,root) /etc/bacula/drop_sqlite_tables
542 %attr(0754,root,root) /etc/bacula/update_sqlite_tables
543 %attr(0754,root,root) /etc/bacula/make_catalog_backup
544 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
545 %attr(0754,root,root) /etc/bacula/mtx-changer
546 %attr(0754,root,root) /etc/init.d/bacula-dir
547 %attr(0754,root,root) /etc/init.d/bacula-fd
548 %attr(0754,root,root) /etc/init.d/bacula-sd
550 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
551 %attr(0644,root,root) /usr/man/man1/*
552 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
553 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
554 %attr(0644,root,root) /usr/share/applications/bacula.desktop
555 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
556 %attr(0644,root,root) /etc/logrotate.d/bacula
558 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
559 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
560 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
561 %attr(0640,root,root) %config(noreplace) /etc/bacula/bconsole.conf
562 %attr(0640,root,root) /etc/bacula/query.sql
563 %attr(0640,root,root) %{sqlite_bindir}/libsqlite.a
564 %attr(0640,root,root) %{sqlite_bindir}/sqlite.h
565 %attr(0640,root,root) %dir %{working_dir}
567 %attr(0750,root,root) /usr/sbin/*
568 %attr(0750,root,root) %{sqlite_bindir}/sqlite
569 %attr(0750,root,root) /etc/bacula/btraceback.gdb
572 # test for bacula database older than version 6
573 if [ -s %{working_dir}/bacula.db ];then
574 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
575 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
576 echo "This bacula upgrade will update a bacula database from version 6 to 7."
577 echo "You appear to be running database version $DB_VER. You must first update"
578 echo "your database to version 6 and then install this upgrade. The alternative"
579 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
580 echo "catalog information, then do the upgrade. Information on updating a"
581 echo "database older than version 6 can be found in the release notes."
585 # check for and copy /etc/bacula/console.conf to bconsole.conf
586 if [ -s /etc/bacula/console.conf ];then
587 cp /etc/bacula/console.conf /etc/bacula/bconsole.conf
591 # delete then add our links
592 /sbin/chkconfig --del bacula-dir
593 /sbin/chkconfig --del bacula-fd
594 /sbin/chkconfig --del bacula-sd
595 /sbin/chkconfig --add bacula-dir
596 /sbin/chkconfig --add bacula-fd
597 /sbin/chkconfig --add bacula-sd
599 # add execute permission for console
600 chmod 0755 /usr/sbin/gnome-console
602 # test for an existing database
603 if [ -s %{working_dir}/bacula.db ]; then
604 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
605 # check to see if we need to upgrade a 1.32 or lower database
606 if [ "$DB_VER" -lt "7" ]; then
607 echo "This release requires an upgrade to your bacula database."
608 echo "Backing up your current database..."
609 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
610 echo "Upgrading bacula database ..."
611 /etc/bacula/update_sqlite_tables
612 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
615 # create the database and tables
616 echo "Hmm, doesn't look like you have an existing database."
617 echo "Creating SQLite database..."
618 /etc/bacula/create_sqlite_database
619 echo "Creating the SQLite tables..."
620 /etc/bacula/make_sqlite_tables
625 /sbin/chkconfig --del bacula-dir
626 /sbin/chkconfig --del bacula-fd
627 /sbin/chkconfig --del bacula-sd
634 %defattr(-,root,root)
636 %attr(0754,root,root) /etc/bacula/bacula
637 %attr(0754,root,root) /etc/bacula/bconsole
638 %attr(0754,root,root) /etc/bacula/fd
639 %attr(0754,root,root) /etc/bacula/gconsole
640 %attr(0754,root,root) /etc/bacula/create_postgresql_database
641 %attr(0754,root,root) /etc/bacula/drop_postgresql_database
642 %attr(0754,root,root) /etc/bacula/make_postgresql_tables
643 %attr(0754,root,root) /etc/bacula/drop_postgresql_tables
644 %attr(0754,root,root) /etc/bacula/update_postgresql_tables
645 %attr(0754,root,root) /etc/bacula/grant_postgresql_privileges
646 %attr(0754,root,root) /etc/bacula/create_bacula_database
647 %attr(0754,root,root) /etc/bacula/drop_bacula_database
648 %attr(0754,root,root) /etc/bacula/grant_bacula_privileges
649 %attr(0754,root,root) /etc/bacula/make_bacula_tables
650 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
651 %attr(0754,root,root) /etc/bacula/update_bacula_tables
652 %attr(0754,root,root) /etc/bacula/make_catalog_backup
653 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
654 %attr(0754,root,root) /etc/bacula/mtx-changer
655 %attr(0754,root,root) /etc/init.d/bacula-dir
656 %attr(0754,root,root) /etc/init.d/bacula-fd
657 %attr(0754,root,root) /etc/init.d/bacula-sd
659 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
660 %attr(0644,root,root) /usr/man/man1/*
661 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
662 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
663 %attr(0644,root,root) /usr/share/applications/bacula.desktop
664 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
665 %attr(0644,root,root) /etc/logrotate.d/bacula
667 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
668 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
669 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
670 %attr(0640,root,root) %config(noreplace) /etc/bacula/bconsole.conf
671 %attr(0640,root,root) /etc/bacula/query.sql
672 %attr(0640,root,root) %dir %{working_dir}
674 %attr(0750,root,root) /usr/sbin/*
675 %attr(0750,root,root) /etc/bacula/btraceback.gdb
678 # delete then add our links
679 /sbin/chkconfig --del bacula-dir
680 /sbin/chkconfig --del bacula-fd
681 /sbin/chkconfig --del bacula-sd
682 /sbin/chkconfig --add bacula-dir
683 /sbin/chkconfig --add bacula-fd
684 /sbin/chkconfig --add bacula-sd
686 # add execute permissions for console
687 chmod 0755 /usr/sbin/gnome-console
689 # test for an existing database
690 # note: this ASSUMES no password has been set for bacula database
691 DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null`
693 # grant privileges and create tables if they do not exist
694 if [ -z "$DB_VER" ]; then
695 echo "Hmm, doesn't look like you have an existing database."
696 echo "Granting privileges for PostgreSQL user bacula..."
697 /etc/bacula/grant_postgresql_privileges
698 echo "Creating PostgreSQL bacula database..."
699 /etc/bacula/create_postgresql_database
700 echo "Creating bacula tables..."
701 /etc/bacula/make_postgresql_tables
705 /sbin/chkconfig --del bacula-dir
706 /sbin/chkconfig --del bacula-fd
707 /sbin/chkconfig --del bacula-sd
712 %defattr(-,root,root)
714 %attr(0754,root,root) /etc/bacula/fd
715 %attr(0754,root,root) /etc/init.d/bacula-fd
717 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
718 %attr(0644,root,root) /etc/logrotate.d/bacula
720 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
721 %attr(0640,root,root) %dir %{working_dir}
723 %attr(0750,root,root) /usr/sbin/bacula-fd
724 %attr(0750,root,root) /usr/sbin/btraceback
725 %attr(0750,root,root) /etc/bacula/btraceback.gdb
726 %attr(0750,root,root) /usr/sbin/bsmtp
730 # delete then add our links
731 /sbin/chkconfig --del bacula-fd
732 /sbin/chkconfig --add bacula-fd
736 /sbin/chkconfig --del bacula-fd
739 %defattr(-,root,root)
740 %attr(0644,root,root) /etc/bacula/rescue/backup.etc.list
741 %attr(0754,root,root) /etc/bacula/rescue/format_floppy
742 %attr(0754,root,root) /etc/bacula/rescue/getdiskinfo
743 %attr(0754,root,root) /etc/bacula/rescue/make_rescue_disk
744 %attr(0754,root,root) /etc/bacula/rescue/restore_bacula
745 %attr(0754,root,root) /etc/bacula/rescue/restore_etc
746 %attr(0754,root,root) /etc/bacula/rescue/run_grub
747 %attr(0754,root,root) /etc/bacula/rescue/run_lilo
748 %attr(0644,root,root) /etc/bacula/rescue/sfdisk.bz2
749 %attr(0754,root,root) /etc/bacula/rescue/bacula-fd
750 /etc/bacula/rescue/tomsrtbt/*
753 # link our current installed conf file to the rescue directory
754 ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
757 echo "Ready to create the rescue files for this system."
758 echo "Press <enter> to continue..."
763 echo "Running getdiskinfo..."
764 cd /etc/bacula/rescue
769 echo "To create a boot disk run \"./install.s\" from the /etc/bacula/rescue/tomsrtbt/"
770 echo "directory. To make the bacula rescue disk run"
771 echo "\"./make_rescue_disk --copy-static-bacula --copy-etc-files\" "
772 echo "from the /etc/bacula/rescue directory. To recreate the rescue"
773 echo "information for this system run ./getdiskinfo again."
777 # remove the files created after the initial rpm installation
778 rm -f /etc/bacula/rescue/bacula-fd.conf
779 rm -f /etc/bacula/rescue/partition.*
780 rm -f /etc/bacula/rescue/format.*
781 rm -f /etc/bacula/rescue/mount_drives
782 rm -f /etc/bacula/rescue/start_network
783 rm -f /etc/bacula/rescue/sfdisk
784 rm -rf /etc/bacula/rescue/diskinfo/*
787 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
788 - added postgresql package
789 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
790 - corrected the if else logic in the dependancy sections
791 - changes for 1.34 release
792 - /etc/bacula/console is now /etc/bacula/bconsole
793 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
794 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
795 - /usr/sbin/smtp is now /usr/sbin/bsmtp
796 - added new /etc/bacula/drop_mysql_database
797 - added new /etc/bacula/drop_sqlite_database
798 - added new /etc/bacula/grant_sqlite_privileges
799 - added new generic bacula database scripts in /etc/bacula
800 - added pre-install sections to check for database versions older than 6
801 - added check for /etc/bacula/console.conf and copy to bconsole.conf
802 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
803 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
804 - added testing for existing databases before executing any of the database creation scripts
805 - added defines working_dir and sqlite_bindir in place of hard coded paths
806 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
807 - added build configuration for SuSE.
808 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
809 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
810 - added patch for create_sqlite_database to fix the installed bindir
811 - added execute of create_sqlite_database to post of sqlite package
812 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
813 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
814 - added bacula-fd as Requires for rescue package
815 - added build tag for Fedora Core 1
816 - cleaned up dependancies for all builds
817 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
818 - removed rh_version from package names
819 - added platform build configuration section to beginning of file
820 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
821 - removed make_static_bacula script from rescue package install
822 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
823 - Added define at top of file for depkgs version
824 - Added rescue sub-package
825 - Moved requires statements into proper sub-package locations
826 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
827 - Corrected Requires for Gnome 1.4/2.0 builds
828 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
829 - Added separate Source declaration for depkgs
830 - added patch for make_catalog_backup script
831 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
832 - Misc changes to mysql/sqlite build and rh7/8 menu differences
833 - Added rh_version to sub-package names
834 - Added installed but missing file /etc/bacula/gconsole
835 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
836 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
837 - Update spec for version 1.31 and combine client
838 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>