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
665 echo "The group %{daemon_group} has been added to %{groupfile}."
666 echo "See the manual chapter Running Bacula for details."
672 /sbin/chkconfig --del bacula-dir
673 /sbin/chkconfig --del bacula-fd
674 /sbin/chkconfig --del bacula-sd
682 %defattr(-,root,root)
686 /etc/bacula/create_bacula_database
687 /etc/bacula/drop_bacula_database
688 /etc/bacula/grant_bacula_privileges
689 /etc/bacula/make_bacula_tables
690 /etc/bacula/drop_bacula_tables
691 /etc/bacula/update_bacula_tables
692 /etc/bacula/create_sqlite_database
693 /etc/bacula/drop_sqlite_database
694 /etc/bacula/grant_sqlite_privileges
695 /etc/bacula/make_sqlite_tables
696 /etc/bacula/drop_sqlite_tables
697 /etc/bacula/update_sqlite_tables
698 /etc/bacula/make_catalog_backup
699 /etc/bacula/delete_catalog_backup
700 /etc/bacula/mtx-changer
701 /etc/init.d/bacula-dir
702 /etc/init.d/bacula-fd
703 /etc/init.d/bacula-sd
705 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
708 /etc/logrotate.d/bacula
710 %config(noreplace) /etc/bacula/bacula-dir.conf
711 %config(noreplace) /etc/bacula/bacula-fd.conf
712 %config(noreplace) /etc/bacula/bacula-sd.conf
713 %config(noreplace) /etc/bacula/bconsole.conf
714 /etc/bacula/query.sql
715 %{sqlite_bindir}/libsqlite.a
716 %{sqlite_bindir}/sqlite.h
735 /usr/sbin/static-bacula-fd
736 %{sqlite_bindir}/sqlite
737 /etc/bacula/btraceback.gdb
740 # test for bacula database older than version 6
741 if [ -s %{working_dir}/bacula.db ];then
742 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
743 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
744 echo "This bacula upgrade will update a bacula database from version 6 to 7."
745 echo "You appear to be running database version $DB_VER. You must first update"
746 echo "your database to version 6 and then install this upgrade. The alternative"
747 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
748 echo "catalog information, then do the upgrade. Information on updating a"
749 echo "database older than version 6 can be found in the release notes."
753 # check for and copy /etc/bacula/console.conf to bconsole.conf
754 if [ -s /etc/bacula/console.conf ];then
755 cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
760 if [ "$1" -ge 1 ] ; then
761 /sbin/chkconfig --add bacula-dir
762 /sbin/chkconfig --add bacula-fd
763 /sbin/chkconfig --add bacula-sd
766 # test for an existing database
767 if [ -s %{working_dir}/bacula.db ]; then
768 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | tail -n 1 2>/dev/null`
769 # check to see if we need to upgrade a 1.32 or lower database
770 if [ "$DB_VER" -lt "7" ]; then
771 echo "This release requires an upgrade to your bacula database."
772 echo "Backing up your current database..."
773 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
774 echo "Upgrading bacula database ..."
775 /etc/bacula/update_sqlite_tables
776 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
779 # create the database and tables
780 echo "Hmm, doesn't look like you have an existing database."
781 echo "Creating SQLite database..."
782 /etc/bacula/create_sqlite_database
783 echo "Creating the SQLite tables..."
784 /etc/bacula/make_sqlite_tables
787 # create the daemon group
788 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
789 if [ -z $HAVE_BACULA ]; then
790 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
791 echo "The group %{daemon_group} has been added to %{groupfile}."
792 echo "See the manual chapter Running Bacula for details."
798 /sbin/chkconfig --del bacula-dir
799 /sbin/chkconfig --del bacula-fd
800 /sbin/chkconfig --del bacula-sd
808 %defattr(-,root,root)
812 /etc/bacula/create_postgresql_database
813 /etc/bacula/drop_postgresql_database
814 /etc/bacula/make_postgresql_tables
815 /etc/bacula/drop_postgresql_tables
816 /etc/bacula/update_postgresql_tables
817 /etc/bacula/grant_postgresql_privileges
818 /etc/bacula/create_bacula_database
819 /etc/bacula/drop_bacula_database
820 /etc/bacula/grant_bacula_privileges
821 /etc/bacula/make_bacula_tables
822 /etc/bacula/drop_bacula_tables
823 /etc/bacula/update_bacula_tables
824 /etc/bacula/make_catalog_backup
825 /etc/bacula/delete_catalog_backup
826 /etc/bacula/mtx-changer
827 /etc/init.d/bacula-dir
828 /etc/init.d/bacula-fd
829 /etc/init.d/bacula-sd
831 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
834 /etc/logrotate.d/bacula
836 %config(noreplace) /etc/bacula/bacula-dir.conf
837 %config(noreplace) /etc/bacula/bacula-fd.conf
838 %config(noreplace) /etc/bacula/bacula-sd.conf
839 %config(noreplace) /etc/bacula/bconsole.conf
840 /etc/bacula/query.sql
859 /usr/sbin/static-bacula-fd
860 /etc/bacula/btraceback.gdb
864 if [ "$1" -ge 1 ] ; then
865 /sbin/chkconfig --add bacula-dir
866 /sbin/chkconfig --add bacula-fd
867 /sbin/chkconfig --add bacula-sd
870 # test for an existing database
871 # note: this ASSUMES no password has been set for bacula database
872 DB_VER=`echo 'select * from Version;' | psql bacula | tail -3 | head -1 2>/dev/null`
874 # grant privileges and create tables if they do not exist
875 if [ -z "$DB_VER" ]; then
876 echo "Hmm, doesn't look like you have an existing database."
877 echo "Granting privileges for PostgreSQL user bacula..."
878 /etc/bacula/grant_postgresql_privileges
879 echo "Creating PostgreSQL bacula database..."
880 /etc/bacula/create_postgresql_database
881 echo "Creating bacula tables..."
882 /etc/bacula/make_postgresql_tables
885 # create the daemon group
886 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
887 if [ -z $HAVE_BACULA ]; then
888 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
889 echo "The group %{daemon_group} has been added to %{groupfile}."
890 echo "See the manual chapter Running Bacula for details."
897 /sbin/chkconfig --del bacula-dir
898 /sbin/chkconfig --del bacula-fd
899 /sbin/chkconfig --del bacula-sd
905 %defattr(-,root,root)
908 /etc/init.d/bacula-fd
910 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
911 /etc/logrotate.d/bacula
913 %config(noreplace) /etc/bacula/bacula-fd.conf
914 %config(noreplace) /etc/bacula/bconsole.conf
919 /etc/bacula/btraceback.gdb
926 if [ "$1" -ge 1 ] ; then
927 /sbin/chkconfig --add bacula-fd
930 # create the daemon group
931 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
932 if [ -z $HAVE_BACULA ]; then
933 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
934 echo "The group %{daemon_group} has been added to %{groupfile}."
935 echo "See the manual chapter Running Bacula for details."
941 /sbin/chkconfig --del bacula-fd
945 %defattr(-,root,root)
946 /etc/bacula/rescue/backup.etc.list
947 /etc/bacula/rescue/format_floppy
948 /etc/bacula/rescue/getdiskinfo
949 /etc/bacula/rescue/make_rescue_disk
950 /etc/bacula/rescue/restore_bacula
951 /etc/bacula/rescue/restore_etc
952 /etc/bacula/rescue/run_grub
953 /etc/bacula/rescue/run_lilo
954 /etc/bacula/rescue/sfdisk.bz2
955 /etc/bacula/rescue/bacula-fd
956 /etc/bacula/rescue/tomsrtbt/*
959 # link our current installed conf file to the rescue directory
960 ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
963 echo "Creating rescue files for this system..."
964 cd /etc/bacula/rescue
968 # remove the files created after the initial rpm installation
969 rm -f /etc/bacula/rescue/bacula-fd.conf
970 rm -f /etc/bacula/rescue/partition.*
971 rm -f /etc/bacula/rescue/format.*
972 rm -f /etc/bacula/rescue/mount_drives
973 rm -f /etc/bacula/rescue/start_network
974 rm -f /etc/bacula/rescue/sfdisk
975 rm -rf /etc/bacula/rescue/diskinfo/*
978 %defattr(-,root,root)
979 /etc/bacula/updatedb/*
982 echo "The database update scripts were installed to /etc/bacula/updatedb"
985 %defattr(-,root,root)
986 /usr/sbin/gnome-console
988 %config(noreplace) /etc/bacula/gnome-console.conf
989 /usr/share/pixmaps/bacula.png
991 /usr/share/gnome/apps/System/bacula.desktop
993 /usr/share/applications/bacula.desktop
997 # add the console helper files
998 %config(noreplace,missingok) /etc/pam.d/gnome-console
999 %config(noreplace,missingok) /etc/security/console.apps/gnome-console
1000 /usr/bin/gnome-console
1005 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1006 - add documentation to console for groupadd
1007 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1008 - add support for running daemons as root.bacula
1009 - correct for change in location of floppy rescue files in 1.35.2
1010 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
1011 - updated depgkgs to 30Jul04
1012 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1013 - really, really fix symlink creation for gconsole
1014 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1015 - fix symlink creation in gconsole post install
1016 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1017 - fixed error in gconsole post script
1018 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1019 - add check for gconsole symlink before trying to create it
1020 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1021 - fix some minor permissions issues on doc files that CVS won't let us fix
1022 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1023 - add pkgconfig to BuildRequires
1024 - clean up gnome1/2 menu entries for appropriate packages
1025 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1026 - tightened up doc distribution
1027 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1028 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
1029 - rpm's horrible bug that prevents nested conditional macros prevents me
1030 - from implementing these 2 separate approaches within the conditionals which
1031 - create the separate server packages.
1032 - the solution adopted is to remove the gnome-console files from the server packages
1033 - so bacula-gconsole is now an add on for both client and server packages.
1034 - this also now allows the server packages to be install on machines without
1035 - an X-server and we can still maintain a single spec file.
1036 - added tests to make sure we have defined platform and database macros.
1037 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1038 - corrected mysql prerequisites for suse
1039 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1040 - replaced all cp commands with cp -p
1041 - removed addition of a+x permissions on gnome-console
1042 - corrected permissions on init scripts
1043 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1044 - corrected creation of sqlite_bindir in install from !mysql to sqlite
1046 - various cleanup patches from Michael K. Johnson:
1047 - corrected post install routines for nicer chkconfig
1048 - removed chmod changes in post routines and moved to install section
1049 - removed interactive nature of post routine for rescue package
1050 - added description of building rescue disks to the description of rescue package
1051 - added clean of build root to beginning of install
1052 - removed specifying attr in all file lists
1053 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1054 - added bconsole to client package
1055 - added gconsole package as add-on to client
1056 - removed spurious dependancies on updatedb package (!cut/paste)
1057 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1058 - added updatedb package
1059 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1060 - added postgresql package
1061 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1062 - corrected the if else logic in the dependancy sections
1063 - changes for 1.34 release
1064 - /etc/bacula/console is now /etc/bacula/bconsole
1065 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
1066 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
1067 - /usr/sbin/smtp is now /usr/sbin/bsmtp
1068 - added new /etc/bacula/drop_mysql_database
1069 - added new /etc/bacula/drop_sqlite_database
1070 - added new /etc/bacula/grant_sqlite_privileges
1071 - added new generic bacula database scripts in /etc/bacula
1072 - added pre-install sections to check for database versions older than 6
1073 - added check for /etc/bacula/console.conf and copy to bconsole.conf
1074 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1075 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
1076 - added testing for existing databases before executing any of the database creation scripts
1077 - added defines working_dir and sqlite_bindir in place of hard coded paths
1078 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1079 - added build configuration for SuSE.
1080 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
1081 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1082 - added patch for create_sqlite_database to fix the installed bindir
1083 - added execute of create_sqlite_database to post of sqlite package
1084 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1085 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
1086 - added bacula-fd as Requires for rescue package
1087 - added build tag for Fedora Core 1
1088 - cleaned up dependancies for all builds
1089 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1090 - removed rh_version from package names
1091 - added platform build configuration section to beginning of file
1092 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1093 - removed make_static_bacula script from rescue package install
1094 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1095 - Added define at top of file for depkgs version
1096 - Added rescue sub-package
1097 - Moved requires statements into proper sub-package locations
1098 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1099 - Corrected Requires for Gnome 1.4/2.0 builds
1100 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1101 - Added separate source declaration for depkgs
1102 - added patch for make_catalog_backup script
1103 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1104 - Misc changes to mysql/sqlite build and rh7/8 menu differences
1105 - Added rh_version to sub-package names
1106 - Added installed but missing file /etc/bacula/gconsole
1107 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
1108 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
1109 - Update spec for version 1.31 and combine client
1110 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>