5 Summary: Bacula - The Network Backup Solution
10 Group: Networking/Utilities
12 Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
13 # Source0-md5: 9de593cb206df126a8e27774281c5bf6
14 Source1: http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/tomsrtbt-2.0.103.tar.gz
15 # Source1-md5: d5ee50efb28986d564547d5da5de2483
16 Source2: %{name}-manpages.tar.bz2
17 # Source2-md5: e4dae86d6574b360e831efd3913e7f4c
18 Source10: %{name}-dir.init
19 Source11: %{name}-fd.init
20 Source12: %{name}-sd.init
21 Source13: %{name}.logrotate
22 URL: http://www.bacula.org/
24 BuildRequires: wxGTK2-devel
25 BuildRequires: openssl-devel
26 BuildRequires: pkgconfig
27 BuildRequires: ncurses-devel
28 BuildRequires: readline-devel
29 BuildRequires: sqlite2-devel
30 BuildRequires: libwrap-devel
31 BuildRequires: zlib-devel
32 BuildRequires: acl-devel
33 BuildRequires: libstdc++-devel
34 BuildRequires: glibc-static
35 BuildRequires: acl-static
36 BuildRequires: libwrap-static
37 BuildRequires: libstdc++-static
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 %define _sysconfdir /etc/%{name}
43 Bacula - It comes by night and sucks the vital essence from your
46 Bacula is a set of computer programs that permit you (or the system
47 administrator) to manage backup, recovery, and verification of
48 computer data across a network of computers of different kinds. In
49 technical terms, it is a network client/server based backup program.
50 Bacula is relatively easy to use and efficient, while offering many
51 advanced storage management features that make it easy to find and
52 recover lost or damaged files.
55 Summary: Common files for bacula package
56 Group: Networking/Utilities
57 Conflicts: bacula-dir < %{epoch}:%{version}-%{release}
58 Conflicts: bacula-fd < %{epoch}:%{version}-%{release}
59 Conflicts: bacula-sd < %{epoch}:%{version}-%{release}
60 Conflicts: bacula-console < %{epoch}:%{version}-%{release}
63 Bacula - It comes by night and sucks the vital essence from your
66 Bacula is a set of computer programs that permit you (or the system
67 administrator) to manage backup, recovery, and verification of
68 computer data across a network of computers of different kinds. In
69 technical terms, it is a network client/server based backup program.
70 Bacula is relatively easy to use and efficient, while offering many
71 advanced storage management features that make it easy to find and
72 recover lost or damaged files.
75 Summary: Bacula Director and Catalog services
76 Group: Networking/Utilities
77 Prereq: bacula-common = %{epoch}:%{version}-%{release}
80 Bacula - It comes by night and sucks the vital essence from your
83 Bacula Director is the program that supervises all the backup,
84 restore, verify and archive operations. The system administrator uses
85 the Bacula Director to schedule backups and to recover files. Catalog
86 services are comprised of the software programs responsible for
87 maintaining the file indexes and volume databases for all files backed
88 up. The Catalog services permit the System Administrator or user to
89 quickly locate and restore any desired file, since it maintains a
90 record of all Volumes used, all Jobs run, and all Files saved. This
91 build requires sqlite to be installed separately as the catalog
95 Summary: Bacula Console
96 Group: Networking/Utilities
97 Prereq: bacula-common = %{epoch}:%{version}-%{release}
100 Bacula - It comes by night and sucks the vital essence from your
103 Bacula Console is the program that allows the administrator or user to
104 communicate with the Bacula Director. This is the text only console
108 Summary: Bacula wxWindows Console
109 Group: Networking/Utilities
110 Prereq: bacula-common = %{epoch}:%{version}-%{release}
112 %description console-wx
113 Bacula - It comes by night and sucks the vital essence from your
116 Bacula Console is the program that allows the administrator or user to
117 communicate with the Bacula Director. This is the wxWindows GUI
121 Summary: Bacula File services (Client)
122 Group: Networking/Utilities
123 Prereq: bacula-common = %{epoch}:%{version}-%{release}
126 Bacula - It comes by night and sucks the vital essence from your
129 Bacula File services (or Client program) is the software program that
130 is installed on the machine to be backed up. It is specific to the
131 operating system on which it runs and is responsible for providing the
132 file attributes and data when requested by the Director. The File
133 services are also responsible for the file system dependent part of
134 restoring the file attributes and data during a recovery operation.
135 This program runs as a daemon on the machine to be backed up, and in
136 some of the documentation, the File daemon is referred to as the
137 Client (for example in Bacula configuration file).
140 Summary: Bacula Storage services
141 Group: Networking/Utilities
142 Prereq: bacula-common = %{epoch}:%{version}-%{release}
145 Bacula - It comes by night and sucks the vital essence from your
148 Bacula Storage services consist of the software programs that perform
149 the storage and recovery of the file attributes and data to the
150 physical backup media or volumes. In other words, the Storage daemon
151 is responsible for reading and writing your tapes (or other storage
152 media, e.g. files). The Storage services runs as a daemon on the
153 machine that has the backup device (usually a tape drive).
156 Summary: Bacula - The Network Backup Solution
157 Group: Networking/Utilities
163 Bacula - It comes by night and sucks the vital essence from your
166 Bacula is a set of computer programs that permit you (or the system
167 administrator) to manage backup, recovery, and verification of
168 computer data across a network of computers of different kinds. In
169 technical terms, it is a network client/server based backup program.
170 Bacula is relatively easy to use and efficient, while offering many
171 advanced storage management features that make it easy to find and
172 recover lost or damaged files. Bacula source code has been released
173 under the GPL version 2 license.
175 This package installs scripts for disaster recovery and builds rescue
176 floppy disks for bare metal recovery. This package includes tomsrtbt
177 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a
178 tool to build a boot floppy disk.
180 To create a boot disk run "./getdiskinfo" from the
181 %{_sysconfdir}/rescue directory (this is done when the package is
182 first installed), then run "./install.s" from the
183 %{_sysconfdir}/rescue/tomsrtbt/ directory. To make the bacula rescue
184 disk run "./make_rescue_disk --copy-static-bacula
185 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
186 recreate the rescue information for this system run ./getdiskinfo
190 Summary: Bacula - The Network Backup Solution
191 Group: Networking/Utilities
193 %description updatedb
194 Bacula - It comes by night and sucks the vital essence from your
197 Bacula is a set of computer programs that permit you (or the system
198 administrator) to manage backup, recovery, and verification of
199 computer data across a network of computers of different kinds. In
200 technical terms, it is a network client/server based backup program.
201 Bacula is relatively easy to use and efficient, while offering many
202 advanced storage management features that make it easy to find and
203 recover lost or damaged files. Bacula source code has been released
204 under the GPL version 2 license.
206 This package installs scripts for updating older versions of the
211 sed -i -e 's#wx-config#wxgtk2-2.4-config#g' configure*
212 sed -i -e 's#-lreadline -ltermcap#-lreadline#g' configure*
215 # patches for the bundled sqlite scripts
216 # patch the make_sqlite_tables script for installation bindir
217 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
218 # patch the create_sqlite_database script for installation bindir
219 patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
220 # patch the make_catalog_backup script for installation bindir
221 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
222 # patch the update_sqlite_tables script for installation bindir
223 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
225 CPPFLAGS="-I%{_includedir}/ncurses -I%{_includedir}/readline"
227 --with-scriptdir=%{_libexecdir}/%{name} \
230 --enable-smartalloc \
231 --enable-wx-console \
233 --with-tcp-wrappers \
234 --with-working-dir=%{_var}/lib/%{name} \
235 --with-dump-email="root@localhost" \
236 --with-job-email="root@localhost" \
237 --with-smtp-host=localhost \
238 --with-pid-dir=/var/run \
239 --with-subsys-dir=/var/lock/subsys \
242 --with-dir-password="#FAKE#DIR#PASSWORD#" \
243 --with-fd-password="#FAKE#FD#PASSWORD#" \
244 --with-sd-password="#FAKE#SD#PASSWORD#"
249 rm -rf $RPM_BUILD_ROOT
251 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,security/console.apps}
252 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rescue/tomsrtbt,updatedb}
253 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
256 DESTDIR=$RPM_BUILD_ROOT
259 strip src/filed/static-bacula-fd
260 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
262 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
263 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
264 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
265 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
267 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
269 # install the rescue stuff, these are the rescue scripts
270 install rescue/linux/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
271 install rescue/linux/format_floppy $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
272 install rescue/linux/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
273 install rescue/linux/make_rescue_disk $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
274 install rescue/linux/restore_bacula $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
275 install rescue/linux/restore_etc $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
276 install rescue/linux/run_grub $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
277 install rescue/linux/run_lilo $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
278 install rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
280 # this is the tom's root boot disk
281 install tomsrtbt-*/* $RPM_BUILD_ROOT%{_sysconfdir}/rescue/tomsrtbt/
283 # install the updatedb scripts
284 install updatedb/* $RPM_BUILD_ROOT%{_sysconfdir}/updatedb/
287 install -d html-manual
288 cp -a doc/html-manual/*.{html,jpg,gif,css} html-manual/
291 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/{gconsole,startmysql,stopmysql}
294 # FIXME: dodawanie usera bacula /var/lib/bacula /bin/false
297 # FIXME: del usera bacula
301 [ -s %{_localstatedir}/%{name}/bacula.db ] && \
302 DB_VER=`echo "select * from Version;" | \
303 sqlite %{_localstatedir}/%{name}/bacula.db | tail -n 1 2>/dev/null`
304 if [ -z "$DB_VER" ]; then
305 # grant privileges and create tables
306 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
307 %{_libexecdir}/%{name}/create_bacula_database > dev/null
308 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
309 elif [ "$DB_VER" -lt "7" ]; then
310 echo "Backing up bacula tables"
311 echo ".dump" | sqlite %{_localstatedir}/%{name}/bacula.db | bzip2 > %{_localstatedir}/%{name}/bacula_backup.sql.bz2
313 echo "Upgrading bacula tables"
314 if [ "$DB_VER" -lt "6" ]; then
315 if [ "$DB_VER" -lt "5" ]; then
316 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
318 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
320 %{_libexecdir}/%{name}/update_bacula_tables
321 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/%{name}/bacula_backup.sql.bz2"
323 chown -R bacula:bacula %{_localstatedir}/%{name}
324 chmod -R u+rX,go-rwx %{_localstatedir}/%{name}
326 #%_post_service bacula-dir
329 #%_preun_service bacula-dir
332 #%post_fix_config bacula-fd
333 #%_post_service bacula-fd
336 #%_preun_service bacula-fd
339 #%post_fix_config bacula-sd
340 #%_post_service bacula-sd
343 #%_preun_service bacula-sd
346 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
347 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
351 #%post_fix_config bconsole
355 echo "The database update scripts were installed to %{_sysconfdir}/updatedb"
358 rm -rf $RPM_BUILD_ROOT
361 # link our current installed conf file to the rescue directory
362 ln -s %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
365 echo "Creating rescue files for this system..."
366 cd %{_sysconfdir}/rescue
370 # remove the files created after the initial rpm installation
371 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
372 rm -f %{_sysconfdir}/rescue/partition.*
373 rm -f %{_sysconfdir}/rescue/format.*
374 rm -f %{_sysconfdir}/rescue/mount_drives
375 rm -f %{_sysconfdir}/rescue/start_network
376 rm -f %{_sysconfdir}/rescue/sfdisk
377 rm -rf %{_sysconfdir}/rescue/diskinfo/*
380 %defattr(644,root,root,755)
381 %dir %{_sysconfdir}/%{name}
382 %attr(755, root, root) %{_sbindir}/btraceback
383 %attr(755, root, root) %{_sbindir}/bsmtp
384 %dir %{_libexecdir}/%{name}
385 %{_libexecdir}/%{name}/btraceback.gdb
386 %attr(700, bacula, bacula) %dir %{_localstatedir}/%{name}
389 %defattr(644,root,root,755)
390 %doc ChangeLog CheckList ReleaseNotes kernstodo
391 %doc doc/*.pdf doc/manual examples
392 %attr(600, root, root) %config(noreplace) %{_sysconfdir}/%{name}/bacula-dir.conf
393 %ghost %{_sysconfdir}/%{name}/.pw.sed
394 %config(noreplace) %{_sysconfdir}/logrotate.d/bacula-dir
395 %{_mandir}/man8/bacula-dir.8*
396 %{_mandir}/man1/dbcheck.1*
397 %defattr (755, root, root)
398 %config(noreplace) %{_initrddir}/bacula-dir
399 %attr(755,root,root) %{_sbindir}/bacula-dir
400 %attr(755,root,root) %{_sbindir}/dbcheck
401 %{_libexecdir}/%{name}/create_sqlite_database
402 %{_libexecdir}/%{name}/drop_sqlite_database
403 %{_libexecdir}/%{name}/drop_sqlite_tables
404 %{_libexecdir}/%{name}/grant_sqlite_privileges
405 %{_libexecdir}/%{name}/make_sqlite_tables
406 %{_libexecdir}/%{name}/update_sqlite_tables*
407 %{_libexecdir}/%{name}/create_bacula_database
408 %{_libexecdir}/%{name}/drop_bacula_database
409 %{_libexecdir}/%{name}/drop_bacula_tables
410 %{_libexecdir}/%{name}/grant_bacula_privileges
411 %{_libexecdir}/%{name}/make_bacula_tables
412 %{_libexecdir}/%{name}/update_bacula_tables
413 %{_libexecdir}/%{name}/make_catalog_backup
414 %{_libexecdir}/%{name}/delete_catalog_backup
415 %attr(644, root, root) %{_libexecdir}/%{name}/query.sql
418 %defattr(644,root,root,755)
419 %attr(600, root, root) %config(noreplace) %{_sysconfdir}/%{name}/bacula-fd.conf
420 %config(noreplace) %{_initrddir}/bacula-fd
421 %attr(755,root,root) %{_sbindir}/bacula-fd
422 %attr(644, root, root) %{_mandir}/man8/bacula-fd.8*
425 %defattr(644,root,root,755)
426 %dir %{_sysconfdir}/%{name}
427 %attr(600, root, root) %config(noreplace) %{_sysconfdir}/%{name}/bacula-sd.conf
428 %config(noreplace) %{_initrddir}/bacula-sd
429 %attr(755,root,root) %{_sbindir}/bacula-sd
430 %attr(755,root,root) %{_sbindir}/bcopy
431 %attr(755,root,root) %{_sbindir}/bextract
432 %attr(755,root,root) %{_sbindir}/bls
433 %attr(755,root,root) %{_sbindir}/bscan
434 %attr(755,root,root) %{_sbindir}/btape
435 %{_libexecdir}/%{name}/mtx-changer
436 %defattr(644, root,root, 755)
437 %{_mandir}/man8/bacula-sd.8*
438 %{_mandir}/man1/bcopy.1*
439 %{_mandir}/man1/bextract.1*
440 %{_mandir}/man1/bls.1*
441 %{_mandir}/man1/bscan.1*
442 %{_mandir}/man1/btape.1*
445 %defattr(644,root,root,755)
446 %attr(600, root, root) %config(noreplace) %{_sysconfdir}/%{name}/bconsole.conf
447 %attr(755, root, root) %{_sbindir}/bconsole
448 %config(noreplace) %{_sysconfdir}/security/console.apps/bconsole
449 %config(noreplace) %{_sysconfdir}/pam.d/bconsole
450 %verify(link) %{_bindir}/bconsole
451 %{_mandir}/man1/bconsole.1*
455 %defattr(644,root,root,755)
456 %{_iconsdir}/%{name}.png
457 %{_miconsdir}/%{name}.png
458 %{_liconsdir}/%{name}.png
459 %{_menudir}/bacula-console-wx
460 %attr(600, root, root) %config(noreplace) %{_sysconfdir}/%{name}/wx-console.conf
461 %attr(755, root, root) %{_sbindir}/wx-console
462 %config(noreplace) %{_sysconfdir}/security/console.apps/wx-console
463 %config(noreplace) %{_sysconfdir}/pam.d/wx-console
464 %verify(link) %{_bindir}/wx-console
465 %{_mandir}/man1/wx-console.1*
468 %defattr(644,root,root,755)
469 %{_sysconfdir}/rescue
472 %defattr(644,root,root,755)
473 %{_sysconfdir}/updatedb