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 URL: http://www.bacula.org/
42 BuildRequires: acl-static
43 BuildRequires: automake
44 %{?with_rescue:BuildRequires: fakeroot}
45 BuildRequires: glibc-static
47 BuildRequires: libgnome-devel >= 2.0
48 BuildRequires: libgnomeui-devel >= 2.0
50 BuildRequires: libstdc++-static
51 BuildRequires: libwrap-static
53 BuildRequires: ncurses-devel
54 BuildRequires: openssl-devel
55 BuildRequires: openssl-static
56 BuildRequires: pkgconfig
57 %{?with_python:BuildRequires: python-static}
58 BuildRequires: readline-devel
59 BuildRequires: rpmbuild(macros) >= 1.268
60 BuildRequires: sed >= 4.0
61 BuildRequires: sqlite-devel
62 %if %{with console_wx}
63 BuildRequires: wxGTK2-devel >= 2.4.0
65 BuildRequires: zlib-devel
66 BuildRequires: zlib-static
67 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 %define _sysconfdir /etc/%{name}
70 %define _localstatedir /var/lib/%{name}
73 Bacula - It comes by night and sucks the vital essence from your
76 Bacula is a set of computer programs that permit you (or the system
77 administrator) to manage backup, recovery, and verification of
78 computer data across a network of computers of different kinds. In
79 technical terms, it is a network client/server based backup program.
80 Bacula is relatively easy to use and efficient, while offering many
81 advanced storage management features that make it easy to find and
82 recover lost or damaged files.
85 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
87 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
88 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
89 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
90 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
91 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
92 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
93 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
97 Summary: Common files for bacula package
98 Summary(pl): Pliki wspólne dla pakietu bacula
99 Group: Networking/Utilities
100 Requires(post): openssl-tools
101 Requires(post): sed >= 4.0
102 Requires(post,preun): /sbin/chkconfig
103 Requires(pre): /usr/sbin/groupadd
104 Requires(pre): /usr/sbin/useradd
105 Conflicts: bacula-console < 0:1.34.6
106 Conflicts: bacula-dir < 0:1.34.6
107 Conflicts: bacula-fd < 0:1.34.6
108 Conflicts: bacula-sd < 0:1.34.6
111 Bacula - It comes by night and sucks the vital essence from your
114 Bacula is a set of computer programs that permit you (or the system
115 administrator) to manage backup, recovery, and verification of
116 computer data across a network of computers of different kinds. In
117 technical terms, it is a network client/server based backup program.
118 Bacula is relatively easy to use and efficient, while offering many
119 advanced storage management features that make it easy to find and
120 recover lost or damaged files.
122 %description common -l pl
123 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
125 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
126 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
127 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
128 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
129 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
130 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
131 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
135 Summary: Bacula Director and Catalog services
136 Summary(pl): Us³ugi Bacula Director i Catalog
137 Group: Networking/Utilities
138 Requires(post): sed >= 4.0
139 Requires: %{name}-common = %{epoch}:%{version}-%{release}
140 Obsoletes: bacula-updatedb
143 Bacula - It comes by night and sucks the vital essence from your
146 Bacula Director is the program that supervises all the backup,
147 restore, verify and archive operations. The system administrator uses
148 the Bacula Director to schedule backups and to recover files. Catalog
149 services are comprised of the software programs responsible for
150 maintaining the file indexes and volume databases for all files backed
151 up. The Catalog services permit the System Administrator or user to
152 quickly locate and restore any desired file, since it maintains a
153 record of all Volumes used, all Jobs run, and all Files saved. This
154 build requires sqlite to be installed separately as the catalog
157 %description dir -l pl
158 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
160 Bacula Director to program nadzoruj±cy wszystkie operacje wykonywania
161 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
162 Administrator u¿ywa Bacula Directora do szeregowania kopii zapasowych
163 oraz odzyskiwania plików. Us³ugi katalogowe (Catalog services) s±
164 u¿ywane przez programy odpowiedzialne za zarz±dzanie indeksami plików
165 i baz± danych wolumenów dla wszystkich kopiowanych plików. Us³ugi
166 katalogowe umo¿liwiaj± administratorowi lub u¿ytkownikowi szybko
167 zlokalizowaæ i odtworzyæ dowolny plik, poniewa¿ utrzymuj± rekord ze
168 wszystkimi u¿ywanymi wolumenami, uruchomionymi zadaniami i zapisanymi
169 plikami. Pakiet wymaga sqlite zainstalowanego oddzielnie jako bazy
173 Summary: Bacula Console
174 Summary(pl): Konsola Baculi
175 Group: Networking/Utilities
176 Requires(post): sed >= 4.0
177 Requires: %{name}-common = %{epoch}:%{version}-%{release}
180 Bacula - It comes by night and sucks the vital essence from your
183 Bacula Console is the program that allows the administrator or user to
184 communicate with the Bacula Director. This is the text only console
187 %description console -l pl
188 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
190 Bacula Console to program umo¿liwiaj±cy administratorowi lub
191 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
192 interfejs czysto tekstowy.
195 Summary: Bacula wxWidgets Console
196 Summary(pl): Konsola Baculi oparta na wxWidgets
197 Group: Networking/Utilities
198 Requires(post): sed >= 4.0
199 Requires: %{name}-common = %{epoch}:%{version}-%{release}
201 %description console-wx
202 Bacula - It comes by night and sucks the vital essence from your
205 Bacula Console is the program that allows the administrator or user to
206 communicate with the Bacula Director. This is the wxWidgets GUI
209 %description console-wx -l pl
210 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
212 Bacula Console to program umo¿liwiaj±cy administratorowi lub
213 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
214 interfejs graficzny oparty na wxWidgets.
216 %package console-gnome
217 Summary: Bacula GNOME Console
218 Summary(pl): Konsola Baculi oparta dla GNOME
219 Group: Networking/Utilities
220 Requires(post): sed >= 4.0
221 Requires: %{name}-common = %{epoch}:%{version}-%{release}
223 %description console-gnome
224 Bacula - It comes by night and sucks the vital essence from your
227 Bacula Console is the program that allows the administrator or user to
228 communicate with the Bacula Director. This is the GNOME GUI interface.
230 %description console-gnome -l pl
231 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
233 Bacula Console to program umo¿liwiaj±cy administratorowi lub
234 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
235 interfejs graficzny oparty na GNOME.
237 %package tray-monitor
238 Summary: Bacula Tray Monitor
239 Group: Networking/Utilities
240 Requires(post): sed >= 4.0
241 Requires: %{name}-common = %{epoch}:%{version}-%{release}
243 %description tray-monitor
244 Bacula - It comes by night and sucks the vital essence from your
247 The Monitor program is typically an icon in the system tray. However,
248 once the icon is expanded into a full window, the administrator or
249 user can obtain status information about the Director or the backup
250 status on the local workstation or any other Bacula daemon that is
254 Summary: Bacula File services (Client)
255 Summary(pl): Us³ugi Bacula File (klient)
256 Group: Networking/Utilities
257 Requires(post): sed >= 4.0
258 Requires: %{name}-common = %{epoch}:%{version}-%{release}
261 Bacula - It comes by night and sucks the vital essence from your
264 Bacula File services (or Client program) is the software program that
265 is installed on the machine to be backed up. It is specific to the
266 operating system on which it runs and is responsible for providing the
267 file attributes and data when requested by the Director. The File
268 services are also responsible for the file system dependent part of
269 restoring the file attributes and data during a recovery operation.
270 This program runs as a daemon on the machine to be backed up, and in
271 some of the documentation, the File daemon is referred to as the
272 Client (for example in Bacula configuration file).
274 %description fd -l pl
275 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
277 Us³ugi Bacula File (inaczej program kliencki) to oprogramowanie, które
278 instaluje siê na maszynach, z których maj± byæ wykonywane kopie
279 zapasowe. S± one specyficzne dla systemu operacyjnego, pod którym
280 dzia³a dana maszyna i odpowiadaj± za dostarczanie atrybutów i danych
281 plików na ¿±danie Directora. Us³ugi plikowe s± tak¿e odpowiedzialne za
282 zale¿n± od systemu plików czê¶æ odzyskiwania atrybutów i danych plików
283 podczas operacji odzyskiwania danych. Program dzia³a jako demon na
284 maszynie, która ma byæ backupowana i w czê¶ci dokumentacji demon ten
285 (File) jest nazywany klientem (na przyk³ad w pliku konfiguracyjnym
289 Summary: Bacula Storage services
290 Summary(pl): Us³ugi Bacula Storage
291 Group: Networking/Utilities
292 Requires(post): sed >= 4.0
293 Requires: %{name}-common = %{epoch}:%{version}-%{release}
294 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
297 Bacula - It comes by night and sucks the vital essence from your
300 Bacula Storage services consist of the software programs that perform
301 the storage and recovery of the file attributes and data to the
302 physical backup media or volumes. In other words, the Storage daemon
303 is responsible for reading and writing your tapes (or other storage
304 media, e.g. files). The Storage services runs as a daemon on the
305 machine that has the backup device (usually a tape drive).
307 %description sd -l pl
308 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
310 Us³ugi Bacula Storage sk³adaj± siê z programów obs³uguj±cych
311 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
312 fizycznych no¶nikach lub wolumenach. Innymi s³owy, demon Storage jest
313 odpowiedzialny za odczyt i zapis ta¶m (lub innych no¶ników do
314 przechowywania danych, np. plików). Us³ugi Storage dzia³aj± jako demon
315 na maszynie, która zawiera urz±dzenie backupowe (zwykle napêd
319 Summary: Bacula - The Network Backup Solution
320 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
321 Group: Networking/Utilities
322 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
327 Bacula - It comes by night and sucks the vital essence from your
330 Bacula is a set of computer programs that permit you (or the system
331 administrator) to manage backup, recovery, and verification of
332 computer data across a network of computers of different kinds. In
333 technical terms, it is a network client/server based backup program.
334 Bacula is relatively easy to use and efficient, while offering many
335 advanced storage management features that make it easy to find and
336 recover lost or damaged files.
338 This package installs scripts for disaster recovery and builds rescue
339 floppy disk for bare metal recovery.
341 To make the bacula rescue disk run "./make_rescue_disk
343 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
344 recreate the rescue information for this system run ./getdiskinfo
347 %description rescue -l pl
348 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
350 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
351 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
352 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
353 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
354 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
355 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
356 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
359 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkê
360 ratunkowe do odtwarzania systemu od zera.
362 Aby stworzyæ dyskietkê ratunkow± Baculi, nale¿y uruchomiæ "./make_rescue_disk
363 --copy-static-bacula - --copy-etc-files" z katalogu
364 %{_sysconfdir}/rescue . Aby ponownie utworzyæ informacje ratunkowe dla
365 danego systemu, nale¿y ponownie uruchomiæ ./getdiskinfo .
374 tar -xf %{SOURCE4} && ln -s bacula-rescue-* rescue
375 sed -i -e 's#wx-config#wx-gtk2-ansi-config#g' configure*
376 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
377 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
378 src/cats/create_* src/cats/delete_* src/cats/drop_* \
379 src/cats/grant_* src/cats/make_* src/cats/update_*
380 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
383 cp -f %{_datadir}/automake/config.sub autoconf
384 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
386 --with-scriptdir=%{_libexecdir}/%{name} \
387 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
389 --enable-smartalloc \
390 %{?with_console_wx:--enable-wx-console} \
391 --enable-tray-monitor \
392 %{?with_python:--with-python} \
394 --with-tcp-wrappers \
395 --with-working-dir=%{_var}/lib/%{name} \
396 --with-dump-email="root@localhost" \
397 --with-job-email="root@localhost" \
398 --with-smtp-host=localhost \
399 --with-pid-dir=/var/run \
400 --with-subsys-dir=/var/lock/subsys \
402 --with-dir-password="#FAKE-dir-password#" \
403 --with-fd-password="#FAKE-fd-password#" \
404 --with-sd-password="#FAKE-sd-password#" \
405 --with-mon-dir-password="#FAKE-mon-dir-password#" \
406 --with-mon-fd-password="#FAKE-mon-fd-password#" \
407 --with-mon-sd-password="#FAKE-mon-sd-password#" \
422 rm -rf $RPM_BUILD_ROOT
424 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
425 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
426 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
429 DESTDIR=$RPM_BUILD_ROOT
432 strip -R.comment -R.note src/filed/static-bacula-fd
433 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
435 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
436 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
437 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
438 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
439 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
440 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
441 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
443 %if %{with console_wx}
444 # tray-monitor is for regular users
445 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
447 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
448 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
449 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
450 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
451 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
452 sed -e 's#%{_sbindir}#%{_bindir}#' \
453 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
457 # install the rescue stuff, these are the rescue scripts
458 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
459 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
460 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
461 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
464 # install the updatedb scripts
465 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
468 cp -a man1 man8 $RPM_BUILD_ROOT%{_mandir}
470 # place for site passwords
471 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
472 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
475 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
476 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
477 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gnome*
478 %if %{without console_wx}
479 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
480 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/wx-console*
482 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
485 rm -rf $RPM_BUILD_ROOT
488 %groupadd -P %{name}-common -g 136 -r -f bacula
489 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
492 echo "Updating bacula passwords and names..."
494 for f in *-password ; do
495 if [ ! -s $f ] ; then
496 openssl rand -base64 33 > $f
499 for cf in *.conf *.conf.rpmnew ; do
500 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
503 for cf in *.conf *.conf.rpmnew ; do
504 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
508 if [ "$1" = "0" ]; then
515 [ -s %{_localstatedir}/bacula.db ] && \
516 DB_VER=`echo "select * from Version;" | \
517 %{_bindir}/sqlite %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
518 if [ -z "$DB_VER" ]; then
519 # grant privileges and create tables
520 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
521 %{_libexecdir}/%{name}/create_bacula_database > dev/null
522 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
523 elif [ "$DB_VER" -lt "9" ]; then
524 echo "Backing up bacula tables"
525 echo ".dump" | sqlite %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
527 echo "Upgrading bacula tables"
528 if [ "$DB_VER" -lt "9" ]; then
529 if [ "$DB_VER" -lt "8" ]; then
530 if [ "$DB_VER" -lt "7" ]; then
531 if [ "$DB_VER" -lt "6" ]; then
532 if [ "$DB_VER" -lt "5" ]; then
533 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
535 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
537 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
539 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
541 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
543 %{_libexecdir}/%{name}/update_bacula_tables
544 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
546 chown -R bacula:bacula %{_localstatedir}
547 chmod -R u+rX,go-rwx %{_localstatedir}/*
549 echo "Updating Bacula passwords and names..."
551 for f in *-password ; do
553 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
555 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
557 /sbin/chkconfig --add bacula-dir
558 %service bacula-dir restart "Bacula Director daemon"
561 if [ "$1" = "0" ]; then
562 %service bacula-dir stop
563 /sbin/chkconfig --del bacula-dir
567 echo "Updating Bacula passwords and names..."
569 for f in *-password ; do
571 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
573 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
575 /sbin/chkconfig --add bacula-fd
576 %service bacula-fd restart "Bacula File daemon"
579 if [ "$1" = "0" ]; then
580 %service bacula-fd stop
581 /sbin/chkconfig --del bacula-fd
585 echo "Updating Bacula passwords and names..."
587 for f in *-password ; do
589 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
591 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
593 /sbin/chkconfig --add bacula-sd
594 %service bacula-sd restart "Bacula Storage daemon"
597 if [ "$1" = "0" ]; then
598 %service bacula-sd stop
599 /sbin/chkconfig --del bacula-sd
603 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
604 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
608 echo "Updating Bacula passwords and names..."
610 for f in *-password ; do
612 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
614 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
617 echo "Updating Bacula passwords and names..."
619 for f in *-password ; do
621 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
623 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
626 echo "Updating Bacula passwords and names..."
628 for f in *-password ; do
630 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
632 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
635 echo "Updating Bacula passwords and names..."
637 for f in *-password ; do
639 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
641 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
644 # link our current installed conf file to the rescue directory
645 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
648 echo "Creating rescue files for this system..."
649 cd %{_sysconfdir}/rescue
653 # remove the files created after the initial rpm installation
654 if [ "$1" = "0" ]; then
655 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
656 rm -f %{_sysconfdir}/rescue/partition.*
657 rm -f %{_sysconfdir}/rescue/format.*
658 rm -f %{_sysconfdir}/rescue/mount_drives
659 rm -f %{_sysconfdir}/rescue/start_network
660 rm -f %{_sysconfdir}/rescue/sfdisk
661 rm -rf %{_sysconfdir}/rescue/diskinfo/*
665 %defattr(644,root,root,755)
668 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
669 %attr(755,root,root) %{_sbindir}/btraceback
670 %attr(755,root,root) %{_sbindir}/bsmtp
671 %{_mandir}/man8/bacula.8*
672 %dir %{_libexecdir}/%{name}
673 %{_libexecdir}/%{name}/btraceback.dbx
674 %{_libexecdir}/%{name}/btraceback.gdb
675 %attr(770,root,bacula) %dir %{_localstatedir}
678 %defattr(644,root,root,755)
679 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
680 %doc examples %{name}-docs-%{version}-1/manual/{*.pdf,bacula}
681 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
682 %ghost %{_sysconfdir}/.pw.sed
683 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
684 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
685 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
686 %attr(755,root,root) %{_sbindir}/bacula-dir
687 %attr(755,root,root) %{_sbindir}/bregex
688 %attr(755,root,root) %{_sbindir}/bwild
689 %attr(755,root,root) %{_sbindir}/dbcheck
690 %{_mandir}/man8/bacula-dir.8*
691 %{_mandir}/man1/dbcheck.1*
692 %{_libexecdir}/%{name}/query.sql
693 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
694 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
695 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
696 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
697 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
698 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite*
699 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
700 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
701 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
702 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
703 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
704 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
705 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
706 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
709 %defattr(644,root,root,755)
711 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
712 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
713 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
714 %attr(755,root,root) %{_sbindir}/bacula-fd
715 %{_mandir}/man8/bacula-fd.8*
718 %defattr(644,root,root,755)
721 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
722 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
723 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
724 %attr(755,root,root) %{_sbindir}/bacula-sd
725 %attr(755,root,root) %{_sbindir}/bcopy
726 %attr(755,root,root) %{_sbindir}/bextract
727 %attr(755,root,root) %{_sbindir}/bls
728 %attr(755,root,root) %{_sbindir}/bscan
729 %attr(755,root,root) %{_sbindir}/btape
730 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
731 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
732 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
733 %{_mandir}/man8/bacula-sd.8*
734 %{_mandir}/man1/bcopy.1*
735 %{_mandir}/man1/bextract.1*
736 %{_mandir}/man1/bls.1*
737 %{_mandir}/man1/bscan.1*
738 %{_mandir}/man1/btape.1*
741 %defattr(644,root,root,755)
743 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
744 %attr(755,root,root) %{_sbindir}/bconsole
745 %{_mandir}/man1/bconsole.1*
747 %if %{with console_wx}
749 %defattr(644,root,root,755)
751 %{_pixmapsdir}/%{name}.png
752 %{_desktopdir}/bacula-wx.desktop
753 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wx-console.conf
754 %attr(755,root,root) %{_sbindir}/wx-console
755 %{_mandir}/man1/wx-console.1*
760 %defattr(644,root,root,755)
762 %{_pixmapsdir}/%{name}.png
763 %{_desktopdir}/bacula.desktop
764 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gnome-console.conf
765 %attr(755,root,root) %{_sbindir}/gnome-console
766 #%{_mandir}/man1/gnome-console.1*
769 %if %{with console_wx}
771 %defattr(644,root,root,755)
773 %{_pixmapsdir}/%{name}-tray-monitor.xpm
774 %{_desktopdir}/%{name}-tray-monitor.desktop
775 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
776 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
777 #%{_mandir}/man1/bacula-tray-monitor.1*
782 %defattr(644,root,root,755)
784 %dir %{_sysconfdir}/rescue
785 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
786 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
787 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
788 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
789 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
790 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
791 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
792 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
793 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
794 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2