2 # - update desktop files, think about su-wrappers for console
4 # - fix log file permissions
7 %bcond_without console_wx # wx-console program
8 %bcond_without gnome # gnome-console program
12 Summary: Bacula - The Network Backup Solution
13 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
18 License: extended GPL v2
19 Group: Networking/Utilities
20 Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
21 # Source0-md5: 0d6d6614afdc468d214de4e66f9f5a26
22 Source1: %{name}-manpages.tar.bz2
23 # Source1-md5: e4dae86d6574b360e831efd3913e7f4c
24 Source2: http://dl.sourceforge.net/bacula/%{name}-docs-%{version}-1.tar.gz
25 # Source2-md5: ea827e52b24787edcb04bfd073434501
26 #Source3: http://dl.sourceforge.net/bacula/%{name}-gui-%{version}.tar.gz
27 ## Source3-md5: 5fb575ceed9dee0cdf8bc7f81ef60f54
28 Source4: http://dl.sourceforge.net/bacula/%{name}-rescue-1.8.6.tar.gz
29 # Source4-md5: 15485f3c9c51dcdb1b2abd8c5ec194c5
30 Source10: %{name}-dir.init
31 Source11: %{name}-fd.init
32 Source12: %{name}-sd.init
33 Source13: %{name}.logrotate
34 Source14: %{name}-dir.sysconfig
35 Source15: %{name}-fd.sysconfig
36 Source16: %{name}-sd.sysconfig
37 Patch0: %{name}-dvd-handler_path.patch
38 Patch1: %{name}-dvd_append.patch
39 Patch2: %{name}-link.patch
40 Patch3: %{name}-compile.patch
41 Patch4: %{name}-wx28.patch
42 URL: http://www.bacula.org/
43 BuildRequires: acl-static
44 BuildRequires: automake
45 %{?with_rescue:BuildRequires: fakeroot}
46 BuildRequires: glibc-static
48 BuildRequires: libgnome-devel >= 2.0
49 BuildRequires: libgnomeui-devel >= 2.0
51 BuildRequires: libstdc++-static
52 BuildRequires: libwrap-static
54 BuildRequires: ncurses-devel
55 BuildRequires: openssl-devel
56 BuildRequires: openssl-static
57 BuildRequires: pkgconfig
58 %{?with_python:BuildRequires: python-static}
59 BuildRequires: readline-devel
60 BuildRequires: rpmbuild(macros) >= 1.268
61 BuildRequires: sed >= 4.0
62 BuildRequires: sqlite-devel
63 %if %{with console_wx}
64 BuildRequires: wxGTK2-devel >= 2.4.0
66 BuildRequires: zlib-devel
67 BuildRequires: zlib-static
68 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70 %define _sysconfdir /etc/%{name}
71 %define _localstatedir /var/lib/%{name}
74 Bacula - It comes by night and sucks the vital essence from your
77 Bacula is a set of computer programs that permit you (or the system
78 administrator) to manage backup, recovery, and verification of
79 computer data across a network of computers of different kinds. In
80 technical terms, it is a network client/server based backup program.
81 Bacula is relatively easy to use and efficient, while offering many
82 advanced storage management features that make it easy to find and
83 recover lost or damaged files.
86 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
88 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
89 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
90 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
91 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
92 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
93 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
94 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
98 Summary: Common files for bacula package
99 Summary(pl): Pliki wspólne dla pakietu bacula
100 Group: Networking/Utilities
101 Requires(post): openssl-tools
102 Requires(post): sed >= 4.0
103 Requires(post,preun): /sbin/chkconfig
104 Requires(postun): /usr/sbin/groupdel
105 Requires(postun): /usr/sbin/userdel
106 Requires(pre): /usr/sbin/groupadd
107 Requires(pre): /usr/sbin/useradd
108 Conflicts: bacula-console < 0:1.34.6
109 Conflicts: bacula-dir < 0:1.34.6
110 Conflicts: bacula-fd < 0:1.34.6
111 Conflicts: bacula-sd < 0:1.34.6
114 Bacula - It comes by night and sucks the vital essence from your
117 Bacula is a set of computer programs that permit you (or the system
118 administrator) to manage backup, recovery, and verification of
119 computer data across a network of computers of different kinds. In
120 technical terms, it is a network client/server based backup program.
121 Bacula is relatively easy to use and efficient, while offering many
122 advanced storage management features that make it easy to find and
123 recover lost or damaged files.
125 %description common -l pl
126 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
128 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
129 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
130 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
131 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
132 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
133 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
134 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
138 Summary: Bacula Director and Catalog services
139 Summary(pl): Us³ugi Bacula Director i Catalog
140 Group: Networking/Utilities
141 Requires(post): sed >= 4.0
142 Requires: %{name}-common = %{epoch}:%{version}-%{release}
143 Obsoletes: bacula-updatedb
146 Bacula - It comes by night and sucks the vital essence from your
149 Bacula Director is the program that supervises all the backup,
150 restore, verify and archive operations. The system administrator uses
151 the Bacula Director to schedule backups and to recover files. Catalog
152 services are comprised of the software programs responsible for
153 maintaining the file indexes and volume databases for all files backed
154 up. The Catalog services permit the System Administrator or user to
155 quickly locate and restore any desired file, since it maintains a
156 record of all Volumes used, all Jobs run, and all Files saved. This
157 build requires sqlite to be installed separately as the catalog
160 %description dir -l pl
161 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
163 Bacula Director to program nadzoruj±cy wszystkie operacje wykonywania
164 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
165 Administrator u¿ywa Bacula Directora do szeregowania kopii zapasowych
166 oraz odzyskiwania plików. Us³ugi katalogowe (Catalog services) s±
167 u¿ywane przez programy odpowiedzialne za zarz±dzanie indeksami plików
168 i baz± danych wolumenów dla wszystkich kopiowanych plików. Us³ugi
169 katalogowe umo¿liwiaj± administratorowi lub u¿ytkownikowi szybko
170 zlokalizowaæ i odtworzyæ dowolny plik, poniewa¿ utrzymuj± rekord ze
171 wszystkimi u¿ywanymi wolumenami, uruchomionymi zadaniami i zapisanymi
172 plikami. Pakiet wymaga sqlite zainstalowanego oddzielnie jako bazy
176 Summary: Bacula Console
177 Summary(pl): Konsola Baculi
178 Group: Networking/Utilities
179 Requires(post): sed >= 4.0
180 Requires: %{name}-common = %{epoch}:%{version}-%{release}
183 Bacula - It comes by night and sucks the vital essence from your
186 Bacula Console is the program that allows the administrator or user to
187 communicate with the Bacula Director. This is the text only console
190 %description console -l pl
191 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
193 Bacula Console to program umo¿liwiaj±cy administratorowi lub
194 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
195 interfejs czysto tekstowy.
198 Summary: Bacula wxWidgets Console
199 Summary(pl): Konsola Baculi oparta na wxWidgets
200 Group: Networking/Utilities
201 Requires(post): sed >= 4.0
202 Requires: %{name}-common = %{epoch}:%{version}-%{release}
204 %description console-wx
205 Bacula - It comes by night and sucks the vital essence from your
208 Bacula Console is the program that allows the administrator or user to
209 communicate with the Bacula Director. This is the wxWidgets GUI
212 %description console-wx -l pl
213 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
215 Bacula Console to program umo¿liwiaj±cy administratorowi lub
216 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
217 interfejs graficzny oparty na wxWidgets.
219 %package console-gnome
220 Summary: Bacula GNOME Console
221 Summary(pl): Konsola Baculi oparta dla GNOME
222 Group: Networking/Utilities
223 Requires(post): sed >= 4.0
224 Requires: %{name}-common = %{epoch}:%{version}-%{release}
226 %description console-gnome
227 Bacula - It comes by night and sucks the vital essence from your
230 Bacula Console is the program that allows the administrator or user to
231 communicate with the Bacula Director. This is the GNOME GUI interface.
233 %description console-gnome -l pl
234 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
236 Bacula Console to program umo¿liwiaj±cy administratorowi lub
237 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
238 interfejs graficzny oparty na GNOME.
240 %package tray-monitor
241 Summary: Bacula Tray Monitor
242 Group: Networking/Utilities
243 Requires(post): sed >= 4.0
244 Requires: %{name}-common = %{epoch}:%{version}-%{release}
246 %description tray-monitor
247 Bacula - It comes by night and sucks the vital essence from your
250 The Monitor program is typically an icon in the system tray. However,
251 once the icon is expanded into a full window, the administrator or
252 user can obtain status information about the Director or the backup
253 status on the local workstation or any other Bacula daemon that is
257 Summary: Bacula File services (Client)
258 Summary(pl): Us³ugi Bacula File (klient)
259 Group: Networking/Utilities
260 Requires(post): sed >= 4.0
261 Requires: %{name}-common = %{epoch}:%{version}-%{release}
264 Bacula - It comes by night and sucks the vital essence from your
267 Bacula File services (or Client program) is the software program that
268 is installed on the machine to be backed up. It is specific to the
269 operating system on which it runs and is responsible for providing the
270 file attributes and data when requested by the Director. The File
271 services are also responsible for the file system dependent part of
272 restoring the file attributes and data during a recovery operation.
273 This program runs as a daemon on the machine to be backed up, and in
274 some of the documentation, the File daemon is referred to as the
275 Client (for example in Bacula configuration file).
277 %description fd -l pl
278 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
280 Us³ugi Bacula File (inaczej program kliencki) to oprogramowanie, które
281 instaluje siê na maszynach, z których maj± byæ wykonywane kopie
282 zapasowe. S± one specyficzne dla systemu operacyjnego, pod którym
283 dzia³a dana maszyna i odpowiadaj± za dostarczanie atrybutów i danych
284 plików na ¿±danie Directora. Us³ugi plikowe s± tak¿e odpowiedzialne za
285 zale¿n± od systemu plików czê¶æ odzyskiwania atrybutów i danych plików
286 podczas operacji odzyskiwania danych. Program dzia³a jako demon na
287 maszynie, która ma byæ backupowana i w czê¶ci dokumentacji demon ten
288 (File) jest nazywany klientem (na przyk³ad w pliku konfiguracyjnym
292 Summary: Bacula Storage services
293 Summary(pl): Us³ugi Bacula Storage
294 Group: Networking/Utilities
295 Requires(post): sed >= 4.0
296 Requires: %{name}-common = %{epoch}:%{version}-%{release}
297 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
300 Bacula - It comes by night and sucks the vital essence from your
303 Bacula Storage services consist of the software programs that perform
304 the storage and recovery of the file attributes and data to the
305 physical backup media or volumes. In other words, the Storage daemon
306 is responsible for reading and writing your tapes (or other storage
307 media, e.g. files). The Storage services runs as a daemon on the
308 machine that has the backup device (usually a tape drive).
310 %description sd -l pl
311 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
313 Us³ugi Bacula Storage sk³adaj± siê z programów obs³uguj±cych
314 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
315 fizycznych no¶nikach lub wolumenach. Innymi s³owy, demon Storage jest
316 odpowiedzialny za odczyt i zapis ta¶m (lub innych no¶ników do
317 przechowywania danych, np. plików). Us³ugi Storage dzia³aj± jako demon
318 na maszynie, która zawiera urz±dzenie backupowe (zwykle napêd
322 Summary: Bacula - The Network Backup Solution
323 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
324 Group: Networking/Utilities
325 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
330 Bacula - It comes by night and sucks the vital essence from your
333 Bacula is a set of computer programs that permit you (or the system
334 administrator) to manage backup, recovery, and verification of
335 computer data across a network of computers of different kinds. In
336 technical terms, it is a network client/server based backup program.
337 Bacula is relatively easy to use and efficient, while offering many
338 advanced storage management features that make it easy to find and
339 recover lost or damaged files.
341 This package installs scripts for disaster recovery and builds rescue
342 floppy disk for bare metal recovery.
344 To make the bacula rescue disk run "./make_rescue_disk
346 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
347 recreate the rescue information for this system run ./getdiskinfo
350 %description rescue -l pl
351 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
353 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
354 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
355 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
356 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
357 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
358 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
359 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
362 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkê
363 ratunkowe do odtwarzania systemu od zera.
365 Aby stworzyæ dyskietkê ratunkow± Baculi, nale¿y uruchomiæ "./make_rescue_disk
366 --copy-static-bacula - --copy-etc-files" z katalogu
367 %{_sysconfdir}/rescue . Aby ponownie utworzyæ informacje ratunkowe dla
368 danego systemu, nale¿y ponownie uruchomiæ ./getdiskinfo .
378 tar -xf %{SOURCE4} && ln -s bacula-rescue-* rescue
379 sed -i -e 's#wx-config#wx-gtk2-ansi-config#g' configure*
380 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
381 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
382 src/cats/create_* src/cats/delete_* src/cats/drop_* \
383 src/cats/grant_* src/cats/make_* src/cats/update_*
384 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
387 cp -f %{_datadir}/automake/config.sub autoconf
388 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
390 --with-scriptdir=%{_libexecdir}/%{name} \
391 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
393 --enable-smartalloc \
394 %{?with_console_wx:--enable-wx-console} \
395 --enable-tray-monitor \
396 %{?with_python:--with-python} \
398 --with-tcp-wrappers \
399 --with-working-dir=%{_var}/lib/%{name} \
400 --with-dump-email="root@localhost" \
401 --with-job-email="root@localhost" \
402 --with-smtp-host=localhost \
403 --with-pid-dir=/var/run \
404 --with-subsys-dir=/var/lock/subsys \
406 --with-dir-password="#FAKE-dir-password#" \
407 --with-fd-password="#FAKE-fd-password#" \
408 --with-sd-password="#FAKE-sd-password#" \
409 --with-mon-dir-password="#FAKE-mon-dir-password#" \
410 --with-mon-fd-password="#FAKE-mon-fd-password#" \
411 --with-mon-sd-password="#FAKE-mon-sd-password#" \
426 rm -rf $RPM_BUILD_ROOT
428 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
429 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
430 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
433 DESTDIR=$RPM_BUILD_ROOT
436 strip -R.comment -R.note src/filed/static-bacula-fd
437 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
439 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
440 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
441 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
442 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
443 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
444 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
445 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
447 %if %{with console_wx}
448 # tray-monitor is for regular users
449 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
451 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
452 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
453 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
454 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
455 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
456 sed -e 's#%{_sbindir}#%{_bindir}#' \
457 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
461 # install the rescue stuff, these are the rescue scripts
462 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
463 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
464 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
465 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
468 # install the updatedb scripts
469 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
472 cp -a man1 man8 $RPM_BUILD_ROOT%{_mandir}
474 # place for site passwords
475 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
476 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
479 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
480 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
481 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gnome*
482 %if !%{with console_wx}
483 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
484 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/wx-console*
486 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
489 rm -rf $RPM_BUILD_ROOT
492 %groupadd -P %{name}-common -g 136 -r -f bacula
493 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
496 echo "Updating bacula passwords and names..."
498 for f in *-password ; do
499 if [ ! -s $f ] ; then
500 openssl rand -base64 33 > $f
503 for cf in *.conf *.conf.rpmnew ; do
504 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
507 for cf in *.conf *.conf.rpmnew ; do
508 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
512 if [ "$1" = "0" ]; then
519 [ -s %{_localstatedir}/bacula.db ] && \
520 DB_VER=`echo "select * from Version;" | \
521 %{_bindir}/sqlite %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
522 if [ -z "$DB_VER" ]; then
523 # grant privileges and create tables
524 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
525 %{_libexecdir}/%{name}/create_bacula_database > dev/null
526 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
527 elif [ "$DB_VER" -lt "9" ]; then
528 echo "Backing up bacula tables"
529 echo ".dump" | sqlite %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
531 echo "Upgrading bacula tables"
532 if [ "$DB_VER" -lt "9" ]; then
533 if [ "$DB_VER" -lt "8" ]; then
534 if [ "$DB_VER" -lt "7" ]; then
535 if [ "$DB_VER" -lt "6" ]; then
536 if [ "$DB_VER" -lt "5" ]; then
537 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
539 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
541 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
543 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
545 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
547 %{_libexecdir}/%{name}/update_bacula_tables
548 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
550 chown -R bacula:bacula %{_localstatedir}
551 chmod -R u+rX,go-rwx %{_localstatedir}/*
553 echo "Updating Bacula passwords and names..."
555 for f in *-password ; do
557 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
559 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
561 /sbin/chkconfig --add bacula-dir
562 %service bacula-dir restart "Bacula Director daemon"
565 if [ "$1" = "0" ]; then
566 %service bacula-dir stop
567 /sbin/chkconfig --del bacula-dir
571 echo "Updating Bacula passwords and names..."
573 for f in *-password ; do
575 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
577 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
579 /sbin/chkconfig --add bacula-fd
580 %service bacula-fd restart "Bacula File daemon"
583 if [ "$1" = "0" ]; then
584 %service bacula-fd stop
585 /sbin/chkconfig --del bacula-fd
589 echo "Updating Bacula passwords and names..."
591 for f in *-password ; do
593 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
595 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
597 /sbin/chkconfig --add bacula-sd
598 %service bacula-sd restart "Bacula Storage daemon"
601 if [ "$1" = "0" ]; then
602 %service bacula-sd stop
603 /sbin/chkconfig --del bacula-sd
607 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
608 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
612 echo "Updating Bacula passwords and names..."
614 for f in *-password ; do
616 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
618 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
621 echo "Updating Bacula passwords and names..."
623 for f in *-password ; do
625 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
627 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
630 echo "Updating Bacula passwords and names..."
632 for f in *-password ; do
634 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
636 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
639 echo "Updating Bacula passwords and names..."
641 for f in *-password ; do
643 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
645 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
648 # link our current installed conf file to the rescue directory
649 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
652 echo "Creating rescue files for this system..."
653 cd %{_sysconfdir}/rescue
657 # remove the files created after the initial rpm installation
658 if [ "$1" = "0" ]; then
659 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
660 rm -f %{_sysconfdir}/rescue/partition.*
661 rm -f %{_sysconfdir}/rescue/format.*
662 rm -f %{_sysconfdir}/rescue/mount_drives
663 rm -f %{_sysconfdir}/rescue/start_network
664 rm -f %{_sysconfdir}/rescue/sfdisk
665 rm -rf %{_sysconfdir}/rescue/diskinfo/*
669 %defattr(644,root,root,755)
672 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
673 %attr(755,root,root) %{_sbindir}/btraceback
674 %attr(755,root,root) %{_sbindir}/bsmtp
675 %{_mandir}/man8/bacula.8*
676 %dir %{_libexecdir}/%{name}
677 %{_libexecdir}/%{name}/btraceback.dbx
678 %{_libexecdir}/%{name}/btraceback.gdb
679 %attr(770,root,bacula) %dir %{_localstatedir}
682 %defattr(644,root,root,755)
683 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
684 %doc examples %{name}-docs-%{version}-1/manual/{*.pdf,bacula}
685 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
686 %ghost %{_sysconfdir}/.pw.sed
687 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
688 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
689 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
690 %attr(755,root,root) %{_sbindir}/bacula-dir
691 %attr(755,root,root) %{_sbindir}/bregex
692 %attr(755,root,root) %{_sbindir}/bwild
693 %attr(755,root,root) %{_sbindir}/dbcheck
694 %{_mandir}/man8/bacula-dir.8*
695 %{_mandir}/man1/dbcheck.1*
696 %{_libexecdir}/%{name}/query.sql
697 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
698 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
699 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
700 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
701 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
702 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite*
703 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
704 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
705 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
706 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
707 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
708 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
709 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
710 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
713 %defattr(644,root,root,755)
715 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
716 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
717 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
718 %attr(755,root,root) %{_sbindir}/bacula-fd
719 %{_mandir}/man8/bacula-fd.8*
722 %defattr(644,root,root,755)
725 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
726 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
727 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
728 %attr(755,root,root) %{_sbindir}/bacula-sd
729 %attr(755,root,root) %{_sbindir}/bcopy
730 %attr(755,root,root) %{_sbindir}/bextract
731 %attr(755,root,root) %{_sbindir}/bls
732 %attr(755,root,root) %{_sbindir}/bscan
733 %attr(755,root,root) %{_sbindir}/btape
734 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
735 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
736 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
737 %{_mandir}/man8/bacula-sd.8*
738 %{_mandir}/man1/bcopy.1*
739 %{_mandir}/man1/bextract.1*
740 %{_mandir}/man1/bls.1*
741 %{_mandir}/man1/bscan.1*
742 %{_mandir}/man1/btape.1*
745 %defattr(644,root,root,755)
747 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
748 %attr(755,root,root) %{_sbindir}/bconsole
749 %{_mandir}/man1/bconsole.1*
751 %if %{with console_wx}
753 %defattr(644,root,root,755)
755 %{_pixmapsdir}/%{name}.png
756 %{_desktopdir}/bacula-wx.desktop
757 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wx-console.conf
758 %attr(755,root,root) %{_sbindir}/wx-console
759 %{_mandir}/man1/wx-console.1*
764 %defattr(644,root,root,755)
766 %{_pixmapsdir}/%{name}.png
767 %{_desktopdir}/bacula.desktop
768 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gnome-console.conf
769 %attr(755,root,root) %{_sbindir}/gnome-console
770 #%{_mandir}/man1/gnome-console.1*
773 %if %{with console_wx}
775 %defattr(644,root,root,755)
777 %{_pixmapsdir}/%{name}-tray-monitor.xpm
778 %{_desktopdir}/%{name}-tray-monitor.desktop
779 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
780 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
781 #%{_mandir}/man1/bacula-tray-monitor.1*
786 %defattr(644,root,root,755)
788 %dir %{_sysconfdir}/rescue
789 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
790 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
791 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
792 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
793 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
794 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
795 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
796 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
797 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
798 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2