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}
16 # Whitebox Enterprise build
18 %{?build_wb3:%define wb3 1}
21 # set mysql for MySQL support, leave unset for sqlite support
23 %{?build_mysql:%define mysql 1}
25 Summary: Bacula - The Network Backup Solution
29 Group: System Environment/Daemons
31 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
32 Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
33 Source2:http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/%{tomsrtbt}.tar.gz
34 BuildRoot: %{_tmppath}/%{name}-root
35 URL: http://www.bacula.org/
36 Vendor: The Bacula Team
37 Distribution: The Bacula Team
38 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
39 BuildRequires: readline-devel
41 BuildRequires: gtk+-devel >= 1.2
42 BuildRequires: gnome-libs-devel >= 1.4
44 BuildRequires: gtk2-devel >= 2.0
45 BuildRequires: libgnomeui-devel >= 2.0
48 BuildRequires: mysql-devel >= 3.23
52 Bacula - It comes by night and sucks the vital essence from your computers.
54 Bacula is a set of computer programs that permit you (or the system
55 administrator) to manage backup, recovery, and verification of computer
56 data across a network of computers of different kinds. In technical terms,
57 it is a network client/server based backup program. Bacula is relatively
58 easy to use and efficient, while offering many advanced storage management
59 features that make it easy to find and recover lost or damaged files.
60 Bacula source code has been released under the GPL version 2 license.
68 Summary: Bacula - The Network Backup Solution
69 Group: System Environment/Daemons
73 Requires: gnome-libs >= 1.4
76 Requires: libgnomeui >= 2.0
79 Requires: mysql >= 3.23
80 Requires: mysql-server >= 3.23
89 Bacula - It comes by night and sucks the vital essence from your computers.
91 Bacula is a set of computer programs that permit you (or the system
92 administrator) to manage backup, recovery, and verification of computer
93 data across a network of computers of different kinds. In technical terms,
94 it is a network client/server based backup program. Bacula is relatively
95 easy to use and efficient, while offering many advanced storage management
96 features that make it easy to find and recover lost or damaged files.
97 Bacula source code has been released under the GPL version 2 license.
100 This build requires MySQL to be installed separately as the catalog database.
102 This build incorporates sqlite as the catalog database, statically compiled.
106 Summary: Bacula - The Network Backup Solution
107 Group: System Environment/Daemons
110 Requires: gtk+ >= 1.2
111 Requires: gnome-libs >= 1.4
113 Requires: gtk2 >= 2.0
114 Requires: libgnomeui >= 2.0
118 Bacula - It comes by night and sucks the vital essence from your computers.
120 Bacula is a set of computer programs that permit you (or the system
121 administrator) to manage backup, recovery, and verification of computer
122 data across a network of computers of different kinds. In technical terms,
123 it is a network client/server based backup program. Bacula is relatively
124 easy to use and efficient, while offering many advanced storage management
125 features that make it easy to find and recover lost or damaged files.
126 Bacula source code has been released under the GPL version 2 license.
128 This is the File daemon (Client) only package.
132 Summary: Bacula - The Network Backup Solution
133 Group: System Environment/Daemons
134 Requires: coreutils, util-linux, libc5
137 Bacula - It comes by night and sucks the vital essence from your computers.
139 Bacula is a set of computer programs that permit you (or the system
140 administrator) to manage backup, recovery, and verification of computer
141 data across a network of computers of different kinds. In technical terms,
142 it is a network client/server based backup program. Bacula is relatively
143 easy to use and efficient, while offering many advanced storage management
144 features that make it easy to find and recover lost or damaged files.
145 Bacula source code has been released under the GPL version 2 license.
147 This package installs scripts for disaster recovery and builds rescue
148 floppy disks for bare metal recovery. This package includes tomsrtbt
149 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool
150 to build a boot floppy disk.
152 You need to have the bacula-sqlite, bacula-mysql or bacula-client package for
153 your platform installed and configured before installing this package.
170 # patch the make_sqlite_tables script for installation bindir
171 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
173 # patch the make_catalog_backup script for installation bindir
174 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
178 --sbindir=/usr/sbin \
179 --sysconfdir=/etc/bacula \
180 --with-scriptdir=/etc/bacula \
181 --enable-smartalloc \
187 --with-sqlite=${cwd}/../depkgs/sqlite \
189 --with-working-dir=/var/bacula \
190 --with-pid-dir=/var/run \
191 --with-subsys-dir=/var/lock/subsys
195 strip static-bacula-fd
201 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
202 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
203 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
204 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
205 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
206 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue
207 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt
210 mkdir -p $RPM_BUILD_ROOT/usr/lib/sqlite
214 prefix=$RPM_BUILD_ROOT/usr \
215 sbindir=$RPM_BUILD_ROOT/usr/sbin \
216 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
217 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
218 working_dir=$RPM_BUILD_ROOT/var/bacula \
223 prefix=$RPM_BUILD_ROOT/usr \
224 sbindir=$RPM_BUILD_ROOT/usr/sbin \
225 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
226 working_dir=$RPM_BUILD_ROOT/var/bacula \
227 mandir=$RPM_BUILD_ROOT/usr/man \
232 # fixme - make installs the mysql scripts for sqlite build
233 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
234 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
235 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
238 # install the init scripts
239 cp platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
240 cp platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
241 cp platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
243 # install the menu stuff
244 cp scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
245 cp scripts/bacula.desktop.gnome1 $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
246 cp scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
250 cp ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite
251 cp ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite.h
252 cp ../depkgs/sqlite/libsqlite.a $RPM_BUILD_ROOT/usr/lib/sqlite/libsqlite.a
255 # install the logrotate file
256 cp scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
258 # install the rescue stuff
259 # these are the rescue scripts
260 cp rescue/linux/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/
261 cp rescue/linux/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/
262 cp rescue/linux/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/
263 cp rescue/linux/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/
264 cp rescue/linux/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/
265 cp rescue/linux/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/
266 cp rescue/linux/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/
267 cp rescue/linux/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/
268 cp rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/
270 # this is the static file daemon
271 cp src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/bacula-fd
273 # this is the tom's root boot disk
274 cp ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
277 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
282 %defattr(-,root,root)
284 %attr(0754,root,root) /etc/bacula/bacula
285 %attr(0754,root,root) /etc/bacula/console
286 %attr(0754,root,root) /etc/bacula/fd
287 %attr(0754,root,root) /etc/bacula/gconsole
288 %attr(0754,root,root) /etc/bacula/create_mysql_database
289 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
290 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
291 %attr(0754,root,root) /etc/bacula/drop_mysql_tables
292 %attr(0754,root,root) /etc/bacula/make_bacula_tables
293 %attr(0754,root,root) /etc/bacula/make_catalog_backup
294 %attr(0754,root,root) /etc/bacula/make_mysql_tables
295 %attr(0754,root,root) /etc/bacula/grant_mysql_privileges
296 %attr(0754,root,root) /etc/bacula/startmysql
297 %attr(0754,root,root) /etc/bacula/stopmysql
298 %attr(0754,root,root) /etc/bacula/mtx-changer
299 %attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
300 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
301 %attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
303 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
304 %attr(0644,root,root) /usr/man/man1/*
305 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
306 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
307 %attr(0644,root,root) /usr/share/applications/bacula.desktop
308 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
309 %attr(0644,root,root) /etc/logrotate.d/bacula
311 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
312 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
313 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
314 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
315 %attr(0640,root,root) /etc/bacula/query.sql
316 %attr(0640,root,root) %dir /var/bacula
318 %attr(0750,root,root) /usr/sbin/*
321 # delete then add our links
322 /sbin/chkconfig --del bacula-dir
323 /sbin/chkconfig --del bacula-fd
324 /sbin/chkconfig --del bacula-sd
325 /sbin/chkconfig --add bacula-dir
326 /sbin/chkconfig --add bacula-fd
327 /sbin/chkconfig --add bacula-sd
329 # add execute permissions for console
330 chmod 0755 /usr/sbin/gnome-console
332 # grant privileges and create tables
333 # this will error out harmlessly if tables already exist
334 echo "Granting privileges for MySQL user bacula..."
335 /etc/bacula/grant_mysql_privileges
336 echo "Creating MySQL bacula database..."
337 /etc/bacula/create_mysql_database
338 echo "Creating bacula tables..."
339 /etc/bacula/make_mysql_tables
343 /sbin/chkconfig --del bacula-dir
344 /sbin/chkconfig --del bacula-fd
345 /sbin/chkconfig --del bacula-sd
350 %defattr(-,root,root)
352 %attr(0754,root,root) /etc/bacula/bacula
353 %attr(0754,root,root) /etc/bacula/console
354 %attr(0754,root,root) /etc/bacula/fd
355 %attr(0754,root,root) /etc/bacula/gconsole
356 %attr(0754,root,root) /etc/bacula/create_sqlite_database
357 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
358 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
359 %attr(0754,root,root) /etc/bacula/drop_sqlite_tables
360 %attr(0754,root,root) /etc/bacula/make_bacula_tables
361 %attr(0754,root,root) /etc/bacula/make_catalog_backup
362 %attr(0754,root,root) /etc/bacula/make_sqlite_tables
363 %attr(0754,root,root) /etc/bacula/mtx-changer
364 %attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
365 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
366 %attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
368 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
369 %attr(0644,root,root) /usr/man/man1/*
370 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
371 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
372 %attr(0644,root,root) /usr/share/applications/bacula.desktop
373 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
374 %attr(0644,root,root) /etc/logrotate.d/bacula
376 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
377 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
378 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
379 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
380 %attr(0640,root,root) /etc/bacula/query.sql
381 %attr(0640,root,root) /usr/lib/sqlite/libsqlite.a
382 %attr(0640,root,root) /usr/lib/sqlite/sqlite.h
383 %attr(0640,root,root) %dir /var/bacula
385 %attr(0750,root,root) /usr/sbin/*
386 %attr(0750,root,root) /usr/lib/sqlite/sqlite
389 # delete then add our links
390 /sbin/chkconfig --del bacula-dir
391 /sbin/chkconfig --del bacula-fd
392 /sbin/chkconfig --del bacula-sd
393 /sbin/chkconfig --add bacula-dir
394 /sbin/chkconfig --add bacula-fd
395 /sbin/chkconfig --add bacula-sd
397 # add execute permission for console
398 chmod 0755 /usr/sbin/gnome-console
401 /etc/bacula/make_sqlite_tables
405 /sbin/chkconfig --del bacula-dir
406 /sbin/chkconfig --del bacula-fd
407 /sbin/chkconfig --del bacula-sd
412 %defattr(-,root,root)
414 %attr(0754,root,root) /etc/bacula/fd
415 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
417 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
418 %attr(0644,root,root) /etc/logrotate.d/bacula
420 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
421 %attr(0640,root,root) %dir /var/bacula
423 %attr(0750,root,root) /usr/sbin/bacula-fd
424 %attr(0750,root,root) /usr/sbin/btraceback
425 %attr(0750,root,root) /usr/sbin/btraceback.gdb
426 %attr(0750,root,root) /usr/sbin/smtp
430 # delete then add our links
431 /sbin/chkconfig --del bacula-fd
432 /sbin/chkconfig --add bacula-fd
436 /sbin/chkconfig --del bacula-fd
439 %defattr(-,root,root)
440 %attr(0644,root,root) /etc/bacula/rescue/backup.etc.list
441 %attr(0754,root,root) /etc/bacula/rescue/format_floppy
442 %attr(0754,root,root) /etc/bacula/rescue/getdiskinfo
443 %attr(0754,root,root) /etc/bacula/rescue/make_rescue_disk
444 %attr(0754,root,root) /etc/bacula/rescue/restore_bacula
445 %attr(0754,root,root) /etc/bacula/rescue/restore_etc
446 %attr(0754,root,root) /etc/bacula/rescue/run_grub
447 %attr(0754,root,root) /etc/bacula/rescue/run_lilo
448 %attr(0644,root,root) /etc/bacula/rescue/sfdisk.bz2
449 %attr(0754,root,root) /etc/bacula/rescue/bacula-fd
450 /etc/bacula/rescue/tomsrtbt/*
453 # link our current installed conf file to the rescue directory
454 ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
457 echo "Ready to create the rescue files for this system."
458 echo "Press <enter> to continue..."
463 echo "Running getdiskinfo..."
464 cd /etc/bacula/rescue
469 echo "To create a boot disk run \"./install.s\" from the /etc/bacula/rescue/tomsrtbt/"
470 echo "directory. To make the bacula rescue disk run"
471 echo "\"./make_rescue_disk --copy-static-bacula --copy-etc-files\" "
472 echo "from the /etc/bacula/rescue directory. To recreate the rescue"
473 echo "information for this system run ./getdiskinfo again."
477 # remove the files created after the initial rpm installation
478 rm -f /etc/bacula/rescue/bacula-fd.conf
479 rm -f /etc/bacula/rescue/partition.*
480 rm -f /etc/bacula/rescue/format.*
481 rm -f /etc/bacula/rescue/mount_drives
482 rm -f /etc/bacula/rescue/start_network
483 rm -f /etc/bacula/rescue/sfdisk
484 rm -rf /etc/bacula/rescue/diskinfo/*
487 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
488 - removed rh_version from package names
489 - added platform build configuration section to beginning of file
490 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
491 - removed make_static_bacula script from rescue package install
492 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
493 - Added define at top of file for depkgs version
494 - Added rescue sub-package
495 - Moved requires statements into proper sub-package locations
496 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
497 - Corrected Requires for Gnome 1.4/2.0 builds
498 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
499 - Added separate Source declaration for depkgs
500 - added patch for make_catalog_backup script
501 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
502 - Misc changes to mysql/sqlite build and rh7/8 menu differences
503 - Added rh_version to sub-package names
504 - Added installed but missing file /etc/bacula/gconsole
505 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
506 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
507 - Update spec for version 1.31 and combine client
508 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>