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 >= 2.0
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 >= 2.0
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 make_catalog_backup script for installation bindir
208 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
212 --sbindir=/usr/sbin \
213 --sysconfdir=/etc/bacula \
214 --with-scriptdir=/etc/bacula \
215 --enable-smartalloc \
221 --with-sqlite=${cwd}/../depkgs/sqlite \
223 --with-working-dir=/var/bacula \
224 --with-pid-dir=/var/run \
225 --with-subsys-dir=/var/lock/subsys
229 strip static-bacula-fd
235 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
236 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
237 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
238 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
239 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
240 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue
241 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt
244 mkdir -p $RPM_BUILD_ROOT/usr/lib/sqlite
248 prefix=$RPM_BUILD_ROOT/usr \
249 sbindir=$RPM_BUILD_ROOT/usr/sbin \
250 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
251 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
252 working_dir=$RPM_BUILD_ROOT/var/bacula \
257 prefix=$RPM_BUILD_ROOT/usr \
258 sbindir=$RPM_BUILD_ROOT/usr/sbin \
259 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
260 working_dir=$RPM_BUILD_ROOT/var/bacula \
261 mandir=$RPM_BUILD_ROOT/usr/man \
266 # fixme - make installs the mysql scripts for sqlite build
267 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
268 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
269 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
272 # install the init scripts
273 cp platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
274 cp platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
275 cp platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
277 # install the menu stuff
278 cp scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
279 cp scripts/bacula.desktop.gnome1 $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
280 cp scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
284 cp ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite
285 cp ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite.h
286 cp ../depkgs/sqlite/libsqlite.a $RPM_BUILD_ROOT/usr/lib/sqlite/libsqlite.a
289 # install the logrotate file
290 cp scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
292 # install the rescue stuff
293 # these are the rescue scripts
294 cp rescue/linux/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/
295 cp rescue/linux/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/
296 cp rescue/linux/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/
297 cp rescue/linux/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/
298 cp rescue/linux/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/
299 cp rescue/linux/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/
300 cp rescue/linux/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/
301 cp rescue/linux/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/
302 cp rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/
304 # this is the static file daemon
305 cp src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/bacula-fd
307 # this is the tom's root boot disk
308 cp ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
311 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
316 %defattr(-,root,root)
318 %attr(0754,root,root) /etc/bacula/bacula
319 %attr(0754,root,root) /etc/bacula/console
320 %attr(0754,root,root) /etc/bacula/fd
321 %attr(0754,root,root) /etc/bacula/gconsole
322 %attr(0754,root,root) /etc/bacula/create_mysql_database
323 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
324 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
325 %attr(0754,root,root) /etc/bacula/drop_mysql_tables
326 %attr(0754,root,root) /etc/bacula/make_bacula_tables
327 %attr(0754,root,root) /etc/bacula/make_catalog_backup
328 %attr(0754,root,root) /etc/bacula/make_mysql_tables
329 %attr(0754,root,root) /etc/bacula/grant_mysql_privileges
330 %attr(0754,root,root) /etc/bacula/startmysql
331 %attr(0754,root,root) /etc/bacula/stopmysql
332 %attr(0754,root,root) /etc/bacula/mtx-changer
333 %attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
334 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
335 %attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
337 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
338 %attr(0644,root,root) /usr/man/man1/*
339 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
340 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
341 %attr(0644,root,root) /usr/share/applications/bacula.desktop
342 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
343 %attr(0644,root,root) /etc/logrotate.d/bacula
345 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
346 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
347 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
348 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
349 %attr(0640,root,root) /etc/bacula/query.sql
350 %attr(0640,root,root) %dir /var/bacula
352 %attr(0750,root,root) /usr/sbin/*
355 # delete then add our links
356 /sbin/chkconfig --del bacula-dir
357 /sbin/chkconfig --del bacula-fd
358 /sbin/chkconfig --del bacula-sd
359 /sbin/chkconfig --add bacula-dir
360 /sbin/chkconfig --add bacula-fd
361 /sbin/chkconfig --add bacula-sd
363 # add execute permissions for console
364 chmod 0755 /usr/sbin/gnome-console
366 # grant privileges and create tables
367 # this will error out harmlessly if tables already exist
368 echo "Granting privileges for MySQL user bacula..."
369 /etc/bacula/grant_mysql_privileges
370 echo "Creating MySQL bacula database..."
371 /etc/bacula/create_mysql_database
372 echo "Creating bacula tables..."
373 /etc/bacula/make_mysql_tables
377 /sbin/chkconfig --del bacula-dir
378 /sbin/chkconfig --del bacula-fd
379 /sbin/chkconfig --del bacula-sd
384 %defattr(-,root,root)
386 %attr(0754,root,root) /etc/bacula/bacula
387 %attr(0754,root,root) /etc/bacula/console
388 %attr(0754,root,root) /etc/bacula/fd
389 %attr(0754,root,root) /etc/bacula/gconsole
390 %attr(0754,root,root) /etc/bacula/create_sqlite_database
391 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
392 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
393 %attr(0754,root,root) /etc/bacula/drop_sqlite_tables
394 %attr(0754,root,root) /etc/bacula/make_bacula_tables
395 %attr(0754,root,root) /etc/bacula/make_catalog_backup
396 %attr(0754,root,root) /etc/bacula/make_sqlite_tables
397 %attr(0754,root,root) /etc/bacula/mtx-changer
398 %attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
399 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
400 %attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
402 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
403 %attr(0644,root,root) /usr/man/man1/*
404 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
405 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
406 %attr(0644,root,root) /usr/share/applications/bacula.desktop
407 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
408 %attr(0644,root,root) /etc/logrotate.d/bacula
410 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
411 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
412 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
413 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
414 %attr(0640,root,root) /etc/bacula/query.sql
415 %attr(0640,root,root) /usr/lib/sqlite/libsqlite.a
416 %attr(0640,root,root) /usr/lib/sqlite/sqlite.h
417 %attr(0640,root,root) %dir /var/bacula
419 %attr(0750,root,root) /usr/sbin/*
420 %attr(0750,root,root) /usr/lib/sqlite/sqlite
423 # delete then add our links
424 /sbin/chkconfig --del bacula-dir
425 /sbin/chkconfig --del bacula-fd
426 /sbin/chkconfig --del bacula-sd
427 /sbin/chkconfig --add bacula-dir
428 /sbin/chkconfig --add bacula-fd
429 /sbin/chkconfig --add bacula-sd
431 # add execute permission for console
432 chmod 0755 /usr/sbin/gnome-console
435 /etc/bacula/make_sqlite_tables
439 /sbin/chkconfig --del bacula-dir
440 /sbin/chkconfig --del bacula-fd
441 /sbin/chkconfig --del bacula-sd
446 %defattr(-,root,root)
448 %attr(0754,root,root) /etc/bacula/fd
449 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
451 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
452 %attr(0644,root,root) /etc/logrotate.d/bacula
454 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
455 %attr(0640,root,root) %dir /var/bacula
457 %attr(0750,root,root) /usr/sbin/bacula-fd
458 %attr(0750,root,root) /usr/sbin/btraceback
459 %attr(0750,root,root) /usr/sbin/btraceback.gdb
460 %attr(0750,root,root) /usr/sbin/smtp
464 # delete then add our links
465 /sbin/chkconfig --del bacula-fd
466 /sbin/chkconfig --add bacula-fd
470 /sbin/chkconfig --del bacula-fd
473 %defattr(-,root,root)
474 %attr(0644,root,root) /etc/bacula/rescue/backup.etc.list
475 %attr(0754,root,root) /etc/bacula/rescue/format_floppy
476 %attr(0754,root,root) /etc/bacula/rescue/getdiskinfo
477 %attr(0754,root,root) /etc/bacula/rescue/make_rescue_disk
478 %attr(0754,root,root) /etc/bacula/rescue/restore_bacula
479 %attr(0754,root,root) /etc/bacula/rescue/restore_etc
480 %attr(0754,root,root) /etc/bacula/rescue/run_grub
481 %attr(0754,root,root) /etc/bacula/rescue/run_lilo
482 %attr(0644,root,root) /etc/bacula/rescue/sfdisk.bz2
483 %attr(0754,root,root) /etc/bacula/rescue/bacula-fd
484 /etc/bacula/rescue/tomsrtbt/*
487 # link our current installed conf file to the rescue directory
488 ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
491 echo "Ready to create the rescue files for this system."
492 echo "Press <enter> to continue..."
497 echo "Running getdiskinfo..."
498 cd /etc/bacula/rescue
503 echo "To create a boot disk run \"./install.s\" from the /etc/bacula/rescue/tomsrtbt/"
504 echo "directory. To make the bacula rescue disk run"
505 echo "\"./make_rescue_disk --copy-static-bacula --copy-etc-files\" "
506 echo "from the /etc/bacula/rescue directory. To recreate the rescue"
507 echo "information for this system run ./getdiskinfo again."
511 # remove the files created after the initial rpm installation
512 rm -f /etc/bacula/rescue/bacula-fd.conf
513 rm -f /etc/bacula/rescue/partition.*
514 rm -f /etc/bacula/rescue/format.*
515 rm -f /etc/bacula/rescue/mount_drives
516 rm -f /etc/bacula/rescue/start_network
517 rm -f /etc/bacula/rescue/sfdisk
518 rm -rf /etc/bacula/rescue/diskinfo/*
521 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
522 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
523 - added bacula-fd as Requires for rescue package
524 - added build tag for Fedora Core 1
525 - cleaned up dependancies for all builds
526 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
527 - removed rh_version from package names
528 - added platform build configuration section to beginning of file
529 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
530 - removed make_static_bacula script from rescue package install
531 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
532 - Added define at top of file for depkgs version
533 - Added rescue sub-package
534 - Moved requires statements into proper sub-package locations
535 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
536 - Corrected Requires for Gnome 1.4/2.0 builds
537 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
538 - Added separate Source declaration for depkgs
539 - added patch for make_catalog_backup script
540 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
541 - Misc changes to mysql/sqlite build and rh7/8 menu differences
542 - Added rh_version to sub-package names
543 - Added installed but missing file /etc/bacula/gconsole
544 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
545 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
546 - Update spec for version 1.31 and combine client
547 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>