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 # set mysql for MySQL support, leave unset for sqlite support
26 %{?build_mysql:%define mysql 1}
28 Summary: Bacula - The Network Backup Solution
32 Group: System Environment/Daemons
34 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
35 Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
36 Source2:http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/%{tomsrtbt}.tar.gz
37 BuildRoot: %{_tmppath}/%{name}-root
38 URL: http://www.bacula.org/
39 Vendor: The Bacula Team
40 Distribution: The Bacula Team
41 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
42 BuildRequires: readline-devel, atk-devel, ncurses-devel, pango-devel
43 BuildRequires: libstdc++-devel, libtermcap-devel, libxml2-devel, zlib-devel
45 BuildRequires: gtk+-devel >= 1.2
46 BuildRequires: gnome-libs-devel >= 1.4
47 BuildRequires: glibc-devel >= 2.2
48 BuildRequires: ORBit-devel
49 BuildRequires: bonobo-devel
50 BuildRequires: GConf-devel
52 BuildRequires: gtk2-devel >= 2.0
53 BuildRequires: libgnomeui-devel >= 2.0
54 BuildRequires: glibc-devel >= 2.3
55 BuildRequires: ORBit2-devel
56 BuildRequires: libart_lgpl-devel >= 2.0
57 BuildRequires: libbonobo-devel >= 2.0
58 BuildRequires: libbonoboui-devel >= 2.0
59 BuildRequires: bonobo-activation-devel
60 BuildRequires: GConf2-devel
61 BuildRequires: linc-devel
65 BuildRequires: mysql-devel >= 3.23
69 Bacula - It comes by night and sucks the vital essence from your computers.
71 Bacula is a set of computer programs that permit you (or the system
72 administrator) to manage backup, recovery, and verification of computer
73 data across a network of computers of different kinds. In technical terms,
74 it is a network client/server based backup program. Bacula is relatively
75 easy to use and efficient, while offering many advanced storage management
76 features that make it easy to find and recover lost or damaged files.
77 Bacula source code has been released under the GPL version 2 license.
85 Summary: Bacula - The Network Backup Solution
86 Group: System Environment/Daemons
87 Provides: bacula-dir, bacula-sd, bacula-fd
88 Requires: readline, perl, atk, ncurses, pango, libstdc++
89 Requires: libtermcap, libxml2, zlib
92 Requires: gnome-libs >= 1.4
93 Requires: glibc >= 2.2
99 Requires: libgnomeui >= 2.0
100 Requires: glibc >= 2.3
102 Requires: libart_lgpl >= 2.0
103 Requires: libbonobo >= 2.0
104 Requires: libbonoboui >= 2.0
105 Requires: bonobo-activation
110 Requires: mysql >= 3.23
111 Requires: mysql-server >= 3.23
120 Bacula - It comes by night and sucks the vital essence from your computers.
122 Bacula is a set of computer programs that permit you (or the system
123 administrator) to manage backup, recovery, and verification of computer
124 data across a network of computers of different kinds. In technical terms,
125 it is a network client/server based backup program. Bacula is relatively
126 easy to use and efficient, while offering many advanced storage management
127 features that make it easy to find and recover lost or damaged files.
128 Bacula source code has been released under the GPL version 2 license.
131 This build requires MySQL to be installed separately as the catalog database.
133 This build incorporates sqlite as the catalog database, statically compiled.
137 Summary: Bacula - The Network Backup Solution
138 Group: System Environment/Daemons
140 Requires: readline, perl, libstdc++, zlib
142 Requires: gtk+ >= 1.2
143 Requires: gnome-libs >= 1.4
144 Requires: glibc >= 2.2
146 Requires: gtk2 >= 2.0
147 Requires: libgnomeui >= 2.0
148 Requires: glibc >= 2.3
152 Bacula - It comes by night and sucks the vital essence from your computers.
154 Bacula is a set of computer programs that permit you (or the system
155 administrator) to manage backup, recovery, and verification of computer
156 data across a network of computers of different kinds. In technical terms,
157 it is a network client/server based backup program. Bacula is relatively
158 easy to use and efficient, while offering many advanced storage management
159 features that make it easy to find and recover lost or damaged files.
160 Bacula source code has been released under the GPL version 2 license.
162 This is the File daemon (Client) only package.
166 Summary: Bacula - The Network Backup Solution
167 Group: System Environment/Daemons
168 Requires: coreutils, util-linux, libc5, bacula-fd
171 Bacula - It comes by night and sucks the vital essence from your computers.
173 Bacula is a set of computer programs that permit you (or the system
174 administrator) to manage backup, recovery, and verification of computer
175 data across a network of computers of different kinds. In technical terms,
176 it is a network client/server based backup program. Bacula is relatively
177 easy to use and efficient, while offering many advanced storage management
178 features that make it easy to find and recover lost or damaged files.
179 Bacula source code has been released under the GPL version 2 license.
181 This package installs scripts for disaster recovery and builds rescue
182 floppy disks for bare metal recovery. This package includes tomsrtbt
183 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool
184 to build a boot floppy disk.
186 You need to have the bacula-sqlite, bacula-mysql or bacula-client package for
187 your platform installed and configured before installing this package.
204 # patch the make_sqlite_tables script for installation bindir
205 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
207 # patch the create_sqlite_database script for installation bindir
208 patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
210 # patch the make_catalog_backup script for installation bindir
211 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
215 --sbindir=/usr/sbin \
216 --sysconfdir=/etc/bacula \
217 --with-scriptdir=/etc/bacula \
218 --enable-smartalloc \
224 --with-sqlite=${cwd}/../depkgs/sqlite \
226 --with-working-dir=/var/bacula \
227 --with-pid-dir=/var/run \
228 --with-subsys-dir=/var/lock/subsys
232 strip static-bacula-fd
238 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
239 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
240 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
241 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
242 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
243 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue
244 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt
247 mkdir -p $RPM_BUILD_ROOT/usr/lib/sqlite
251 prefix=$RPM_BUILD_ROOT/usr \
252 sbindir=$RPM_BUILD_ROOT/usr/sbin \
253 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
254 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
255 working_dir=$RPM_BUILD_ROOT/var/bacula \
260 prefix=$RPM_BUILD_ROOT/usr \
261 sbindir=$RPM_BUILD_ROOT/usr/sbin \
262 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
263 working_dir=$RPM_BUILD_ROOT/var/bacula \
264 mandir=$RPM_BUILD_ROOT/usr/man \
269 # fixme - make installs the mysql scripts for sqlite build
270 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
271 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
272 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
275 # install the init scripts
276 cp platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
277 cp platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
278 cp platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
280 # install the menu stuff
281 cp scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
282 cp scripts/bacula.desktop.gnome1 $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
283 cp scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
287 cp ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite
288 cp ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite.h
289 cp ../depkgs/sqlite/libsqlite.a $RPM_BUILD_ROOT/usr/lib/sqlite/libsqlite.a
292 # install the logrotate file
293 cp scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
295 # install the rescue stuff
296 # these are the rescue scripts
297 cp rescue/linux/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/
298 cp rescue/linux/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/
299 cp rescue/linux/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/
300 cp rescue/linux/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/
301 cp rescue/linux/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/
302 cp rescue/linux/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/
303 cp rescue/linux/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/
304 cp rescue/linux/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/
305 cp rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/
307 # this is the static file daemon
308 cp src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/bacula-fd
310 # this is the tom's root boot disk
311 cp ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
314 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
319 %defattr(-,root,root)
321 %attr(0754,root,root) /etc/bacula/bacula
322 %attr(0754,root,root) /etc/bacula/console
323 %attr(0754,root,root) /etc/bacula/fd
324 %attr(0754,root,root) /etc/bacula/gconsole
325 %attr(0754,root,root) /etc/bacula/create_mysql_database
326 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
327 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
328 %attr(0754,root,root) /etc/bacula/drop_mysql_tables
329 %attr(0754,root,root) /etc/bacula/make_bacula_tables
330 %attr(0754,root,root) /etc/bacula/make_catalog_backup
331 %attr(0754,root,root) /etc/bacula/make_mysql_tables
332 %attr(0754,root,root) /etc/bacula/grant_mysql_privileges
333 %attr(0754,root,root) /etc/bacula/startmysql
334 %attr(0754,root,root) /etc/bacula/stopmysql
335 %attr(0754,root,root) /etc/bacula/mtx-changer
336 %attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
337 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
338 %attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
340 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
341 %attr(0644,root,root) /usr/man/man1/*
342 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
343 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
344 %attr(0644,root,root) /usr/share/applications/bacula.desktop
345 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
346 %attr(0644,root,root) /etc/logrotate.d/bacula
348 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
349 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
350 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
351 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
352 %attr(0640,root,root) /etc/bacula/query.sql
353 %attr(0640,root,root) %dir /var/bacula
355 %attr(0750,root,root) /usr/sbin/*
358 # delete then add our links
359 /sbin/chkconfig --del bacula-dir
360 /sbin/chkconfig --del bacula-fd
361 /sbin/chkconfig --del bacula-sd
362 /sbin/chkconfig --add bacula-dir
363 /sbin/chkconfig --add bacula-fd
364 /sbin/chkconfig --add bacula-sd
366 # add execute permissions for console
367 chmod 0755 /usr/sbin/gnome-console
369 # grant privileges and create tables
370 # this will error out harmlessly if tables already exist
371 echo "Granting privileges for MySQL user bacula..."
372 /etc/bacula/grant_mysql_privileges
373 echo "Creating MySQL bacula database..."
374 /etc/bacula/create_mysql_database
375 echo "Creating bacula tables..."
376 /etc/bacula/make_mysql_tables
380 /sbin/chkconfig --del bacula-dir
381 /sbin/chkconfig --del bacula-fd
382 /sbin/chkconfig --del bacula-sd
387 %defattr(-,root,root)
389 %attr(0754,root,root) /etc/bacula/bacula
390 %attr(0754,root,root) /etc/bacula/console
391 %attr(0754,root,root) /etc/bacula/fd
392 %attr(0754,root,root) /etc/bacula/gconsole
393 %attr(0754,root,root) /etc/bacula/create_sqlite_database
394 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
395 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
396 %attr(0754,root,root) /etc/bacula/drop_sqlite_tables
397 %attr(0754,root,root) /etc/bacula/make_bacula_tables
398 %attr(0754,root,root) /etc/bacula/make_catalog_backup
399 %attr(0754,root,root) /etc/bacula/make_sqlite_tables
400 %attr(0754,root,root) /etc/bacula/mtx-changer
401 %attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
402 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
403 %attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
405 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
406 %attr(0644,root,root) /usr/man/man1/*
407 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
408 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
409 %attr(0644,root,root) /usr/share/applications/bacula.desktop
410 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
411 %attr(0644,root,root) /etc/logrotate.d/bacula
413 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
414 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
415 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
416 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
417 %attr(0640,root,root) /etc/bacula/query.sql
418 %attr(0640,root,root) /usr/lib/sqlite/libsqlite.a
419 %attr(0640,root,root) /usr/lib/sqlite/sqlite.h
420 %attr(0640,root,root) %dir /var/bacula
422 %attr(0750,root,root) /usr/sbin/*
423 %attr(0750,root,root) /usr/lib/sqlite/sqlite
426 # delete then add our links
427 /sbin/chkconfig --del bacula-dir
428 /sbin/chkconfig --del bacula-fd
429 /sbin/chkconfig --del bacula-sd
430 /sbin/chkconfig --add bacula-dir
431 /sbin/chkconfig --add bacula-fd
432 /sbin/chkconfig --add bacula-sd
434 # add execute permission for console
435 chmod 0755 /usr/sbin/gnome-console
437 # create the database and tables
438 echo "Creating SQLite database..."
439 /etc/bacula/create_sqlite_database
440 echo "Creating the SQLite tables..."
441 /etc/bacula/make_sqlite_tables
445 /sbin/chkconfig --del bacula-dir
446 /sbin/chkconfig --del bacula-fd
447 /sbin/chkconfig --del bacula-sd
452 %defattr(-,root,root)
454 %attr(0754,root,root) /etc/bacula/fd
455 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
457 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
458 %attr(0644,root,root) /etc/logrotate.d/bacula
460 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
461 %attr(0640,root,root) %dir /var/bacula
463 %attr(0750,root,root) /usr/sbin/bacula-fd
464 %attr(0750,root,root) /usr/sbin/btraceback
465 %attr(0750,root,root) /usr/sbin/btraceback.gdb
466 %attr(0750,root,root) /usr/sbin/smtp
470 # delete then add our links
471 /sbin/chkconfig --del bacula-fd
472 /sbin/chkconfig --add bacula-fd
476 /sbin/chkconfig --del bacula-fd
479 %defattr(-,root,root)
480 %attr(0644,root,root) /etc/bacula/rescue/backup.etc.list
481 %attr(0754,root,root) /etc/bacula/rescue/format_floppy
482 %attr(0754,root,root) /etc/bacula/rescue/getdiskinfo
483 %attr(0754,root,root) /etc/bacula/rescue/make_rescue_disk
484 %attr(0754,root,root) /etc/bacula/rescue/restore_bacula
485 %attr(0754,root,root) /etc/bacula/rescue/restore_etc
486 %attr(0754,root,root) /etc/bacula/rescue/run_grub
487 %attr(0754,root,root) /etc/bacula/rescue/run_lilo
488 %attr(0644,root,root) /etc/bacula/rescue/sfdisk.bz2
489 %attr(0754,root,root) /etc/bacula/rescue/bacula-fd
490 /etc/bacula/rescue/tomsrtbt/*
493 # link our current installed conf file to the rescue directory
494 ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
497 echo "Ready to create the rescue files for this system."
498 echo "Press <enter> to continue..."
503 echo "Running getdiskinfo..."
504 cd /etc/bacula/rescue
509 echo "To create a boot disk run \"./install.s\" from the /etc/bacula/rescue/tomsrtbt/"
510 echo "directory. To make the bacula rescue disk run"
511 echo "\"./make_rescue_disk --copy-static-bacula --copy-etc-files\" "
512 echo "from the /etc/bacula/rescue directory. To recreate the rescue"
513 echo "information for this system run ./getdiskinfo again."
517 # remove the files created after the initial rpm installation
518 rm -f /etc/bacula/rescue/bacula-fd.conf
519 rm -f /etc/bacula/rescue/partition.*
520 rm -f /etc/bacula/rescue/format.*
521 rm -f /etc/bacula/rescue/mount_drives
522 rm -f /etc/bacula/rescue/start_network
523 rm -f /etc/bacula/rescue/sfdisk
524 rm -rf /etc/bacula/rescue/diskinfo/*
527 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
528 - added patch for create_sqlite_database to fix the installed bindir
529 - added execute of create_sqlite_database to post of sqlite package
530 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
531 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
532 - added bacula-fd as Requires for rescue package
533 - added build tag for Fedora Core 1
534 - cleaned up dependancies for all builds
535 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
536 - removed rh_version from package names
537 - added platform build configuration section to beginning of file
538 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
539 - removed make_static_bacula script from rescue package install
540 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
541 - Added define at top of file for depkgs version
542 - Added rescue sub-package
543 - Moved requires statements into proper sub-package locations
544 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
545 - Corrected Requires for Gnome 1.4/2.0 builds
546 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
547 - Added separate Source declaration for depkgs
548 - added patch for make_catalog_backup script
549 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
550 - Misc changes to mysql/sqlite build and rh7/8 menu differences
551 - Added rh_version to sub-package names
552 - Added installed but missing file /etc/bacula/gconsole
553 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
554 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
555 - Update spec for version 1.31 and combine client
556 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>