1 # Platform Build Configuration
3 # basic defines for every build
4 %define depkgs ../depkgs
5 %define depkgs_version 30Jul04
6 %define tomsrtbt tomsrtbt-2.0.103
7 %define sqlite_bindir /usr/lib/sqlite
8 %define working_dir /var/bacula
9 %define daemon_user root
10 %define daemon_group bacula
11 %define group_file /etc/group
12 %define groupadd /usr/sbin/groupadd
14 # platform defines - set one below or define the build_xxx on the command line
17 %{?build_rh7:%define rh7 1}
19 %{?build_rh8:%define rh8 1}
21 %{?build_rh9:%define rh9 1}
24 %{?build_fc1:%define fc1 1}
25 # Whitebox Enterprise build
26 # this should also work for RHEL
28 %{?build_wb3:%define wb3 1}
30 # this is known to build on SuSE 8.2 and 9.0
32 %{?build_su9:%define su9 1}
34 # test for a platform definition
35 %if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{wb3} && ! %{su9}
36 %{error: You must specify a platform. Please examine the spec file.}
41 # set for database support desired or define the build_xxx on the command line
43 %{?build_mysql:%define mysql 1}
45 %{?build_sqlite:%define sqlite 1}
47 %{?build_postgresql:%define postgresql 1}
49 # test for a database definition
50 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql}
51 %{error: You must specify database support. Please examine the spec file.}
55 Summary: Bacula - The Network Backup Solution
59 Group: System Environment/Daemons
61 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
62 Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
63 Source2:http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/%{tomsrtbt}.tar.gz
64 Source3: Release_Notes-%{version}-%{release}.tar.gz
65 BuildRoot: %{_tmppath}/%{name}-root
66 URL: http://www.bacula.org/
67 Vendor: The Bacula Team
68 Distribution: The Bacula Team
69 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
70 BuildRequires: readline-devel, atk-devel, ncurses-devel, pango-devel
71 BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel, pkgconfig
73 BuildRequires: libtermcap-devel
74 BuildRequires: gtk+-devel >= 1.2
75 BuildRequires: gnome-libs-devel >= 1.4
76 BuildRequires: glibc-devel >= 2.2
77 BuildRequires: ORBit-devel
78 BuildRequires: bonobo-devel
79 BuildRequires: GConf-devel
82 BuildRequires: termcap
83 BuildRequires: gtk2-devel >= 2.0
84 BuildRequires: libgnomeui-devel >= 2.0
85 BuildRequires: glibc-devel >= 2.3
86 BuildRequires: ORBit2-devel
87 BuildRequires: libart_lgpl-devel >= 2.0
88 BuildRequires: libbonobo-devel >= 2.0
89 BuildRequires: libbonoboui-devel >= 2.0
90 BuildRequires: bonobo-activation-devel
91 BuildRequires: gconf2-devel
92 BuildRequires: linc-devel
94 %if ! %{rh7} && ! %{su9}
95 BuildRequires: libtermcap-devel
96 BuildRequires: gtk2-devel >= 2.0
97 BuildRequires: libgnomeui-devel >= 2.0
98 BuildRequires: glibc-devel >= 2.3
99 BuildRequires: ORBit2-devel
100 BuildRequires: libart_lgpl-devel >= 2.0
101 BuildRequires: libbonobo-devel >= 2.0
102 BuildRequires: libbonoboui-devel >= 2.0
103 BuildRequires: bonobo-activation-devel
104 BuildRequires: GConf2-devel
105 BuildRequires: linc-devel
109 BuildRequires: mysql-devel >= 3.23
112 %if %{postgresql} && %{wb3}
113 BuildRequires: rh-postgresql-devel >= 7
116 %if %{postgresql} && ! %{wb3}
117 BuildRequires: postgresql-devel >= 7
121 Bacula - It comes by night and sucks the vital essence from your computers.
123 Bacula is a set of computer programs that permit you (or the system
124 administrator) to manage backup, recovery, and verification of computer
125 data across a network of computers of different kinds. In technical terms,
126 it is a network client/server based backup program. Bacula is relatively
127 easy to use and efficient, while offering many advanced storage management
128 features that make it easy to find and recover lost or damaged files.
129 Bacula source code has been released under the GPL version 2 license.
141 Summary: Bacula - The Network Backup Solution
142 Group: System Environment/Daemons
143 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
144 Conflicts: bacula-client
145 Requires: readline, ncurses, libstdc++, zlib
147 Requires: glibc >= 2.2
151 Requires: glibc >= 2.3
154 %if ! %{rh7} && ! %{su9}
155 Requires: glibc >= 2.3
158 %if %{mysql} && ! %{su9}
159 Requires: mysql >= 3.23
160 Requires: mysql-server >= 3.23
162 %if %{mysql} && %{su9}
163 Requires: mysql >= 3.23
164 Requires: mysql-client >= 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, libstdc++, zlib
212 Requires: glibc >= 2.2
216 Requires: glibc >= 2.3
219 %if ! %{rh7} && ! %{su9}
220 Requires: glibc >= 2.3
225 Bacula - It comes by night and sucks the vital essence from your computers.
227 Bacula is a set of computer programs that permit you (or the system
228 administrator) to manage backup, recovery, and verification of computer
229 data across a network of computers of different kinds. In technical terms,
230 it is a network client/server based backup program. Bacula is relatively
231 easy to use and efficient, while offering many advanced storage management
232 features that make it easy to find and recover lost or damaged files.
233 Bacula source code has been released under the GPL version 2 license.
235 This is the File daemon (Client) only package. It includes the command line
240 Summary: Bacula - The Network Backup Solution
241 Group: System Environment/Daemons
242 Requires: coreutils, util-linux, libc5, bacula-fd
245 Bacula - It comes by night and sucks the vital essence from your computers.
247 Bacula is a set of computer programs that permit you (or the system
248 administrator) to manage backup, recovery, and verification of computer
249 data across a network of computers of different kinds. In technical terms,
250 it is a network client/server based backup program. Bacula is relatively
251 easy to use and efficient, while offering many advanced storage management
252 features that make it easy to find and recover lost or damaged files.
253 Bacula source code has been released under the GPL version 2 license.
255 This package installs scripts for disaster recovery and builds rescue
256 floppy disks for bare metal recovery. This package includes tomsrtbt
257 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool
258 to build a boot floppy disk.
260 You need to have the bacula-sqlite, bacula-mysql, bacula-postgresql or
261 bacula-client package for your platform installed and configured before
262 installing this package.
264 To create a boot disk run "./getdiskinfo" from the /etc/bacula/rescue
265 directory (this is done when the package is first installed),
266 then run "./install.s" from the /etc/bacula/rescue/tomsrtbt/
267 directory. To make the bacula rescue disk run
268 "./make_rescue_disk --copy-static-bacula --copy-etc-files"
269 from the /etc/bacula/rescue directory. To recreate the rescue
270 information for this system run ./getdiskinfo again.
274 Summary: Bacula - The Network Backup Solution
275 Group: System Environment/Daemons
277 %description updatedb
278 Bacula - It comes by night and sucks the vital essence from your computers.
280 Bacula is a set of computer programs that permit you (or the system
281 administrator) to manage backup, recovery, and verification of computer
282 data across a network of computers of different kinds. In technical terms,
283 it is a network client/server based backup program. Bacula is relatively
284 easy to use and efficient, while offering many advanced storage management
285 features that make it easy to find and recover lost or damaged files.
286 Bacula source code has been released under the GPL version 2 license.
288 This package installs scripts for updating older versions of the bacula
292 Summary: Bacula - The Network Backup Solution
293 Group: System Environment/Daemons
294 Requires: readline, atk, libstdc++, zlib, pango, libxml2, bacula-fd
297 Requires: gtk+ >= 1.2
298 Requires: gnome-libs >= 1.4
299 Requires: glibc >= 2.2
305 Requires: gtk2 >= 2.0
306 Requires: libgnomeui >= 2.0
307 Requires: glibc >= 2.3
309 Requires: libart_lgpl >= 2.0
310 Requires: libbonobo >= 2.0
311 Requires: libbonoboui >= 2.0
312 Requires: bonobo-activation
316 %if ! %{rh7} && ! %{su9}
317 Requires: gtk2 >= 2.0
318 Requires: libgnomeui >= 2.0
319 Requires: glibc >= 2.3
321 Requires: libart_lgpl >= 2.0
322 Requires: libbonobo >= 2.0
323 Requires: libbonoboui >= 2.0
324 Requires: bonobo-activation
334 %description gconsole
335 Bacula - It comes by night and sucks the vital essence from your computers.
337 Bacula is a set of computer programs that permit you (or the system
338 administrator) to manage backup, recovery, and verification of computer
339 data across a network of computers of different kinds. In technical terms,
340 it is a network client/server based backup program. Bacula is relatively
341 easy to use and efficient, while offering many advanced storage management
342 features that make it easy to find and recover lost or damaged files.
343 Bacula source code has been released under the GPL version 2 license.
345 This is the Gnome Console package. It is an add-on to the client or
357 export LDFLAGS="-L/usr/lib/termcap"
368 # patches for the bundled sqlite scripts
370 # patch the make_sqlite_tables script for installation bindir
371 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
373 # patch the create_sqlite_database script for installation bindir
374 patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
376 # patch the make_catalog_backup script for installation bindir
377 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
379 # patch the update_sqlite_tables script for installation bindir
380 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
384 --sbindir=/usr/sbin \
385 --sysconfdir=/etc/bacula \
386 --with-scriptdir=/etc/bacula \
387 --enable-smartalloc \
394 --with-sqlite=${cwd}/../depkgs/sqlite \
399 --with-working-dir=%{working_dir} \
400 --with-pid-dir=/var/run \
401 --with-subsys-dir=/var/lock/subsys \
402 --with-dir-user=%{daemon_user} \
403 --with-dir-group=%{daemon_group} \
404 --with-sd-user=%{daemon_user} \
405 --with-sd-group=%{daemon_group} \
406 --with-fd-user=%{daemon_user} \
407 --with-fd-group=%{daemon_group}
411 strip static-bacula-fd
417 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
418 mkdir -p $RPM_BUILD_ROOT/etc/init.d
419 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
420 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
422 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
424 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
426 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue
427 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt
428 mkdir -p $RPM_BUILD_ROOT/etc/bacula/updatedb
430 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
431 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
432 mkdir -p $RPM_BUILD_ROOT/usr/bin
436 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
440 prefix=$RPM_BUILD_ROOT/usr \
441 sbindir=$RPM_BUILD_ROOT/usr/sbin \
442 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
443 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
444 working_dir=$RPM_BUILD_ROOT%{working_dir} \
449 prefix=$RPM_BUILD_ROOT/usr \
450 sbindir=$RPM_BUILD_ROOT/usr/sbin \
451 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
452 working_dir=$RPM_BUILD_ROOT%{working_dir} \
453 mandir=$RPM_BUILD_ROOT/usr/man \
457 # setup the manual for the doc dir and correct some broken CVS permissions
459 cp -p doc/html-manual/*.html html-manual/
460 cp -p doc/html-manual/*.jpg html-manual/
461 cp -p doc/html-manual/*.gif html-manual/
462 cp -p doc/html-manual/*.css html-manual/
463 chmod 644 html-manual/*
464 chmod 644 doc/bacula.pdf
466 # fixme - make installs the mysql scripts for sqlite build
468 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
469 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
470 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
473 # fixme - make installs the mysql scripts for postgresql build
475 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
476 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
479 # install the init scripts
481 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
482 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
483 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
485 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
486 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
487 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
489 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
491 # install the menu stuff
493 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
494 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
497 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
498 cp -p scripts/bacula.desktop.gnome1.consolehelper $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
499 cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console
500 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console
501 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console
503 %if %{rh8} || %{rh9} || %{wb3} || %{fc1}
504 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
505 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
506 cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console
507 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console
508 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console
513 cp -p ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
514 cp -p ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
515 cp -p ../depkgs/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
518 # install the logrotate file
519 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
521 # install the rescue stuff
522 # these are the rescue scripts
523 cp -p rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/
524 cp -p rescue/linux/floppy/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/
525 cp -p rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/
526 cp -p rescue/linux/floppy/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/
527 cp -p rescue/linux/floppy/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/
528 cp -p rescue/linux/floppy/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/
529 cp -p rescue/linux/floppy/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/
530 cp -p rescue/linux/floppy/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/
531 cp -p rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/
533 # this is the static file daemon
534 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/bacula-fd
536 # this is the tom's root boot disk
537 cp -p ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
539 # install the updatedb scripts
540 cp -p updatedb/* $RPM_BUILD_ROOT/etc/bacula/updatedb/
542 # now clean up permissions that are left broken by the install
543 chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
544 chmod o-rwx $RPM_BUILD_ROOT/var/bacula
547 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
552 %defattr(-,root,root)
556 /etc/bacula/create_mysql_database
557 /etc/bacula/drop_mysql_database
558 /etc/bacula/make_mysql_tables
559 /etc/bacula/drop_mysql_tables
560 /etc/bacula/update_mysql_tables
561 /etc/bacula/grant_mysql_privileges
562 /etc/bacula/create_bacula_database
563 /etc/bacula/drop_bacula_database
564 /etc/bacula/grant_bacula_privileges
565 /etc/bacula/make_bacula_tables
566 /etc/bacula/drop_bacula_tables
567 /etc/bacula/update_bacula_tables
568 /etc/bacula/make_catalog_backup
569 /etc/bacula/delete_catalog_backup
570 /etc/bacula/startmysql
571 /etc/bacula/stopmysql
572 /etc/bacula/mtx-changer
573 /etc/init.d/bacula-dir
574 /etc/init.d/bacula-fd
575 /etc/init.d/bacula-sd
577 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
580 /etc/logrotate.d/bacula
582 %config(noreplace) /etc/bacula/bacula-dir.conf
583 %config(noreplace) /etc/bacula/bacula-fd.conf
584 %config(noreplace) /etc/bacula/bacula-sd.conf
585 %config(noreplace) /etc/bacula/bconsole.conf
586 /etc/bacula/query.sql
605 /usr/sbin/static-bacula-fd
606 /etc/bacula/btraceback.gdb
609 # test for bacula database older than version 6
610 # note: this ASSUMES no password has been set for bacula database
611 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
613 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
614 echo "This bacula upgrade will update a bacula database from version 6 to 7."
615 echo "You appear to be running database version $DB_VER. You must first update"
616 echo "your database to version 6 and then install this upgrade. The alternative"
617 echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current"
618 echo "catalog information, then do the upgrade. Information on updating a"
619 echo "database older than version 6 can be found in the release notes."
622 # check for and copy /etc/bacula/console.conf to bconsole.conf
623 if [ -s /etc/bacula/console.conf ];then
624 cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
630 if [ "$1" -ge 1 ] ; then
631 /sbin/chkconfig --add bacula-dir
632 /sbin/chkconfig --add bacula-fd
633 /sbin/chkconfig --add bacula-sd
636 # test for an existing database
637 # note: this ASSUMES no password has been set for bacula database
638 DB_VER=`mysql bacula -e 'select * from Version;'|tail -n 1 2>/dev/null`
640 # grant privileges and create tables if they do not exist
641 if [ -z "$DB_VER" ]; then
642 echo "Hmm, doesn't look like you have an existing database."
643 echo "Granting privileges for MySQL user bacula..."
644 /etc/bacula/grant_mysql_privileges
645 echo "Creating MySQL bacula database..."
646 /etc/bacula/create_mysql_database
647 echo "Creating bacula tables..."
648 /etc/bacula/make_mysql_tables
650 # check to see if we need to upgrade a 1.32 or lower database
651 elif [ "$DB_VER" -lt "7" ]; then
652 echo "This release requires an upgrade to your bacula database."
653 echo "Backing up your current database..."
654 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
655 echo "Upgrading bacula database ..."
656 /etc/bacula/update_mysql_tables
657 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
661 # create the daemon group
662 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
663 if [ -z $HAVE_BACULA ]; then
664 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
670 /sbin/chkconfig --del bacula-dir
671 /sbin/chkconfig --del bacula-fd
672 /sbin/chkconfig --del bacula-sd
680 %defattr(-,root,root)
684 /etc/bacula/create_bacula_database
685 /etc/bacula/drop_bacula_database
686 /etc/bacula/grant_bacula_privileges
687 /etc/bacula/make_bacula_tables
688 /etc/bacula/drop_bacula_tables
689 /etc/bacula/update_bacula_tables
690 /etc/bacula/create_sqlite_database
691 /etc/bacula/drop_sqlite_database
692 /etc/bacula/grant_sqlite_privileges
693 /etc/bacula/make_sqlite_tables
694 /etc/bacula/drop_sqlite_tables
695 /etc/bacula/update_sqlite_tables
696 /etc/bacula/make_catalog_backup
697 /etc/bacula/delete_catalog_backup
698 /etc/bacula/mtx-changer
699 /etc/init.d/bacula-dir
700 /etc/init.d/bacula-fd
701 /etc/init.d/bacula-sd
703 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
706 /etc/logrotate.d/bacula
708 %config(noreplace) /etc/bacula/bacula-dir.conf
709 %config(noreplace) /etc/bacula/bacula-fd.conf
710 %config(noreplace) /etc/bacula/bacula-sd.conf
711 %config(noreplace) /etc/bacula/bconsole.conf
712 /etc/bacula/query.sql
713 %{sqlite_bindir}/libsqlite.a
714 %{sqlite_bindir}/sqlite.h
733 /usr/sbin/static-bacula-fd
734 %{sqlite_bindir}/sqlite
735 /etc/bacula/btraceback.gdb
738 # test for bacula database older than version 6
739 if [ -s %{working_dir}/bacula.db ];then
740 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
741 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
742 echo "This bacula upgrade will update a bacula database from version 6 to 7."
743 echo "You appear to be running database version $DB_VER. You must first update"
744 echo "your database to version 6 and then install this upgrade. The alternative"
745 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
746 echo "catalog information, then do the upgrade. Information on updating a"
747 echo "database older than version 6 can be found in the release notes."
751 # check for and copy /etc/bacula/console.conf to bconsole.conf
752 if [ -s /etc/bacula/console.conf ];then
753 cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
758 if [ "$1" -ge 1 ] ; then
759 /sbin/chkconfig --add bacula-dir
760 /sbin/chkconfig --add bacula-fd
761 /sbin/chkconfig --add bacula-sd
764 # test for an existing database
765 if [ -s %{working_dir}/bacula.db ]; then
766 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
767 # check to see if we need to upgrade a 1.32 or lower database
768 if [ "$DB_VER" -lt "7" ]; then
769 echo "This release requires an upgrade to your bacula database."
770 echo "Backing up your current database..."
771 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
772 echo "Upgrading bacula database ..."
773 /etc/bacula/update_sqlite_tables
774 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
777 # create the database and tables
778 echo "Hmm, doesn't look like you have an existing database."
779 echo "Creating SQLite database..."
780 /etc/bacula/create_sqlite_database
781 echo "Creating the SQLite tables..."
782 /etc/bacula/make_sqlite_tables
785 # create the daemon group
786 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
787 if [ -z $HAVE_BACULA ]; then
788 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
794 /sbin/chkconfig --del bacula-dir
795 /sbin/chkconfig --del bacula-fd
796 /sbin/chkconfig --del bacula-sd
804 %defattr(-,root,root)
808 /etc/bacula/create_postgresql_database
809 /etc/bacula/drop_postgresql_database
810 /etc/bacula/make_postgresql_tables
811 /etc/bacula/drop_postgresql_tables
812 /etc/bacula/update_postgresql_tables
813 /etc/bacula/grant_postgresql_privileges
814 /etc/bacula/create_bacula_database
815 /etc/bacula/drop_bacula_database
816 /etc/bacula/grant_bacula_privileges
817 /etc/bacula/make_bacula_tables
818 /etc/bacula/drop_bacula_tables
819 /etc/bacula/update_bacula_tables
820 /etc/bacula/make_catalog_backup
821 /etc/bacula/delete_catalog_backup
822 /etc/bacula/mtx-changer
823 /etc/init.d/bacula-dir
824 /etc/init.d/bacula-fd
825 /etc/init.d/bacula-sd
827 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
830 /etc/logrotate.d/bacula
832 %config(noreplace) /etc/bacula/bacula-dir.conf
833 %config(noreplace) /etc/bacula/bacula-fd.conf
834 %config(noreplace) /etc/bacula/bacula-sd.conf
835 %config(noreplace) /etc/bacula/bconsole.conf
836 /etc/bacula/query.sql
855 /usr/sbin/static-bacula-fd
856 /etc/bacula/btraceback.gdb
860 if [ "$1" -ge 1 ] ; then
861 /sbin/chkconfig --add bacula-dir
862 /sbin/chkconfig --add bacula-fd
863 /sbin/chkconfig --add bacula-sd
866 # test for an existing database
867 # note: this ASSUMES no password has been set for bacula database
868 DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null`
870 # grant privileges and create tables if they do not exist
871 if [ -z "$DB_VER" ]; then
872 echo "Hmm, doesn't look like you have an existing database."
873 echo "Granting privileges for PostgreSQL user bacula..."
874 /etc/bacula/grant_postgresql_privileges
875 echo "Creating PostgreSQL bacula database..."
876 /etc/bacula/create_postgresql_database
877 echo "Creating bacula tables..."
878 /etc/bacula/make_postgresql_tables
881 # create the daemon group
882 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
883 if [ -z $HAVE_BACULA ]; then
884 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
891 /sbin/chkconfig --del bacula-dir
892 /sbin/chkconfig --del bacula-fd
893 /sbin/chkconfig --del bacula-sd
899 %defattr(-,root,root)
902 /etc/init.d/bacula-fd
904 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
905 /etc/logrotate.d/bacula
907 %config(noreplace) /etc/bacula/bacula-fd.conf
908 %config(noreplace) /etc/bacula/bconsole.conf
913 /etc/bacula/btraceback.gdb
920 if [ "$1" -ge 1 ] ; then
921 /sbin/chkconfig --add bacula-fd
924 # create the daemon group
925 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
926 if [ -z $HAVE_BACULA ]; then
927 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
933 /sbin/chkconfig --del bacula-fd
937 %defattr(-,root,root)
938 /etc/bacula/rescue/backup.etc.list
939 /etc/bacula/rescue/format_floppy
940 /etc/bacula/rescue/getdiskinfo
941 /etc/bacula/rescue/make_rescue_disk
942 /etc/bacula/rescue/restore_bacula
943 /etc/bacula/rescue/restore_etc
944 /etc/bacula/rescue/run_grub
945 /etc/bacula/rescue/run_lilo
946 /etc/bacula/rescue/sfdisk.bz2
947 /etc/bacula/rescue/bacula-fd
948 /etc/bacula/rescue/tomsrtbt/*
951 # link our current installed conf file to the rescue directory
952 ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
955 echo "Creating rescue files for this system..."
956 cd /etc/bacula/rescue
960 # remove the files created after the initial rpm installation
961 rm -f /etc/bacula/rescue/bacula-fd.conf
962 rm -f /etc/bacula/rescue/partition.*
963 rm -f /etc/bacula/rescue/format.*
964 rm -f /etc/bacula/rescue/mount_drives
965 rm -f /etc/bacula/rescue/start_network
966 rm -f /etc/bacula/rescue/sfdisk
967 rm -rf /etc/bacula/rescue/diskinfo/*
970 %defattr(-,root,root)
971 /etc/bacula/updatedb/*
974 echo "The database update scripts were installed to /etc/bacula/updatedb"
977 %defattr(-,root,root)
978 /usr/sbin/gnome-console
980 %config(noreplace) /etc/bacula/gnome-console.conf
981 /usr/share/pixmaps/bacula.png
983 /usr/share/gnome/apps/System/bacula.desktop
985 /usr/share/applications/bacula.desktop
989 # add the console helper files
990 %config(noreplace,missingok) /etc/pam.d/gnome-console
991 %config(noreplace,missingok) /etc/security/console.apps/gnome-console
992 /usr/bin/gnome-console
997 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
998 - add support for running daemons as root.bacula
999 - correct for change in location of floppy rescue files in 1.35.2
1000 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
1001 - updated depgkgs to 30Jul04
1002 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1003 - really, really fix symlink creation for gconsole
1004 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1005 - fix symlink creation in gconsole post install
1006 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1007 - fixed error in gconsole post script
1008 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1009 - add check for gconsole symlink before trying to create it
1010 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1011 - fix some minor permissions issues on doc files that CVS won't let us fix
1012 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1013 - add pkgconfig to BuildRequires
1014 - clean up gnome1/2 menu entries for appropriate packages
1015 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1016 - tightened up doc distribution
1017 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1018 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
1019 - rpm's horrible bug that prevents nested conditional macros prevents me
1020 - from implementing these 2 separate approaches within the conditionals which
1021 - create the separate server packages.
1022 - the solution adopted is to remove the gnome-console files from the server packages
1023 - so bacula-gconsole is now an add on for both client and server packages.
1024 - this also now allows the server packages to be install on machines without
1025 - an X-server and we can still maintain a single spec file.
1026 - added tests to make sure we have defined platform and database macros.
1027 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1028 - corrected mysql prerequisites for suse
1029 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1030 - replaced all cp commands with cp -p
1031 - removed addition of a+x permissions on gnome-console
1032 - corrected permissions on init scripts
1033 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1034 - corrected creation of sqlite_bindir in install from !mysql to sqlite
1036 - various cleanup patches from Michael K. Johnson:
1037 - corrected post install routines for nicer chkconfig
1038 - removed chmod changes in post routines and moved to install section
1039 - removed interactive nature of post routine for rescue package
1040 - added description of building rescue disks to the description of rescue package
1041 - added clean of build root to beginning of install
1042 - removed specifying attr in all file lists
1043 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1044 - added bconsole to client package
1045 - added gconsole package as add-on to client
1046 - removed spurious dependancies on updatedb package (!cut/paste)
1047 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1048 - added updatedb package
1049 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1050 - added postgresql package
1051 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1052 - corrected the if else logic in the dependancy sections
1053 - changes for 1.34 release
1054 - /etc/bacula/console is now /etc/bacula/bconsole
1055 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
1056 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
1057 - /usr/sbin/smtp is now /usr/sbin/bsmtp
1058 - added new /etc/bacula/drop_mysql_database
1059 - added new /etc/bacula/drop_sqlite_database
1060 - added new /etc/bacula/grant_sqlite_privileges
1061 - added new generic bacula database scripts in /etc/bacula
1062 - added pre-install sections to check for database versions older than 6
1063 - added check for /etc/bacula/console.conf and copy to bconsole.conf
1064 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1065 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
1066 - added testing for existing databases before executing any of the database creation scripts
1067 - added defines working_dir and sqlite_bindir in place of hard coded paths
1068 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1069 - added build configuration for SuSE.
1070 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
1071 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1072 - added patch for create_sqlite_database to fix the installed bindir
1073 - added execute of create_sqlite_database to post of sqlite package
1074 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1075 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
1076 - added bacula-fd as Requires for rescue package
1077 - added build tag for Fedora Core 1
1078 - cleaned up dependancies for all builds
1079 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1080 - removed rh_version from package names
1081 - added platform build configuration section to beginning of file
1082 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1083 - removed make_static_bacula script from rescue package install
1084 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1085 - Added define at top of file for depkgs version
1086 - Added rescue sub-package
1087 - Moved requires statements into proper sub-package locations
1088 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1089 - Corrected Requires for Gnome 1.4/2.0 builds
1090 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1091 - Added separate source declaration for depkgs
1092 - added patch for make_catalog_backup script
1093 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1094 - Misc changes to mysql/sqlite build and rh7/8 menu differences
1095 - Added rh_version to sub-package names
1096 - Added installed but missing file /etc/bacula/gconsole
1097 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
1098 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
1099 - Update spec for version 1.31 and combine client
1100 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>