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(pre): /usr/sbin/groupadd
105 Requires(pre): /usr/sbin/useradd
106 Conflicts: bacula-console < 0:1.34.6
107 Conflicts: bacula-dir < 0:1.34.6
108 Conflicts: bacula-fd < 0:1.34.6
109 Conflicts: bacula-sd < 0:1.34.6
112 Bacula - It comes by night and sucks the vital essence from your
115 Bacula is a set of computer programs that permit you (or the system
116 administrator) to manage backup, recovery, and verification of
117 computer data across a network of computers of different kinds. In
118 technical terms, it is a network client/server based backup program.
119 Bacula is relatively easy to use and efficient, while offering many
120 advanced storage management features that make it easy to find and
121 recover lost or damaged files.
123 %description common -l pl
124 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
126 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
127 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
128 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
129 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
130 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
131 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
132 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
136 Summary: Bacula Director and Catalog services
137 Summary(pl): Us³ugi Bacula Director i Catalog
138 Group: Networking/Utilities
139 Requires(post): sed >= 4.0
140 Requires: %{name}-common = %{epoch}:%{version}-%{release}
141 Obsoletes: bacula-updatedb
144 Bacula - It comes by night and sucks the vital essence from your
147 Bacula Director is the program that supervises all the backup,
148 restore, verify and archive operations. The system administrator uses
149 the Bacula Director to schedule backups and to recover files. Catalog
150 services are comprised of the software programs responsible for
151 maintaining the file indexes and volume databases for all files backed
152 up. The Catalog services permit the System Administrator or user to
153 quickly locate and restore any desired file, since it maintains a
154 record of all Volumes used, all Jobs run, and all Files saved. This
155 build requires sqlite to be installed separately as the catalog
158 %description dir -l pl
159 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
161 Bacula Director to program nadzoruj±cy wszystkie operacje wykonywania
162 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
163 Administrator u¿ywa Bacula Directora do szeregowania kopii zapasowych
164 oraz odzyskiwania plików. Us³ugi katalogowe (Catalog services) s±
165 u¿ywane przez programy odpowiedzialne za zarz±dzanie indeksami plików
166 i baz± danych wolumenów dla wszystkich kopiowanych plików. Us³ugi
167 katalogowe umo¿liwiaj± administratorowi lub u¿ytkownikowi szybko
168 zlokalizowaæ i odtworzyæ dowolny plik, poniewa¿ utrzymuj± rekord ze
169 wszystkimi u¿ywanymi wolumenami, uruchomionymi zadaniami i zapisanymi
170 plikami. Pakiet wymaga sqlite zainstalowanego oddzielnie jako bazy
174 Summary: Bacula Console
175 Summary(pl): Konsola Baculi
176 Group: Networking/Utilities
177 Requires(post): sed >= 4.0
178 Requires: %{name}-common = %{epoch}:%{version}-%{release}
181 Bacula - It comes by night and sucks the vital essence from your
184 Bacula Console is the program that allows the administrator or user to
185 communicate with the Bacula Director. This is the text only console
188 %description console -l pl
189 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
191 Bacula Console to program umo¿liwiaj±cy administratorowi lub
192 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
193 interfejs czysto tekstowy.
196 Summary: Bacula wxWidgets Console
197 Summary(pl): Konsola Baculi oparta na wxWidgets
198 Group: Networking/Utilities
199 Requires(post): sed >= 4.0
200 Requires: %{name}-common = %{epoch}:%{version}-%{release}
202 %description console-wx
203 Bacula - It comes by night and sucks the vital essence from your
206 Bacula Console is the program that allows the administrator or user to
207 communicate with the Bacula Director. This is the wxWidgets GUI
210 %description console-wx -l pl
211 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
213 Bacula Console to program umo¿liwiaj±cy administratorowi lub
214 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
215 interfejs graficzny oparty na wxWidgets.
217 %package console-gnome
218 Summary: Bacula GNOME Console
219 Summary(pl): Konsola Baculi oparta dla GNOME
220 Group: Networking/Utilities
221 Requires(post): sed >= 4.0
222 Requires: %{name}-common = %{epoch}:%{version}-%{release}
224 %description console-gnome
225 Bacula - It comes by night and sucks the vital essence from your
228 Bacula Console is the program that allows the administrator or user to
229 communicate with the Bacula Director. This is the GNOME GUI interface.
231 %description console-gnome -l pl
232 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
234 Bacula Console to program umo¿liwiaj±cy administratorowi lub
235 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
236 interfejs graficzny oparty na GNOME.
238 %package tray-monitor
239 Summary: Bacula Tray Monitor
240 Group: Networking/Utilities
241 Requires(post): sed >= 4.0
242 Requires: %{name}-common = %{epoch}:%{version}-%{release}
244 %description tray-monitor
245 Bacula - It comes by night and sucks the vital essence from your
248 The Monitor program is typically an icon in the system tray. However,
249 once the icon is expanded into a full window, the administrator or
250 user can obtain status information about the Director or the backup
251 status on the local workstation or any other Bacula daemon that is
255 Summary: Bacula File services (Client)
256 Summary(pl): Us³ugi Bacula File (klient)
257 Group: Networking/Utilities
258 Requires(post): sed >= 4.0
259 Requires: %{name}-common = %{epoch}:%{version}-%{release}
262 Bacula - It comes by night and sucks the vital essence from your
265 Bacula File services (or Client program) is the software program that
266 is installed on the machine to be backed up. It is specific to the
267 operating system on which it runs and is responsible for providing the
268 file attributes and data when requested by the Director. The File
269 services are also responsible for the file system dependent part of
270 restoring the file attributes and data during a recovery operation.
271 This program runs as a daemon on the machine to be backed up, and in
272 some of the documentation, the File daemon is referred to as the
273 Client (for example in Bacula configuration file).
275 %description fd -l pl
276 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
278 Us³ugi Bacula File (inaczej program kliencki) to oprogramowanie, które
279 instaluje siê na maszynach, z których maj± byæ wykonywane kopie
280 zapasowe. S± one specyficzne dla systemu operacyjnego, pod którym
281 dzia³a dana maszyna i odpowiadaj± za dostarczanie atrybutów i danych
282 plików na ¿±danie Directora. Us³ugi plikowe s± tak¿e odpowiedzialne za
283 zale¿n± od systemu plików czê¶æ odzyskiwania atrybutów i danych plików
284 podczas operacji odzyskiwania danych. Program dzia³a jako demon na
285 maszynie, która ma byæ backupowana i w czê¶ci dokumentacji demon ten
286 (File) jest nazywany klientem (na przyk³ad w pliku konfiguracyjnym
290 Summary: Bacula Storage services
291 Summary(pl): Us³ugi Bacula Storage
292 Group: Networking/Utilities
293 Requires(post): sed >= 4.0
294 Requires: %{name}-common = %{epoch}:%{version}-%{release}
295 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
298 Bacula - It comes by night and sucks the vital essence from your
301 Bacula Storage services consist of the software programs that perform
302 the storage and recovery of the file attributes and data to the
303 physical backup media or volumes. In other words, the Storage daemon
304 is responsible for reading and writing your tapes (or other storage
305 media, e.g. files). The Storage services runs as a daemon on the
306 machine that has the backup device (usually a tape drive).
308 %description sd -l pl
309 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
311 Us³ugi Bacula Storage sk³adaj± siê z programów obs³uguj±cych
312 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
313 fizycznych no¶nikach lub wolumenach. Innymi s³owy, demon Storage jest
314 odpowiedzialny za odczyt i zapis ta¶m (lub innych no¶ników do
315 przechowywania danych, np. plików). Us³ugi Storage dzia³aj± jako demon
316 na maszynie, która zawiera urz±dzenie backupowe (zwykle napêd
320 Summary: Bacula - The Network Backup Solution
321 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
322 Group: Networking/Utilities
323 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
328 Bacula - It comes by night and sucks the vital essence from your
331 Bacula is a set of computer programs that permit you (or the system
332 administrator) to manage backup, recovery, and verification of
333 computer data across a network of computers of different kinds. In
334 technical terms, it is a network client/server based backup program.
335 Bacula is relatively easy to use and efficient, while offering many
336 advanced storage management features that make it easy to find and
337 recover lost or damaged files.
339 This package installs scripts for disaster recovery and builds rescue
340 floppy disk for bare metal recovery.
342 To make the bacula rescue disk run "./make_rescue_disk
344 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
345 recreate the rescue information for this system run ./getdiskinfo
348 %description rescue -l pl
349 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
351 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
352 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
353 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
354 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
355 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
356 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
357 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
360 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkê
361 ratunkowe do odtwarzania systemu od zera.
363 Aby stworzyæ dyskietkê ratunkow± Baculi, nale¿y uruchomiæ "./make_rescue_disk
364 --copy-static-bacula - --copy-etc-files" z katalogu
365 %{_sysconfdir}/rescue . Aby ponownie utworzyæ informacje ratunkowe dla
366 danego systemu, nale¿y ponownie uruchomiæ ./getdiskinfo .
376 tar -xf %{SOURCE4} && ln -s bacula-rescue-* rescue
377 sed -i -e 's#wx-config#wx-gtk2-ansi-config#g' configure*
378 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
379 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
380 src/cats/create_* src/cats/delete_* src/cats/drop_* \
381 src/cats/grant_* src/cats/make_* src/cats/update_*
382 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
385 cp -f %{_datadir}/automake/config.sub autoconf
386 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
388 --with-scriptdir=%{_libexecdir}/%{name} \
389 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
391 --enable-smartalloc \
392 %{?with_console_wx:--enable-wx-console} \
393 --enable-tray-monitor \
394 %{?with_python:--with-python} \
396 --with-tcp-wrappers \
397 --with-working-dir=%{_var}/lib/%{name} \
398 --with-dump-email="root@localhost" \
399 --with-job-email="root@localhost" \
400 --with-smtp-host=localhost \
401 --with-pid-dir=/var/run \
402 --with-subsys-dir=/var/lock/subsys \
404 --with-dir-password="#FAKE-dir-password#" \
405 --with-fd-password="#FAKE-fd-password#" \
406 --with-sd-password="#FAKE-sd-password#" \
407 --with-mon-dir-password="#FAKE-mon-dir-password#" \
408 --with-mon-fd-password="#FAKE-mon-fd-password#" \
409 --with-mon-sd-password="#FAKE-mon-sd-password#" \
424 rm -rf $RPM_BUILD_ROOT
426 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
427 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
428 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
431 DESTDIR=$RPM_BUILD_ROOT
434 strip -R.comment -R.note src/filed/static-bacula-fd
435 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
437 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
438 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
439 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
440 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
441 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
442 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
443 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
445 %if %{with console_wx}
446 # tray-monitor is for regular users
447 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
449 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
450 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
451 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
452 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
453 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
454 sed -e 's#%{_sbindir}#%{_bindir}#' \
455 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
459 # install the rescue stuff, these are the rescue scripts
460 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
461 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
462 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
463 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
466 # install the updatedb scripts
467 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
470 cp -a man1 man8 $RPM_BUILD_ROOT%{_mandir}
472 # place for site passwords
473 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
474 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
477 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
478 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
479 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gnome*
480 %if !%{with console_wx}
481 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
482 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/wx-console*
484 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
487 rm -rf $RPM_BUILD_ROOT
490 %groupadd -P %{name}-common -g 136 -r -f bacula
491 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
494 echo "Updating bacula passwords and names..."
496 for f in *-password ; do
497 if [ ! -s $f ] ; then
498 openssl rand -base64 33 > $f
501 for cf in *.conf *.conf.rpmnew ; do
502 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
505 for cf in *.conf *.conf.rpmnew ; do
506 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
510 if [ "$1" = "0" ]; then
517 [ -s %{_localstatedir}/bacula.db ] && \
518 DB_VER=`echo "select * from Version;" | \
519 %{_bindir}/sqlite %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
520 if [ -z "$DB_VER" ]; then
521 # grant privileges and create tables
522 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
523 %{_libexecdir}/%{name}/create_bacula_database > dev/null
524 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
525 elif [ "$DB_VER" -lt "9" ]; then
526 echo "Backing up bacula tables"
527 echo ".dump" | sqlite %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
529 echo "Upgrading bacula tables"
530 if [ "$DB_VER" -lt "9" ]; then
531 if [ "$DB_VER" -lt "8" ]; then
532 if [ "$DB_VER" -lt "7" ]; then
533 if [ "$DB_VER" -lt "6" ]; then
534 if [ "$DB_VER" -lt "5" ]; then
535 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
537 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
539 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
541 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
543 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
545 %{_libexecdir}/%{name}/update_bacula_tables
546 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
548 chown -R bacula:bacula %{_localstatedir}
549 chmod -R u+rX,go-rwx %{_localstatedir}/*
551 echo "Updating Bacula passwords and names..."
553 for f in *-password ; do
555 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
557 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
559 /sbin/chkconfig --add bacula-dir
560 %service bacula-dir restart "Bacula Director daemon"
563 if [ "$1" = "0" ]; then
564 %service bacula-dir stop
565 /sbin/chkconfig --del bacula-dir
569 echo "Updating Bacula passwords and names..."
571 for f in *-password ; do
573 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
575 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
577 /sbin/chkconfig --add bacula-fd
578 %service bacula-fd restart "Bacula File daemon"
581 if [ "$1" = "0" ]; then
582 %service bacula-fd stop
583 /sbin/chkconfig --del bacula-fd
587 echo "Updating Bacula passwords and names..."
589 for f in *-password ; do
591 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
593 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
595 /sbin/chkconfig --add bacula-sd
596 %service bacula-sd restart "Bacula Storage daemon"
599 if [ "$1" = "0" ]; then
600 %service bacula-sd stop
601 /sbin/chkconfig --del bacula-sd
605 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
606 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
610 echo "Updating Bacula passwords and names..."
612 for f in *-password ; do
614 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
616 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
619 echo "Updating Bacula passwords and names..."
621 for f in *-password ; do
623 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
625 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
628 echo "Updating Bacula passwords and names..."
630 for f in *-password ; do
632 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
634 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
637 echo "Updating Bacula passwords and names..."
639 for f in *-password ; do
641 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
643 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
646 # link our current installed conf file to the rescue directory
647 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
650 echo "Creating rescue files for this system..."
651 cd %{_sysconfdir}/rescue
655 # remove the files created after the initial rpm installation
656 if [ "$1" = "0" ]; then
657 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
658 rm -f %{_sysconfdir}/rescue/partition.*
659 rm -f %{_sysconfdir}/rescue/format.*
660 rm -f %{_sysconfdir}/rescue/mount_drives
661 rm -f %{_sysconfdir}/rescue/start_network
662 rm -f %{_sysconfdir}/rescue/sfdisk
663 rm -rf %{_sysconfdir}/rescue/diskinfo/*
667 %defattr(644,root,root,755)
670 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
671 %attr(755,root,root) %{_sbindir}/btraceback
672 %attr(755,root,root) %{_sbindir}/bsmtp
673 %{_mandir}/man8/bacula.8*
674 %dir %{_libexecdir}/%{name}
675 %{_libexecdir}/%{name}/btraceback.dbx
676 %{_libexecdir}/%{name}/btraceback.gdb
677 %attr(770,root,bacula) %dir %{_localstatedir}
680 %defattr(644,root,root,755)
681 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
682 %doc examples %{name}-docs-%{version}-1/manual/{*.pdf,bacula}
683 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
684 %ghost %{_sysconfdir}/.pw.sed
685 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
686 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
687 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
688 %attr(755,root,root) %{_sbindir}/bacula-dir
689 %attr(755,root,root) %{_sbindir}/bregex
690 %attr(755,root,root) %{_sbindir}/bwild
691 %attr(755,root,root) %{_sbindir}/dbcheck
692 %{_mandir}/man8/bacula-dir.8*
693 %{_mandir}/man1/dbcheck.1*
694 %{_libexecdir}/%{name}/query.sql
695 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
696 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
697 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
698 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
699 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
700 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite*
701 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
702 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
703 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
704 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
705 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
706 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
707 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
708 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
711 %defattr(644,root,root,755)
713 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
714 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
715 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
716 %attr(755,root,root) %{_sbindir}/bacula-fd
717 %{_mandir}/man8/bacula-fd.8*
720 %defattr(644,root,root,755)
723 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
724 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
725 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
726 %attr(755,root,root) %{_sbindir}/bacula-sd
727 %attr(755,root,root) %{_sbindir}/bcopy
728 %attr(755,root,root) %{_sbindir}/bextract
729 %attr(755,root,root) %{_sbindir}/bls
730 %attr(755,root,root) %{_sbindir}/bscan
731 %attr(755,root,root) %{_sbindir}/btape
732 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
733 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
734 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
735 %{_mandir}/man8/bacula-sd.8*
736 %{_mandir}/man1/bcopy.1*
737 %{_mandir}/man1/bextract.1*
738 %{_mandir}/man1/bls.1*
739 %{_mandir}/man1/bscan.1*
740 %{_mandir}/man1/btape.1*
743 %defattr(644,root,root,755)
745 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
746 %attr(755,root,root) %{_sbindir}/bconsole
747 %{_mandir}/man1/bconsole.1*
749 %if %{with console_wx}
751 %defattr(644,root,root,755)
753 %{_pixmapsdir}/%{name}.png
754 %{_desktopdir}/bacula-wx.desktop
755 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wx-console.conf
756 %attr(755,root,root) %{_sbindir}/wx-console
757 %{_mandir}/man1/wx-console.1*
762 %defattr(644,root,root,755)
764 %{_pixmapsdir}/%{name}.png
765 %{_desktopdir}/bacula.desktop
766 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gnome-console.conf
767 %attr(755,root,root) %{_sbindir}/gnome-console
768 #%{_mandir}/man1/gnome-console.1*
771 %if %{with console_wx}
773 %defattr(644,root,root,755)
775 %{_pixmapsdir}/%{name}-tray-monitor.xpm
776 %{_desktopdir}/%{name}-tray-monitor.desktop
777 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
778 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
779 #%{_mandir}/man1/bacula-tray-monitor.1*
784 %defattr(644,root,root,755)
786 %dir %{_sysconfdir}/rescue
787 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
788 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
789 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
790 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
791 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
792 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
793 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
794 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
795 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
796 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2