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}
73 # dependency section is broken. ccache usage is instead to makefiles
77 Bacula - It comes by night and sucks the vital essence from your
80 Bacula is a set of computer programs that permit you (or the system
81 administrator) to manage backup, recovery, and verification of
82 computer data across a network of computers of different kinds. In
83 technical terms, it is a network client/server based backup program.
84 Bacula is relatively easy to use and efficient, while offering many
85 advanced storage management features that make it easy to find and
86 recover lost or damaged files.
89 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
91 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
92 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
93 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
94 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
95 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
96 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
97 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
101 Summary: Common files for bacula package
102 Summary(pl): Pliki wspólne dla pakietu bacula
103 Group: Networking/Utilities
104 Requires(post): openssl-tools
105 Requires(post): sed >= 4.0
106 Requires(post,preun): /sbin/chkconfig
107 Requires(postun): /usr/sbin/groupdel
108 Requires(postun): /usr/sbin/userdel
109 Requires(pre): /usr/sbin/groupadd
110 Requires(pre): /usr/sbin/useradd
111 Conflicts: bacula-console < 0:1.34.6
112 Conflicts: bacula-dir < 0:1.34.6
113 Conflicts: bacula-fd < 0:1.34.6
114 Conflicts: bacula-sd < 0:1.34.6
117 Bacula - It comes by night and sucks the vital essence from your
120 Bacula is a set of computer programs that permit you (or the system
121 administrator) to manage backup, recovery, and verification of
122 computer data across a network of computers of different kinds. In
123 technical terms, it is a network client/server based backup program.
124 Bacula is relatively easy to use and efficient, while offering many
125 advanced storage management features that make it easy to find and
126 recover lost or damaged files.
128 %description common -l pl
129 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
131 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
132 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
133 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
134 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
135 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
136 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
137 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
141 Summary: Bacula Director and Catalog services
142 Summary(pl): Us³ugi Bacula Director i Catalog
143 Group: Networking/Utilities
144 Requires(post): sed >= 4.0
145 Requires: %{name}-common = %{epoch}:%{version}-%{release}
146 Obsoletes: bacula-updatedb
149 Bacula - It comes by night and sucks the vital essence from your
152 Bacula Director is the program that supervises all the backup,
153 restore, verify and archive operations. The system administrator uses
154 the Bacula Director to schedule backups and to recover files. Catalog
155 services are comprised of the software programs responsible for
156 maintaining the file indexes and volume databases for all files backed
157 up. The Catalog services permit the System Administrator or user to
158 quickly locate and restore any desired file, since it maintains a
159 record of all Volumes used, all Jobs run, and all Files saved. This
160 build requires sqlite to be installed separately as the catalog
163 %description dir -l pl
164 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
166 Bacula Director to program nadzoruj±cy wszystkie operacje wykonywania
167 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
168 Administrator u¿ywa Bacula Directora do szeregowania kopii zapasowych
169 oraz odzyskiwania plików. Us³ugi katalogowe (Catalog services) s±
170 u¿ywane przez programy odpowiedzialne za zarz±dzanie indeksami plików
171 i baz± danych wolumenów dla wszystkich kopiowanych plików. Us³ugi
172 katalogowe umo¿liwiaj± administratorowi lub u¿ytkownikowi szybko
173 zlokalizowaæ i odtworzyæ dowolny plik, poniewa¿ utrzymuj± rekord ze
174 wszystkimi u¿ywanymi wolumenami, uruchomionymi zadaniami i zapisanymi
175 plikami. Pakiet wymaga sqlite zainstalowanego oddzielnie jako bazy
179 Summary: Bacula Console
180 Summary(pl): Konsola Baculi
181 Group: Networking/Utilities
182 Requires(post): sed >= 4.0
183 Requires: %{name}-common = %{epoch}:%{version}-%{release}
186 Bacula - It comes by night and sucks the vital essence from your
189 Bacula Console is the program that allows the administrator or user to
190 communicate with the Bacula Director. This is the text only console
193 %description console -l pl
194 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
196 Bacula Console to program umo¿liwiaj±cy administratorowi lub
197 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
198 interfejs czysto tekstowy.
201 Summary: Bacula wxWidgets Console
202 Summary(pl): Konsola Baculi oparta na wxWidgets
203 Group: Networking/Utilities
204 Requires(post): sed >= 4.0
205 Requires: %{name}-common = %{epoch}:%{version}-%{release}
207 %description console-wx
208 Bacula - It comes by night and sucks the vital essence from your
211 Bacula Console is the program that allows the administrator or user to
212 communicate with the Bacula Director. This is the wxWidgets GUI
215 %description console-wx -l pl
216 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
218 Bacula Console to program umo¿liwiaj±cy administratorowi lub
219 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
220 interfejs graficzny oparty na wxWidgets.
222 %package console-gnome
223 Summary: Bacula GNOME Console
224 Summary(pl): Konsola Baculi oparta dla GNOME
225 Group: Networking/Utilities
226 Requires(post): sed >= 4.0
227 Requires: %{name}-common = %{epoch}:%{version}-%{release}
229 %description console-gnome
230 Bacula - It comes by night and sucks the vital essence from your
233 Bacula Console is the program that allows the administrator or user to
234 communicate with the Bacula Director. This is the GNOME GUI interface.
236 %description console-gnome -l pl
237 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
239 Bacula Console to program umo¿liwiaj±cy administratorowi lub
240 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
241 interfejs graficzny oparty na GNOME.
243 %package tray-monitor
244 Summary: Bacula Tray Monitor
245 Group: Networking/Utilities
246 Requires(post): sed >= 4.0
247 Requires: %{name}-common = %{epoch}:%{version}-%{release}
249 %description tray-monitor
250 Bacula - It comes by night and sucks the vital essence from your
253 The Monitor program is typically an icon in the system tray. However,
254 once the icon is expanded into a full window, the administrator or
255 user can obtain status information about the Director or the backup
256 status on the local workstation or any other Bacula daemon that is
260 Summary: Bacula File services (Client)
261 Summary(pl): Us³ugi Bacula File (klient)
262 Group: Networking/Utilities
263 Requires(post): sed >= 4.0
264 Requires: %{name}-common = %{epoch}:%{version}-%{release}
267 Bacula - It comes by night and sucks the vital essence from your
270 Bacula File services (or Client program) is the software program that
271 is installed on the machine to be backed up. It is specific to the
272 operating system on which it runs and is responsible for providing the
273 file attributes and data when requested by the Director. The File
274 services are also responsible for the file system dependent part of
275 restoring the file attributes and data during a recovery operation.
276 This program runs as a daemon on the machine to be backed up, and in
277 some of the documentation, the File daemon is referred to as the
278 Client (for example in Bacula configuration file).
280 %description fd -l pl
281 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
283 Us³ugi Bacula File (inaczej program kliencki) to oprogramowanie, które
284 instaluje siê na maszynach, z których maj± byæ wykonywane kopie
285 zapasowe. S± one specyficzne dla systemu operacyjnego, pod którym
286 dzia³a dana maszyna i odpowiadaj± za dostarczanie atrybutów i danych
287 plików na ¿±danie Directora. Us³ugi plikowe s± tak¿e odpowiedzialne za
288 zale¿n± od systemu plików czê¶æ odzyskiwania atrybutów i danych plików
289 podczas operacji odzyskiwania danych. Program dzia³a jako demon na
290 maszynie, która ma byæ backupowana i w czê¶ci dokumentacji demon ten
291 (File) jest nazywany klientem (na przyk³ad w pliku konfiguracyjnym
295 Summary: Bacula Storage services
296 Summary(pl): Us³ugi Bacula Storage
297 Group: Networking/Utilities
298 Requires(post): sed >= 4.0
299 Requires: %{name}-common = %{epoch}:%{version}-%{release}
300 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
303 Bacula - It comes by night and sucks the vital essence from your
306 Bacula Storage services consist of the software programs that perform
307 the storage and recovery of the file attributes and data to the
308 physical backup media or volumes. In other words, the Storage daemon
309 is responsible for reading and writing your tapes (or other storage
310 media, e.g. files). The Storage services runs as a daemon on the
311 machine that has the backup device (usually a tape drive).
313 %description sd -l pl
314 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
316 Us³ugi Bacula Storage sk³adaj± siê z programów obs³uguj±cych
317 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
318 fizycznych no¶nikach lub wolumenach. Innymi s³owy, demon Storage jest
319 odpowiedzialny za odczyt i zapis ta¶m (lub innych no¶ników do
320 przechowywania danych, np. plików). Us³ugi Storage dzia³aj± jako demon
321 na maszynie, która zawiera urz±dzenie backupowe (zwykle napêd
325 Summary: Bacula - The Network Backup Solution
326 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
327 Group: Networking/Utilities
328 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
333 Bacula - It comes by night and sucks the vital essence from your
336 Bacula is a set of computer programs that permit you (or the system
337 administrator) to manage backup, recovery, and verification of
338 computer data across a network of computers of different kinds. In
339 technical terms, it is a network client/server based backup program.
340 Bacula is relatively easy to use and efficient, while offering many
341 advanced storage management features that make it easy to find and
342 recover lost or damaged files.
344 This package installs scripts for disaster recovery and builds rescue
345 floppy disk for bare metal recovery.
347 To make the bacula rescue disk run "./make_rescue_disk
349 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
350 recreate the rescue information for this system run ./getdiskinfo
353 %description rescue -l pl
354 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
356 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
357 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
358 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
359 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
360 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
361 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
362 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
365 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkê
366 ratunkowe do odtwarzania systemu od zera.
368 Aby stworzyæ dyskietkê ratunkow± Baculi, nale¿y uruchomiæ "./make_rescue_disk
369 --copy-static-bacula - --copy-etc-files" z katalogu
370 %{_sysconfdir}/rescue . Aby ponownie utworzyæ informacje ratunkowe dla
371 danego systemu, nale¿y ponownie uruchomiæ ./getdiskinfo .
381 tar -xf %{SOURCE4} && ln -s bacula-rescue-* rescue
382 sed -i -e 's#wx-config#wx-gtk2-ansi-config#g' configure*
383 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
384 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
385 src/cats/create_* src/cats/delete_* src/cats/drop_* \
386 src/cats/grant_* src/cats/make_* src/cats/update_*
387 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
390 cp -f %{_datadir}/automake/config.sub autoconf
391 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
393 --with-scriptdir=%{_libexecdir}/%{name} \
394 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
396 --enable-smartalloc \
397 %{?with_console_wx:--enable-wx-console} \
398 --enable-tray-monitor \
399 %{?with_python:--with-python} \
401 --with-tcp-wrappers \
402 --with-working-dir=%{_var}/lib/%{name} \
403 --with-dump-email="root@localhost" \
404 --with-job-email="root@localhost" \
405 --with-smtp-host=localhost \
406 --with-pid-dir=/var/run \
407 --with-subsys-dir=/var/lock/subsys \
409 --with-dir-password="#FAKE-dir-password#" \
410 --with-fd-password="#FAKE-fd-password#" \
411 --with-sd-password="#FAKE-sd-password#" \
412 --with-mon-dir-password="#FAKE-mon-dir-password#" \
413 --with-mon-fd-password="#FAKE-mon-fd-password#" \
414 --with-mon-sd-password="#FAKE-mon-sd-password#" \
429 rm -rf $RPM_BUILD_ROOT
431 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
432 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
433 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
436 DESTDIR=$RPM_BUILD_ROOT
439 strip -R.comment -R.note src/filed/static-bacula-fd
440 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
442 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
443 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
444 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
445 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
446 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
447 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
448 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
450 %if %{with console_wx}
451 # tray-monitor is for regular users
452 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
454 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
455 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
456 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
457 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
458 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
459 sed -e 's#%{_sbindir}#%{_bindir}#' \
460 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
464 # install the rescue stuff, these are the rescue scripts
465 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
466 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
467 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
468 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
471 # install the updatedb scripts
472 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
475 cp -a man1 man8 $RPM_BUILD_ROOT%{_mandir}
477 # place for site passwords
478 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
479 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
482 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
483 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
484 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gnome*
485 %if !%{with console_wx}
486 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
487 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/wx-console*
489 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
492 rm -rf $RPM_BUILD_ROOT
495 %groupadd -P %{name}-common -g 136 -r -f bacula
496 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
499 echo "Updating bacula passwords and names..."
501 for f in *-password ; do
502 if [ ! -s $f ] ; then
503 openssl rand -base64 33 > $f
506 for cf in *.conf *.conf.rpmnew ; do
507 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
510 for cf in *.conf *.conf.rpmnew ; do
511 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
515 if [ "$1" = "0" ]; then
522 [ -s %{_localstatedir}/bacula.db ] && \
523 DB_VER=`echo "select * from Version;" | \
524 %{_bindir}/sqlite %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
525 if [ -z "$DB_VER" ]; then
526 # grant privileges and create tables
527 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
528 %{_libexecdir}/%{name}/create_bacula_database > dev/null
529 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
530 elif [ "$DB_VER" -lt "9" ]; then
531 echo "Backing up bacula tables"
532 echo ".dump" | sqlite %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
534 echo "Upgrading bacula tables"
535 if [ "$DB_VER" -lt "9" ]; then
536 if [ "$DB_VER" -lt "8" ]; then
537 if [ "$DB_VER" -lt "7" ]; then
538 if [ "$DB_VER" -lt "6" ]; then
539 if [ "$DB_VER" -lt "5" ]; then
540 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
542 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
544 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
546 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
548 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
550 %{_libexecdir}/%{name}/update_bacula_tables
551 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
553 chown -R bacula:bacula %{_localstatedir}
554 chmod -R u+rX,go-rwx %{_localstatedir}/*
556 echo "Updating Bacula passwords and names..."
558 for f in *-password ; do
560 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
562 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
564 /sbin/chkconfig --add bacula-dir
565 %service bacula-dir restart "Bacula Director daemon"
568 if [ "$1" = "0" ]; then
569 %service bacula-dir stop
570 /sbin/chkconfig --del bacula-dir
574 echo "Updating Bacula passwords and names..."
576 for f in *-password ; do
578 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
580 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
582 /sbin/chkconfig --add bacula-fd
583 %service bacula-fd restart "Bacula File daemon"
586 if [ "$1" = "0" ]; then
587 %service bacula-fd stop
588 /sbin/chkconfig --del bacula-fd
592 echo "Updating Bacula passwords and names..."
594 for f in *-password ; do
596 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
598 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
600 /sbin/chkconfig --add bacula-sd
601 %service bacula-sd restart "Bacula Storage daemon"
604 if [ "$1" = "0" ]; then
605 %service bacula-sd stop
606 /sbin/chkconfig --del bacula-sd
610 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
611 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
615 echo "Updating Bacula passwords and names..."
617 for f in *-password ; do
619 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
621 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
624 echo "Updating Bacula passwords and names..."
626 for f in *-password ; do
628 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
630 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
633 echo "Updating Bacula passwords and names..."
635 for f in *-password ; do
637 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
639 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
642 echo "Updating Bacula passwords and names..."
644 for f in *-password ; do
646 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
648 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
651 # link our current installed conf file to the rescue directory
652 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
655 echo "Creating rescue files for this system..."
656 cd %{_sysconfdir}/rescue
660 # remove the files created after the initial rpm installation
661 if [ "$1" = "0" ]; then
662 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
663 rm -f %{_sysconfdir}/rescue/partition.*
664 rm -f %{_sysconfdir}/rescue/format.*
665 rm -f %{_sysconfdir}/rescue/mount_drives
666 rm -f %{_sysconfdir}/rescue/start_network
667 rm -f %{_sysconfdir}/rescue/sfdisk
668 rm -rf %{_sysconfdir}/rescue/diskinfo/*
672 %defattr(644,root,root,755)
675 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
676 %attr(755,root,root) %{_sbindir}/btraceback
677 %attr(755,root,root) %{_sbindir}/bsmtp
678 %{_mandir}/man8/bacula.8*
679 %dir %{_libexecdir}/%{name}
680 %{_libexecdir}/%{name}/btraceback.dbx
681 %{_libexecdir}/%{name}/btraceback.gdb
682 %attr(770,root,bacula) %dir %{_localstatedir}
685 %defattr(644,root,root,755)
686 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
687 %doc examples %{name}-docs-%{version}-1/manual/{*.pdf,bacula}
688 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
689 %ghost %{_sysconfdir}/.pw.sed
690 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
691 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
692 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
693 %attr(755,root,root) %{_sbindir}/bacula-dir
694 %attr(755,root,root) %{_sbindir}/bregex
695 %attr(755,root,root) %{_sbindir}/bwild
696 %attr(755,root,root) %{_sbindir}/dbcheck
697 %{_mandir}/man8/bacula-dir.8*
698 %{_mandir}/man1/dbcheck.1*
699 %{_libexecdir}/%{name}/query.sql
700 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
701 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
702 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
703 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
704 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
705 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite*
706 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
707 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
708 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
709 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
710 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
711 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
712 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
713 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
716 %defattr(644,root,root,755)
718 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
719 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
720 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
721 %attr(755,root,root) %{_sbindir}/bacula-fd
722 %{_mandir}/man8/bacula-fd.8*
725 %defattr(644,root,root,755)
728 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
729 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
730 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
731 %attr(755,root,root) %{_sbindir}/bacula-sd
732 %attr(755,root,root) %{_sbindir}/bcopy
733 %attr(755,root,root) %{_sbindir}/bextract
734 %attr(755,root,root) %{_sbindir}/bls
735 %attr(755,root,root) %{_sbindir}/bscan
736 %attr(755,root,root) %{_sbindir}/btape
737 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
738 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
739 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
740 %{_mandir}/man8/bacula-sd.8*
741 %{_mandir}/man1/bcopy.1*
742 %{_mandir}/man1/bextract.1*
743 %{_mandir}/man1/bls.1*
744 %{_mandir}/man1/bscan.1*
745 %{_mandir}/man1/btape.1*
748 %defattr(644,root,root,755)
750 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
751 %attr(755,root,root) %{_sbindir}/bconsole
752 %{_mandir}/man1/bconsole.1*
754 %if %{with console_wx}
756 %defattr(644,root,root,755)
758 %{_pixmapsdir}/%{name}.png
759 %{_desktopdir}/bacula-wx.desktop
760 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wx-console.conf
761 %attr(755,root,root) %{_sbindir}/wx-console
762 %{_mandir}/man1/wx-console.1*
767 %defattr(644,root,root,755)
769 %{_pixmapsdir}/%{name}.png
770 %{_desktopdir}/bacula.desktop
771 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gnome-console.conf
772 %attr(755,root,root) %{_sbindir}/gnome-console
773 #%{_mandir}/man1/gnome-console.1*
776 %if %{with console_wx}
778 %defattr(644,root,root,755)
780 %{_pixmapsdir}/%{name}-tray-monitor.xpm
781 %{_desktopdir}/%{name}-tray-monitor.desktop
782 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
783 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
784 #%{_mandir}/man1/bacula-tray-monitor.1*
789 %defattr(644,root,root,755)
791 %dir %{_sysconfdir}/rescue
792 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
793 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
794 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
795 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
796 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
797 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
798 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
799 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
800 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
801 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2