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
8 # platform defines - set one below or define the build_xxx on the command line
11 %{?build_rh7:%define rh7 1}
13 %{?build_rh8:%define rh8 1}
15 %{?build_rh9:%define rh9 1}
18 %{?build_fc1:%define fc1 1}
19 # Whitebox Enterprise build
21 %{?build_wb3:%define wb3 1}
24 %{?build_su9:%define su9 1}
27 # set mysql for MySQL support, leave unset for sqlite support
29 %{?build_mysql:%define mysql 1}
31 Summary: Bacula - The Network Backup Solution
35 Group: System Environment/Daemons
37 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
38 Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
39 Source2:http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/%{tomsrtbt}.tar.gz
40 BuildRoot: %{_tmppath}/%{name}-root
41 URL: http://www.bacula.org/
42 Vendor: The Bacula Team
43 Distribution: The Bacula Team
44 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
45 BuildRequires: readline-devel, atk-devel, ncurses-devel, pango-devel
46 BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel
48 BuildRequires: libtermcap-devel
49 BuildRequires: gtk+-devel >= 1.2
50 BuildRequires: gnome-libs-devel >= 1.4
51 BuildRequires: glibc-devel >= 2.2
52 BuildRequires: ORBit-devel
53 BuildRequires: bonobo-devel
54 BuildRequires: GConf-devel
56 BuildRequires: termcap
57 BuildRequires: gtk2-devel >= 2.0
58 BuildRequires: libgnomeui-devel >= 2.0
59 BuildRequires: glibc-devel >= 2.3
60 BuildRequires: ORBit2-devel
61 BuildRequires: libart_lgpl-devel >= 2.0
62 BuildRequires: libbonobo-devel >= 2.0
63 BuildRequires: libbonoboui-devel >= 2.0
64 BuildRequires: bonobo-activation-devel
65 BuildRequires: gconf2-devel
66 BuildRequires: linc-devel
68 BuildRequires: libtermcap-devel
69 BuildRequires: gtk2-devel >= 2.0
70 BuildRequires: libgnomeui-devel >= 2.0
71 BuildRequires: glibc-devel >= 2.3
72 BuildRequires: ORBit2-devel
73 BuildRequires: libart_lgpl-devel >= 2.0
74 BuildRequires: libbonobo-devel >= 2.0
75 BuildRequires: libbonoboui-devel >= 2.0
76 BuildRequires: bonobo-activation-devel
77 BuildRequires: GConf2-devel
78 BuildRequires: linc-devel
82 BuildRequires: mysql-devel >= 3.23
86 Bacula - It comes by night and sucks the vital essence from your computers.
88 Bacula is a set of computer programs that permit you (or the system
89 administrator) to manage backup, recovery, and verification of computer
90 data across a network of computers of different kinds. In technical terms,
91 it is a network client/server based backup program. Bacula is relatively
92 easy to use and efficient, while offering many advanced storage management
93 features that make it easy to find and recover lost or damaged files.
94 Bacula source code has been released under the GPL version 2 license.
102 Summary: Bacula - The Network Backup Solution
103 Group: System Environment/Daemons
104 Provides: bacula-dir, bacula-sd, bacula-fd
105 Requires: readline, perl, atk, ncurses, pango, libstdc++
106 Requires: libxml2, zlib
108 Requires: gtk+ >= 1.2
109 Requires: gnome-libs >= 1.4
110 Requires: glibc >= 2.2
116 Requires: gtk2 >= 2.0
117 Requires: libgnomeui >= 2.0
118 Requires: glibc >= 2.3
120 Requires: libart_lgpl >= 2.0
121 Requires: libbonobo >= 2.0
122 Requires: libbonoboui >= 2.0
123 Requires: bonobo-activation
128 Requires: gtk2 >= 2.0
129 Requires: libgnomeui >= 2.0
130 Requires: glibc >= 2.3
132 Requires: libart_lgpl >= 2.0
133 Requires: libbonobo >= 2.0
134 Requires: libbonoboui >= 2.0
135 Requires: bonobo-activation
141 Requires: mysql >= 3.23
142 Requires: mysql-server >= 3.23
151 Bacula - It comes by night and sucks the vital essence from your computers.
153 Bacula is a set of computer programs that permit you (or the system
154 administrator) to manage backup, recovery, and verification of computer
155 data across a network of computers of different kinds. In technical terms,
156 it is a network client/server based backup program. Bacula is relatively
157 easy to use and efficient, while offering many advanced storage management
158 features that make it easy to find and recover lost or damaged files.
159 Bacula source code has been released under the GPL version 2 license.
162 This build requires MySQL to be installed separately as the catalog database.
164 This build incorporates sqlite as the catalog database, statically compiled.
168 Summary: Bacula - The Network Backup Solution
169 Group: System Environment/Daemons
171 Requires: readline, perl, libstdc++, zlib
173 Requires: gtk+ >= 1.2
174 Requires: gnome-libs >= 1.4
175 Requires: glibc >= 2.2
177 Requires: gtk2 >= 2.0
178 Requires: libgnomeui >= 2.0
179 Requires: glibc >= 2.3
183 Bacula - It comes by night and sucks the vital essence from your computers.
185 Bacula is a set of computer programs that permit you (or the system
186 administrator) to manage backup, recovery, and verification of computer
187 data across a network of computers of different kinds. In technical terms,
188 it is a network client/server based backup program. Bacula is relatively
189 easy to use and efficient, while offering many advanced storage management
190 features that make it easy to find and recover lost or damaged files.
191 Bacula source code has been released under the GPL version 2 license.
193 This is the File daemon (Client) only package.
197 Summary: Bacula - The Network Backup Solution
198 Group: System Environment/Daemons
199 Requires: coreutils, util-linux, libc5, bacula-fd
202 Bacula - It comes by night and sucks the vital essence from your computers.
204 Bacula is a set of computer programs that permit you (or the system
205 administrator) to manage backup, recovery, and verification of computer
206 data across a network of computers of different kinds. In technical terms,
207 it is a network client/server based backup program. Bacula is relatively
208 easy to use and efficient, while offering many advanced storage management
209 features that make it easy to find and recover lost or damaged files.
210 Bacula source code has been released under the GPL version 2 license.
212 This package installs scripts for disaster recovery and builds rescue
213 floppy disks for bare metal recovery. This package includes tomsrtbt
214 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool
215 to build a boot floppy disk.
217 You need to have the bacula-sqlite, bacula-mysql or bacula-client package for
218 your platform installed and configured before installing this package.
228 export LDFLAGS="-L/usr/lib/termcap"
239 # patch the make_sqlite_tables script for installation bindir
240 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
242 # patch the create_sqlite_database script for installation bindir
243 patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
245 # patch the make_catalog_backup script for installation bindir
246 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
250 --sbindir=/usr/sbin \
251 --sysconfdir=/etc/bacula \
252 --with-scriptdir=/etc/bacula \
253 --enable-smartalloc \
259 --with-sqlite=${cwd}/../depkgs/sqlite \
261 --with-working-dir=/var/bacula \
262 --with-pid-dir=/var/run \
263 --with-subsys-dir=/var/lock/subsys
267 strip static-bacula-fd
273 mkdir -p $RPM_BUILD_ROOT/etc/init.d
274 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
275 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
276 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
277 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
278 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue
279 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt
282 mkdir -p $RPM_BUILD_ROOT/usr/lib/sqlite
286 prefix=$RPM_BUILD_ROOT/usr \
287 sbindir=$RPM_BUILD_ROOT/usr/sbin \
288 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
289 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
290 working_dir=$RPM_BUILD_ROOT/var/bacula \
295 prefix=$RPM_BUILD_ROOT/usr \
296 sbindir=$RPM_BUILD_ROOT/usr/sbin \
297 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
298 working_dir=$RPM_BUILD_ROOT/var/bacula \
299 mandir=$RPM_BUILD_ROOT/usr/man \
304 # fixme - make installs the mysql scripts for sqlite build
305 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
306 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
307 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
310 # install the init scripts
312 cp platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
313 cp platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
314 cp platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
316 cp platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
317 cp platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
318 cp platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
321 # install the menu stuff
322 cp scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
323 cp scripts/bacula.desktop.gnome1 $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
324 cp scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
328 cp ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite
329 cp ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite.h
330 cp ../depkgs/sqlite/libsqlite.a $RPM_BUILD_ROOT/usr/lib/sqlite/libsqlite.a
333 # install the logrotate file
334 cp scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
336 # install the rescue stuff
337 # these are the rescue scripts
338 cp rescue/linux/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/
339 cp rescue/linux/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/
340 cp rescue/linux/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/
341 cp rescue/linux/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/
342 cp rescue/linux/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/
343 cp rescue/linux/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/
344 cp rescue/linux/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/
345 cp rescue/linux/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/
346 cp rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/
348 # this is the static file daemon
349 cp src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/bacula-fd
351 # this is the tom's root boot disk
352 cp ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
355 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
360 %defattr(-,root,root)
362 %attr(0754,root,root) /etc/bacula/bacula
363 %attr(0754,root,root) /etc/bacula/console
364 %attr(0754,root,root) /etc/bacula/fd
365 %attr(0754,root,root) /etc/bacula/gconsole
366 %attr(0754,root,root) /etc/bacula/create_mysql_database
367 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
368 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
369 %attr(0754,root,root) /etc/bacula/drop_mysql_tables
370 %attr(0754,root,root) /etc/bacula/make_bacula_tables
371 %attr(0754,root,root) /etc/bacula/make_catalog_backup
372 %attr(0754,root,root) /etc/bacula/make_mysql_tables
373 %attr(0754,root,root) /etc/bacula/grant_mysql_privileges
374 %attr(0754,root,root) /etc/bacula/startmysql
375 %attr(0754,root,root) /etc/bacula/stopmysql
376 %attr(0754,root,root) /etc/bacula/mtx-changer
377 %attr(0754,root,root) /etc/init.d/bacula-dir
378 %attr(0754,root,root) /etc/init.d/bacula-fd
379 %attr(0754,root,root) /etc/init.d/bacula-sd
381 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
382 %attr(0644,root,root) /usr/man/man1/*
383 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
384 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
385 %attr(0644,root,root) /usr/share/applications/bacula.desktop
386 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
387 %attr(0644,root,root) /etc/logrotate.d/bacula
389 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
390 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
391 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
392 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
393 %attr(0640,root,root) /etc/bacula/query.sql
394 %attr(0640,root,root) %dir /var/bacula
396 %attr(0750,root,root) /usr/sbin/*
399 # delete then add our links
400 /sbin/chkconfig --del bacula-dir
401 /sbin/chkconfig --del bacula-fd
402 /sbin/chkconfig --del bacula-sd
403 /sbin/chkconfig --add bacula-dir
404 /sbin/chkconfig --add bacula-fd
405 /sbin/chkconfig --add bacula-sd
407 # add execute permissions for console
408 chmod 0755 /usr/sbin/gnome-console
410 # grant privileges and create tables
411 # this will error out harmlessly if tables already exist
412 echo "Granting privileges for MySQL user bacula..."
413 /etc/bacula/grant_mysql_privileges
414 echo "Creating MySQL bacula database..."
415 /etc/bacula/create_mysql_database
416 echo "Creating bacula tables..."
417 /etc/bacula/make_mysql_tables
421 /sbin/chkconfig --del bacula-dir
422 /sbin/chkconfig --del bacula-fd
423 /sbin/chkconfig --del bacula-sd
428 %defattr(-,root,root)
430 %attr(0754,root,root) /etc/bacula/bacula
431 %attr(0754,root,root) /etc/bacula/console
432 %attr(0754,root,root) /etc/bacula/fd
433 %attr(0754,root,root) /etc/bacula/gconsole
434 %attr(0754,root,root) /etc/bacula/create_sqlite_database
435 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
436 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
437 %attr(0754,root,root) /etc/bacula/drop_sqlite_tables
438 %attr(0754,root,root) /etc/bacula/make_bacula_tables
439 %attr(0754,root,root) /etc/bacula/make_catalog_backup
440 %attr(0754,root,root) /etc/bacula/make_sqlite_tables
441 %attr(0754,root,root) /etc/bacula/mtx-changer
442 %attr(0754,root,root) /etc/init.d/bacula-dir
443 %attr(0754,root,root) /etc/init.d/bacula-fd
444 %attr(0754,root,root) /etc/init.d/bacula-sd
446 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
447 %attr(0644,root,root) /usr/man/man1/*
448 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
449 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
450 %attr(0644,root,root) /usr/share/applications/bacula.desktop
451 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
452 %attr(0644,root,root) /etc/logrotate.d/bacula
454 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
455 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
456 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
457 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
458 %attr(0640,root,root) /etc/bacula/query.sql
459 %attr(0640,root,root) /usr/lib/sqlite/libsqlite.a
460 %attr(0640,root,root) /usr/lib/sqlite/sqlite.h
461 %attr(0640,root,root) %dir /var/bacula
463 %attr(0750,root,root) /usr/sbin/*
464 %attr(0750,root,root) /usr/lib/sqlite/sqlite
467 # delete then add our links
468 /sbin/chkconfig --del bacula-dir
469 /sbin/chkconfig --del bacula-fd
470 /sbin/chkconfig --del bacula-sd
471 /sbin/chkconfig --add bacula-dir
472 /sbin/chkconfig --add bacula-fd
473 /sbin/chkconfig --add bacula-sd
475 # add execute permission for console
476 chmod 0755 /usr/sbin/gnome-console
478 # create the database and tables
479 echo "Creating SQLite database..."
480 /etc/bacula/create_sqlite_database
481 echo "Creating the SQLite tables..."
482 /etc/bacula/make_sqlite_tables
486 /sbin/chkconfig --del bacula-dir
487 /sbin/chkconfig --del bacula-fd
488 /sbin/chkconfig --del bacula-sd
493 %defattr(-,root,root)
495 %attr(0754,root,root) /etc/bacula/fd
496 %attr(0754,root,root) /etc/init.d/bacula-fd
498 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
499 %attr(0644,root,root) /etc/logrotate.d/bacula
501 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
502 %attr(0640,root,root) %dir /var/bacula
504 %attr(0750,root,root) /usr/sbin/bacula-fd
505 %attr(0750,root,root) /usr/sbin/btraceback
506 %attr(0750,root,root) /usr/sbin/btraceback.gdb
507 %attr(0750,root,root) /usr/sbin/smtp
511 # delete then add our links
512 /sbin/chkconfig --del bacula-fd
513 /sbin/chkconfig --add bacula-fd
517 /sbin/chkconfig --del bacula-fd
520 %defattr(-,root,root)
521 %attr(0644,root,root) /etc/bacula/rescue/backup.etc.list
522 %attr(0754,root,root) /etc/bacula/rescue/format_floppy
523 %attr(0754,root,root) /etc/bacula/rescue/getdiskinfo
524 %attr(0754,root,root) /etc/bacula/rescue/make_rescue_disk
525 %attr(0754,root,root) /etc/bacula/rescue/restore_bacula
526 %attr(0754,root,root) /etc/bacula/rescue/restore_etc
527 %attr(0754,root,root) /etc/bacula/rescue/run_grub
528 %attr(0754,root,root) /etc/bacula/rescue/run_lilo
529 %attr(0644,root,root) /etc/bacula/rescue/sfdisk.bz2
530 %attr(0754,root,root) /etc/bacula/rescue/bacula-fd
531 /etc/bacula/rescue/tomsrtbt/*
534 # link our current installed conf file to the rescue directory
535 ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
538 echo "Ready to create the rescue files for this system."
539 echo "Press <enter> to continue..."
544 echo "Running getdiskinfo..."
545 cd /etc/bacula/rescue
550 echo "To create a boot disk run \"./install.s\" from the /etc/bacula/rescue/tomsrtbt/"
551 echo "directory. To make the bacula rescue disk run"
552 echo "\"./make_rescue_disk --copy-static-bacula --copy-etc-files\" "
553 echo "from the /etc/bacula/rescue directory. To recreate the rescue"
554 echo "information for this system run ./getdiskinfo again."
558 # remove the files created after the initial rpm installation
559 rm -f /etc/bacula/rescue/bacula-fd.conf
560 rm -f /etc/bacula/rescue/partition.*
561 rm -f /etc/bacula/rescue/format.*
562 rm -f /etc/bacula/rescue/mount_drives
563 rm -f /etc/bacula/rescue/start_network
564 rm -f /etc/bacula/rescue/sfdisk
565 rm -rf /etc/bacula/rescue/diskinfo/*
568 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
569 - added build configuration for SuSE.
570 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
571 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
572 - added patch for create_sqlite_database to fix the installed bindir
573 - added execute of create_sqlite_database to post of sqlite package
574 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
575 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
576 - added bacula-fd as Requires for rescue package
577 - added build tag for Fedora Core 1
578 - cleaned up dependancies for all builds
579 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
580 - removed rh_version from package names
581 - added platform build configuration section to beginning of file
582 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
583 - removed make_static_bacula script from rescue package install
584 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
585 - Added define at top of file for depkgs version
586 - Added rescue sub-package
587 - Moved requires statements into proper sub-package locations
588 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
589 - Corrected Requires for Gnome 1.4/2.0 builds
590 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
591 - Added separate Source declaration for depkgs
592 - added patch for make_catalog_backup script
593 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
594 - Misc changes to mysql/sqlite build and rh7/8 menu differences
595 - Added rh_version to sub-package names
596 - Added installed but missing file /etc/bacula/gconsole
597 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
598 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
599 - Update spec for version 1.31 and combine client
600 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>