5 Summary: Bacula - The Network Backup Solution
9 Group: Networking/Utilities
11 Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
12 # Source0-md5: 9de593cb206df126a8e27774281c5bf6
13 Source1: http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/tomsrtbt-2.0.103.tar.gz
14 # Source1-md5: d5ee50efb28986d564547d5da5de2483
15 Source2: %{name}-dir.init
16 Source3: %{name}-fd.init
17 Source4: %{name}-sd.init
18 Source5: %{name}.logrotate
19 URL: http://www.bacula.org/
21 BuildRequires: wxGTK2-devel
22 BuildRequires: openssl-devel
23 BuildRequires: pkgconfig
24 BuildRequires: ncurses-devel
25 BuildRequires: readline-devel
26 BuildRequires: sqlite2-devel
27 BuildRequires: libwrap-devel
28 BuildRequires: zlib-devel
29 BuildRequires: acl-devel
30 BuildRequires: libstdc++-devel
31 BuildRequires: glibc-static
32 BuildRequires: acl-static
33 BuildRequires: libwrap-static
34 BuildRequires: libstdc++-static
38 Provides: bacula-server
39 Conflicts: bacula-client
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define _sysconfdir /etc/%{name}
45 Bacula - It comes by night and sucks the vital essence from your
48 Bacula is a set of computer programs that permit you (or the system
49 administrator) to manage backup, recovery, and verification of
50 computer data across a network of computers of different kinds. In
51 technical terms, it is a network client/server based backup program.
52 Bacula is relatively easy to use and efficient, while offering many
53 advanced storage management features that make it easy to find and
54 recover lost or damaged files. Bacula source code has been released
55 under the GPL version 2 license.
58 Summary: Bacula - The Network Backup Solution
59 Group: Networking/Utilities
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. Bacula source code has been released
73 under the GPL version 2 license.
75 This is the File daemon (Client) only package. It includes the command
80 Summary: Bacula - The Network Backup Solution
81 Group: Networking/Utilities
88 Bacula - It comes by night and sucks the vital essence from your
91 Bacula is a set of computer programs that permit you (or the system
92 administrator) to manage backup, recovery, and verification of
93 computer data across a network of computers of different kinds. In
94 technical terms, it is a network client/server based backup program.
95 Bacula is relatively easy to use and efficient, while offering many
96 advanced storage management features that make it easy to find and
97 recover lost or damaged files. Bacula source code has been released
98 under the GPL version 2 license.
100 This package installs scripts for disaster recovery and builds rescue
101 floppy disks for bare metal recovery. This package includes tomsrtbt
102 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a
103 tool to build a boot floppy disk.
105 To create a boot disk run "./getdiskinfo" from the
106 %{_sysconfdir}/rescue directory (this is done when the package is
107 first installed), then run "./install.s" from the
108 %{_sysconfdir}/rescue/tomsrtbt/ directory. To make the bacula rescue
109 disk run "./make_rescue_disk --copy-static-bacula
110 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
111 recreate the rescue information for this system run ./getdiskinfo
115 Summary: Bacula - The Network Backup Solution
116 Group: Networking/Utilities
118 %description updatedb
119 Bacula - It comes by night and sucks the vital essence from your
122 Bacula is a set of computer programs that permit you (or the system
123 administrator) to manage backup, recovery, and verification of
124 computer data across a network of computers of different kinds. In
125 technical terms, it is a network client/server based backup program.
126 Bacula is relatively easy to use and efficient, while offering many
127 advanced storage management features that make it easy to find and
128 recover lost or damaged files. Bacula source code has been released
129 under the GPL version 2 license.
131 This package installs scripts for updating older versions of the
135 Summary: Bacula - The Network Backup Solution
136 Group: Networking/Utilities
139 %description wxconsole
140 Bacula - It comes by night and sucks the vital essence from your
143 Bacula is a set of computer programs that permit you (or the system
144 administrator) to manage backup, recovery, and verification of
145 computer data across a network of computers of different kinds. In
146 technical terms, it is a network client/server based backup program.
147 Bacula is relatively easy to use and efficient, while offering many
148 advanced storage management features that make it easy to find and
149 recover lost or damaged files. Bacula source code has been released
150 under the GPL version 2 license.
152 This is the WX Console package. It is an add-on to the client or
157 sed -i -e 's#wx-config#wxgtk2-2.4-config#g' configure*
158 sed -i -e 's#-lreadline -ltermcap#-lreadline#g' configure*
161 # patches for the bundled sqlite scripts
162 # patch the make_sqlite_tables script for installation bindir
163 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
164 # patch the create_sqlite_database script for installation bindir
165 patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
166 # patch the make_catalog_backup script for installation bindir
167 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
168 # patch the update_sqlite_tables script for installation bindir
169 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
171 CPPFLAGS="-I%{_includedir}/ncurses -I%{_includedir}/readline"
175 --enable-wx-console \
177 --with-tcp-wrappers \
178 --with-working-dir=%{_var}/lib/%{name} \
179 --with-dump-email="root@localhost" \
180 --with-job-email="root@localhost" \
181 --with-smtp-host=localhost \
182 --with-pid-dir=/var/run \
183 --with-subsys-dir=/var/lock/subsys \
189 rm -rf $RPM_BUILD_ROOT
191 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,security/console.apps}
192 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rescue/tomsrtbt,updatedb}
193 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
196 DESTDIR=$RPM_BUILD_ROOT
199 strip src/filed/static-bacula-fd
200 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
202 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
203 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
204 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
205 install %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
207 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
209 # install the rescue stuff, these are the rescue scripts
210 install rescue/linux/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
211 install rescue/linux/format_floppy $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
212 install rescue/linux/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
213 install rescue/linux/make_rescue_disk $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
214 install rescue/linux/restore_bacula $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
215 install rescue/linux/restore_etc $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
216 install rescue/linux/run_grub $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
217 install rescue/linux/run_lilo $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
218 install rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
220 # this is the tom's root boot disk
221 install tomsrtbt-*/* $RPM_BUILD_ROOT%{_sysconfdir}/rescue/tomsrtbt/
223 # install the updatedb scripts
224 install updatedb/* $RPM_BUILD_ROOT%{_sysconfdir}/updatedb/
227 install -d html-manual
228 cp -a doc/html-manual/*.{html,jpg,gif,css} html-manual/
231 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/{gconsole,startmysql,stopmysql}
234 # test for bacula database older than version 6
235 if [ -s %{_var}/lib/%{name}/bacula.db ];then
236 DB_VER=`echo "select * from Version;" | %{_bindir}/sqlite %{_var}/lib/%{name}/bacula.db | tail -n 1 2>/dev/null`
237 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "6" ]; then
238 echo "This bacula upgrade will update a bacula database from version 6 to 7."
239 echo "You appear to be running database version $DB_VER. You must first update"
240 echo "your database to version 6 and then install this upgrade. The alternative"
241 echo "is to use %{_sysconfdir}/drop_sqlite_tables to delete all your your current"
242 echo "catalog information, then do the upgrade. Information on updating a"
243 echo "database older than version 6 can be found in the release notes."
247 # check for and copy %{_sysconfdir}/console.conf to bconsole.conf
248 if [ -s %{_sysconfdir}/console.conf ];then
249 cp -a %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
254 if [ "$1" -ge 1 ] ; then
255 /sbin/chkconfig --add bacula-dir
256 /sbin/chkconfig --add bacula-fd
257 /sbin/chkconfig --add bacula-sd
260 # test for an existing database
261 if [ -s %{_var}/lib/%{name}/bacula.db ]; then
262 DB_VER=`echo "select * from Version;" | %{_bindir}/sqlite %{_var}/lib/%{name}/bacula.db | tail -n 1 2>/dev/null`
263 # check to see if we need to upgrade a 1.32 or lower database
264 if [ "$DB_VER" -lt "7" ]; then
265 echo "This release requires an upgrade to your bacula database."
266 echo "Backing up your current database..."
267 echo ".dump" | %{_bindir}/sqlite %{_var}/lib/%{name}/bacula.db | bzip2 > %{_var}/lib/%{name}/bacula_backup.sql.bz2
268 echo "Upgrading bacula database ..."
269 %{_sysconfdir}/update_sqlite_tables
270 echo "If bacula works correctly you can remove the backup file %{_var}/lib/%{name}/bacula_backup.sql.bz2"
273 # create the database and tables
274 echo "Hmm, doesn't look like you have an existing database."
275 echo "Creating SQLite database..."
276 %{_sysconfdir}/create_sqlite_database
277 echo "Creating the SQLite tables..."
278 %{_sysconfdir}/make_sqlite_tables
284 /sbin/chkconfig --del bacula-dir
285 /sbin/chkconfig --del bacula-fd
286 /sbin/chkconfig --del bacula-sd
291 if [ "$1" -ge 1 ] ; then
292 /sbin/chkconfig --add bacula-fd
298 /sbin/chkconfig --del bacula-fd
302 echo "The database update scripts were installed to %{_sysconfdir}/updatedb"
305 rm -rf $RPM_BUILD_ROOT
308 # link our current installed conf file to the rescue directory
309 ln -s %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
312 echo "Creating rescue files for this system..."
313 cd %{_sysconfdir}/rescue
317 # remove the files created after the initial rpm installation
318 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
319 rm -f %{_sysconfdir}/rescue/partition.*
320 rm -f %{_sysconfdir}/rescue/format.*
321 rm -f %{_sysconfdir}/rescue/mount_drives
322 rm -f %{_sysconfdir}/rescue/start_network
323 rm -f %{_sysconfdir}/rescue/sfdisk
324 rm -rf %{_sysconfdir}/rescue/diskinfo/*
327 %defattr(644,root,root,755)
328 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual
329 %attr(755,root,root) %{_sbindir}/bacula-dir
330 %attr(755,root,root) %{_sbindir}/bacula-fd
331 %attr(755,root,root) %{_sbindir}/bacula-sd
332 %attr(755,root,root) %{_sbindir}/bcopy
333 %attr(755,root,root) %{_sbindir}/bextract
334 %attr(755,root,root) %{_sbindir}/bls
335 %attr(755,root,root) %{_sbindir}/bscan
336 %attr(755,root,root) %{_sbindir}/btape
337 %attr(755,root,root) %{_sbindir}/btraceback
338 %attr(755,root,root) %{_sbindir}/bconsole
339 %attr(755,root,root) %{_sbindir}/dbcheck
340 %attr(755,root,root) %{_sbindir}/bsmtp
341 %attr(755,root,root) %{_sbindir}/static-bacula-fd
343 %{_sysconfdir}/bacula
344 %{_sysconfdir}/bconsole
346 %{_sysconfdir}/create_bacula_database
347 %{_sysconfdir}/drop_bacula_database
348 %{_sysconfdir}/grant_bacula_privileges
349 %{_sysconfdir}/make_bacula_tables
350 %{_sysconfdir}/drop_bacula_tables
351 %{_sysconfdir}/update_bacula_tables
352 %{_sysconfdir}/create_sqlite_database
353 %{_sysconfdir}/drop_sqlite_database
354 %{_sysconfdir}/grant_sqlite_privileges
355 %{_sysconfdir}/make_sqlite_tables
356 %{_sysconfdir}/drop_sqlite_tables
357 %{_sysconfdir}/update_sqlite_tables
358 %{_sysconfdir}/make_catalog_backup
359 %{_sysconfdir}/delete_catalog_backup
360 %{_sysconfdir}/mtx-changer
361 %{_sysconfdir}/query.sql
362 %{_sysconfdir}/btraceback.gdb
363 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-dir.conf
364 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-fd.conf
365 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-sd.conf
366 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bconsole.conf
367 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
368 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
369 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
370 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula
371 %dir %{_var}/lib/%{name}
374 %defattr(644,root,root,755)
375 %attr(755,root,root) %{_sbindir}/bacula-fd
376 %attr(755,root,root) %{_sbindir}/btraceback
377 %attr(755,root,root) %{_sbindir}/bsmtp
378 %attr(755,root,root) %{_sbindir}/bconsole
380 %{_sysconfdir}/bconsole
381 %{_sysconfdir}/btraceback.gdb
382 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-fd.conf
383 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bconsole.conf
384 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
385 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula
386 %dir %{_var}/lib/%{name}
389 %defattr(644,root,root,755)
390 %{_sysconfdir}/rescue
393 %defattr(644,root,root,755)
394 %{_sysconfdir}/updatedb
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_sbindir}/wx-console
399 %config(noreplace) %{_sysconfdir}/wx-console.conf
400 %{_pixmapsdir}/bacula.png