3 # - update desktop files, think about su-wrappers for console
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 Group: Networking/Utilities
19 License: extended GPL v2
20 Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
21 # Source0-md5: 3bbf805b873716ef782ae12c92a778b4
22 Source1: %{name}-manpages.tar.bz2
23 # Source1-md5: e4dae86d6574b360e831efd3913e7f4c
24 Source2: http://dl.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
25 # Source2-md5: 523ce33d8f038e9b16cdf03f5c2b66f0
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.1.tar.gz
29 # Source4-md5: a5833354917125127b4a1f5e68521834
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 URL: http://www.bacula.org/
38 BuildRequires: acl-static
39 BuildRequires: automake
40 %{?with_rescue:BuildRequires: fakeroot}
41 BuildRequires: glibc-static
43 BuildRequires: libgnome-devel >= 2.0
44 BuildRequires: libgnomeui-devel >= 2.0
46 BuildRequires: libstdc++-static
47 BuildRequires: libwrap-static
49 BuildRequires: ncurses-devel
50 BuildRequires: openssl-devel
51 BuildRequires: openssl-static
52 BuildRequires: pkgconfig
53 %{?with_python:BuildRequires: python-static}
54 BuildRequires: readline-devel
55 BuildRequires: rpmbuild(macros) >= 1.202
56 BuildRequires: sed >= 4.0
57 BuildRequires: sqlite-devel
58 %if %{with console_wx}
59 BuildRequires: wxGTK2-devel >= 2.4.0
61 BuildRequires: zlib-devel
62 BuildRequires: zlib-static
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65 %define _sysconfdir /etc/%{name}
66 %define _localstatedir /var/lib/%{name}
69 Bacula - It comes by night and sucks the vital essence from your
72 Bacula is a set of computer programs that permit you (or the system
73 administrator) to manage backup, recovery, and verification of
74 computer data across a network of computers of different kinds. In
75 technical terms, it is a network client/server based backup program.
76 Bacula is relatively easy to use and efficient, while offering many
77 advanced storage management features that make it easy to find and
78 recover lost or damaged files.
81 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
83 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
84 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
85 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
86 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
87 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
88 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
89 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
93 Summary: Common files for bacula package
94 Summary(pl): Pliki wspólne dla pakietu bacula
95 Group: Networking/Utilities
96 Conflicts: bacula-dir < 0:1.34.6
97 Conflicts: bacula-fd < 0:1.34.6
98 Conflicts: bacula-sd < 0:1.34.6
99 Conflicts: bacula-console < 0:1.34.6
100 Requires(post): openssl-tools
101 Requires(post): sed >= 4.0
102 Requires(pre): /usr/sbin/groupadd
103 Requires(pre): /usr/sbin/useradd
104 Requires(post,preun): /sbin/chkconfig
107 Bacula - It comes by night and sucks the vital essence from your
110 Bacula is a set of computer programs that permit you (or the system
111 administrator) to manage backup, recovery, and verification of
112 computer data across a network of computers of different kinds. In
113 technical terms, it is a network client/server based backup program.
114 Bacula is relatively easy to use and efficient, while offering many
115 advanced storage management features that make it easy to find and
116 recover lost or damaged files.
118 %description common -l pl
119 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
121 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
122 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
123 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
124 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
125 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
126 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
127 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
131 Summary: Bacula Director and Catalog services
132 Summary(pl): Us³ugi Bacula Director i Catalog
133 Group: Networking/Utilities
134 Obsoletes: %{name}-updatedb
135 PreReq: bacula-common = %{epoch}:%{version}-%{release}
136 Requires(post): sed >= 4.0
139 Bacula - It comes by night and sucks the vital essence from your
142 Bacula Director is the program that supervises all the backup,
143 restore, verify and archive operations. The system administrator uses
144 the Bacula Director to schedule backups and to recover files. Catalog
145 services are comprised of the software programs responsible for
146 maintaining the file indexes and volume databases for all files backed
147 up. The Catalog services permit the System Administrator or user to
148 quickly locate and restore any desired file, since it maintains a
149 record of all Volumes used, all Jobs run, and all Files saved. This
150 build requires sqlite to be installed separately as the catalog
153 %description dir -l pl
154 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
156 Bacula Director to program nadzoruj±cy wszystkie operacje wykonywania
157 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
158 Administrator u¿ywa Bacula Directora do szeregowania kopii zapasowych
159 oraz odzyskiwania plików. Us³ugi katalogowe (Catalog services) s±
160 u¿ywane przez programy odpowiedzialne za zarz±dzanie indeksami plików
161 i baz± danych wolumenów dla wszystkich kopiowanych plików. Us³ugi
162 katalogowe umo¿liwiaj± administratorowi lub u¿ytkownikowi szybko
163 zlokalizowaæ i odtworzyæ dowolny plik, poniewa¿ utrzymuj± rekord ze
164 wszystkimi u¿ywanymi wolumenami, uruchomionymi zadaniami i zapisanymi
165 plikami. Pakiet wymaga sqlite zainstalowanego oddzielnie jako bazy
169 Summary: Bacula Console
170 Summary(pl): Konsola Baculi
171 Group: Networking/Utilities
172 PreReq: bacula-common = %{epoch}:%{version}-%{release}
173 Requires(post): sed >= 4.0
176 Bacula - It comes by night and sucks the vital essence from your
179 Bacula Console is the program that allows the administrator or user to
180 communicate with the Bacula Director. This is the text only console
183 %description console -l pl
184 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
186 Bacula Console to program umo¿liwiaj±cy administratorowi lub
187 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
188 interfejs czysto tekstowy.
191 Summary: Bacula wxWidgets Console
192 Summary(pl): Konsola Baculi oparta na wxWidgets
193 Group: Networking/Utilities
194 PreReq: bacula-common = %{epoch}:%{version}-%{release}
195 Requires(post): sed >= 4.0
197 %description console-wx
198 Bacula - It comes by night and sucks the vital essence from your
201 Bacula Console is the program that allows the administrator or user to
202 communicate with the Bacula Director. This is the wxWidgets GUI
205 %description console-wx -l pl
206 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
208 Bacula Console to program umo¿liwiaj±cy administratorowi lub
209 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
210 interfejs graficzny oparty na wxWidgets.
212 %package console-gnome
213 Summary: Bacula GNOME Console
214 Summary(pl): Konsola Baculi oparta dla GNOME
215 Group: Networking/Utilities
216 PreReq: bacula-common = %{epoch}:%{version}-%{release}
217 Requires(post): sed >= 4.0
219 %description console-gnome
220 Bacula - It comes by night and sucks the vital essence from your
223 Bacula Console is the program that allows the administrator or user to
224 communicate with the Bacula Director. This is the GNOME GUI
227 %description console-gnome -l pl
228 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
230 Bacula Console to program umo¿liwiaj±cy administratorowi lub
231 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
232 interfejs graficzny oparty na GNOME.
234 %package tray-monitor
235 Summary: Bacula Tray Monitor
236 Group: Networking/Utilities
237 PreReq: bacula-common = %{epoch}:%{version}-%{release}
238 Requires(post): sed >= 4.0
240 %description tray-monitor
241 Bacula - It comes by night and sucks the vital essence from your
244 The Monitor program is typically an icon in the system tray. However, once the
245 icon is expanded into a full window, the administrator or user can obtain
246 status information about the Director or the backup status on the local
247 workstation or any other Bacula daemon that is configured.
250 Summary: Bacula File services (Client)
251 Summary(pl): Us³ugi Bacula File (klient)
252 Group: Networking/Utilities
253 PreReq: bacula-common = %{epoch}:%{version}-%{release}
254 Requires(post): sed >= 4.0
257 Bacula - It comes by night and sucks the vital essence from your
260 Bacula File services (or Client program) is the software program that
261 is installed on the machine to be backed up. It is specific to the
262 operating system on which it runs and is responsible for providing the
263 file attributes and data when requested by the Director. The File
264 services are also responsible for the file system dependent part of
265 restoring the file attributes and data during a recovery operation.
266 This program runs as a daemon on the machine to be backed up, and in
267 some of the documentation, the File daemon is referred to as the
268 Client (for example in Bacula configuration file).
270 %description fd -l pl
271 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
273 Us³ugi Bacula File (inaczej program kliencki) to oprogramowanie, które
274 instaluje siê na maszynach, z których maj± byæ wykonywane kopie
275 zapasowe. S± one specyficzne dla systemu operacyjnego, pod którym
276 dzia³a dana maszyna i odpowiadaj± za dostarczanie atrybutów i danych
277 plików na ¿±danie Directora. Us³ugi plikowe s± tak¿e odpowiedzialne za
278 zale¿n± od systemu plików czê¶æ odzyskiwania atrybutów i danych plików
279 podczas operacji odzyskiwania danych. Program dzia³a jako demon na
280 maszynie, która ma byæ backupowana i w czê¶ci dokumentacji demon ten
281 (File) jest nazywany klientem (na przyk³ad w pliku konfiguracyjnym
285 Summary: Bacula Storage services
286 Summary(pl): Us³ugi Bacula Storage
287 Group: Networking/Utilities
288 PreReq: bacula-common = %{epoch}:%{version}-%{release}
289 Requires(post): sed >= 4.0
292 Bacula - It comes by night and sucks the vital essence from your
295 Bacula Storage services consist of the software programs that perform
296 the storage and recovery of the file attributes and data to the
297 physical backup media or volumes. In other words, the Storage daemon
298 is responsible for reading and writing your tapes (or other storage
299 media, e.g. files). The Storage services runs as a daemon on the
300 machine that has the backup device (usually a tape drive).
302 %description sd -l pl
303 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
305 Us³ugi Bacula Storage sk³adaj± siê z programów obs³uguj±cych
306 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
307 fizycznych no¶nikach lub wolumenach. Innymi s³owy, demon Storage jest
308 odpowiedzialny za odczyt i zapis ta¶m (lub innych no¶ników do
309 przechowywania danych, np. plików). Us³ugi Storage dzia³aj± jako demon
310 na maszynie, która zawiera urz±dzenie backupowe (zwykle napêd
314 Summary: Bacula - The Network Backup Solution
315 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
316 Group: Networking/Utilities
317 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
322 Bacula - It comes by night and sucks the vital essence from your
325 Bacula is a set of computer programs that permit you (or the system
326 administrator) to manage backup, recovery, and verification of
327 computer data across a network of computers of different kinds. In
328 technical terms, it is a network client/server based backup program.
329 Bacula is relatively easy to use and efficient, while offering many
330 advanced storage management features that make it easy to find and
331 recover lost or damaged files.
333 This package installs scripts for disaster recovery and builds rescue
334 floppy disk for bare metal recovery.
336 To make the bacula rescue disk run "./make_rescue_disk --copy-static-bacula
337 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To recreate the
338 rescue information for this system run ./getdiskinfo again.
340 %description rescue -l pl
341 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
343 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
344 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
345 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
346 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
347 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
348 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
349 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
352 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkê
353 ratunkowe do odtwarzania systemu od zera.
355 Aby stworzyæ dyskietkê ratunkow± Baculi, nale¿y uruchomiæ "./make_rescue_disk
356 --copy-static-bacula - --copy-etc-files" z katalogu
357 %{_sysconfdir}/rescue . Aby ponownie utworzyæ informacje ratunkowe dla
358 danego systemu, nale¿y ponownie uruchomiæ ./getdiskinfo .
363 tar -xf %{SOURCE4} && ln -s bacula-rescue-* rescue
364 sed -i -e 's#wx-config#wx-gtk2-ansi-config#g' configure*
365 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
366 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
367 src/cats/create_* src/cats/delete_* src/cats/drop_* \
368 src/cats/grant_* src/cats/make_* src/cats/update_*
369 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
372 cp -f %{_datadir}/automake/config.sub autoconf
373 CPPFLAGS="-I%{_includedir}/ncurses -I%{_includedir}/readline"
375 --with-scriptdir=%{_libexecdir}/%{name} \
376 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
378 --enable-smartalloc \
379 %{?with_console_wx:--enable-wx-console} \
380 --enable-tray-monitor \
382 --with-tcp-wrappers \
383 --with-working-dir=%{_var}/lib/%{name} \
384 --with-dump-email="root@localhost" \
385 --with-job-email="root@localhost" \
386 --with-smtp-host=localhost \
387 --with-pid-dir=/var/run \
388 --with-subsys-dir=/var/lock/subsys \
390 --with-dir-password="#FAKE-dir-password#" \
391 --with-fd-password="#FAKE-fd-password#" \
392 --with-sd-password="#FAKE-sd-password#" \
393 --with-mon-dir-password="#FAKE-mon-dir-password#" \
394 --with-mon-fd-password="#FAKE-mon-fd-password#" \
395 --with-mon-sd-password="#FAKE-mon-sd-password#" \
410 rm -rf $RPM_BUILD_ROOT
412 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
413 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
414 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
417 DESTDIR=$RPM_BUILD_ROOT
420 strip -R.comment -R.note src/filed/static-bacula-fd
421 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
423 # tray-monitor is for regular users
424 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
426 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
427 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
428 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
429 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
430 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
431 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
432 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
434 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
435 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
436 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
437 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
438 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
439 sed -e 's#%{_sbindir}#%{_bindir}#' \
440 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
443 # install the rescue stuff, these are the rescue scripts
444 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
445 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
446 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
447 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
450 # install the updatedb scripts
451 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
454 cp -a man1 man8 $RPM_BUILD_ROOT%{_mandir}
456 # place for site passwords
457 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
458 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
461 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
462 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
463 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gnome*
464 %if %{without console_wx}
465 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
466 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/wx-console*
468 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
471 rm -rf $RPM_BUILD_ROOT
474 %groupadd -P %{name}-common -g 136 -r -f bacula
475 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
478 echo "Updating bacula passwords and names..."
480 for f in *-password ; do
481 if [ ! -s $f ] ; then
482 openssl rand -base64 33 > $f
485 for cf in *.conf *.conf.rpmnew ; do
486 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
489 for cf in *.conf *.conf.rpmnew ; do
490 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
494 if [ "$1" = "0" ]; then
501 [ -s %{_localstatedir}/bacula.db ] && \
502 DB_VER=`echo "select * from Version;" | \
503 %{_bindir}/sqlite %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
504 if [ -z "$DB_VER" ]; then
505 # grant privileges and create tables
506 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
507 %{_libexecdir}/%{name}/create_bacula_database > dev/null
508 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
509 elif [ "$DB_VER" -lt "8" ]; then
510 echo "Backing up bacula tables"
511 echo ".dump" | sqlite %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
513 echo "Upgrading bacula tables"
514 if [ "$DB_VER" -lt "8" ]; then
515 if [ "$DB_VER" -lt "7" ]; then
516 if [ "$DB_VER" -lt "6" ]; then
517 if [ "$DB_VER" -lt "5" ]; then
518 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
520 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
522 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
524 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
526 %{_libexecdir}/%{name}/update_bacula_tables
527 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
529 chown -R bacula:bacula %{_localstatedir}
530 chmod -R u+rX,go-rwx %{_localstatedir}/*
532 echo "Updating Bacula passwords and names..."
534 for f in *-password ; do
536 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
538 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
540 /sbin/chkconfig --add bacula-dir
541 if [ -f /var/lock/subsys/bacula-dir ]; then
542 /etc/rc.d/init.d/bacula-dir restart 1>&2
544 echo "Run \"/etc/rc.d/init.d/bacula-dir start\" to start Bacula Director daemon."
548 if [ "$1" = "0" ]; then
549 if [ -f /var/lock/subsys/bacula-dir ]; then
550 /etc/rc.d/init.d/bacula-dir stop 1>&2
552 /sbin/chkconfig --del bacula-dir
556 echo "Updating Bacula passwords and names..."
558 for f in *-password ; do
560 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
562 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
564 /sbin/chkconfig --add bacula-fd
565 if [ -f /var/lock/subsys/bacula-fd ]; then
566 /etc/rc.d/init.d/bacula-fd restart 1>&2
568 echo "Run \"/etc/rc.d/init.d/bacula-fd start\" to start Bacula File daemon."
572 if [ "$1" = "0" ]; then
573 if [ -f /var/lock/subsys/bacula-fd ]; then
574 /etc/rc.d/init.d/bacula-fd stop 1>&2
576 /sbin/chkconfig --del bacula-fd
580 echo "Updating Bacula passwords and names..."
582 for f in *-password ; do
584 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
586 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
588 /sbin/chkconfig --add bacula-sd
589 if [ -f /var/lock/subsys/bacula-sd ]; then
590 /etc/rc.d/init.d/bacula-sd restart 1>&2
592 echo "Run \"/etc/rc.d/init.d/bacula-sd start\" to start Bacula Storage daemon."
596 if [ "$1" = "0" ]; then
597 if [ -f /var/lock/subsys/bacula-sd ]; then
598 /etc/rc.d/init.d/bacula-sd stop 1>&2
600 /sbin/chkconfig --del bacula-sd
604 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
605 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
609 echo "Updating Bacula passwords and names..."
611 for f in *-password ; do
613 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
615 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
618 echo "Updating Bacula passwords and names..."
620 for f in *-password ; do
622 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
624 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
627 echo "Updating Bacula passwords and names..."
629 for f in *-password ; do
631 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
633 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
636 echo "Updating Bacula passwords and names..."
638 for f in *-password ; do
640 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
642 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
645 # link our current installed conf file to the rescue directory
646 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
649 echo "Creating rescue files for this system..."
650 cd %{_sysconfdir}/rescue
654 # remove the files created after the initial rpm installation
655 if [ "$1" = "0" ]; then
656 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
657 rm -f %{_sysconfdir}/rescue/partition.*
658 rm -f %{_sysconfdir}/rescue/format.*
659 rm -f %{_sysconfdir}/rescue/mount_drives
660 rm -f %{_sysconfdir}/rescue/start_network
661 rm -f %{_sysconfdir}/rescue/sfdisk
662 rm -rf %{_sysconfdir}/rescue/diskinfo/*
666 %defattr(644,root,root,755)
669 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*-password
670 %attr(755,root,root) %{_sbindir}/btraceback
671 %attr(755,root,root) %{_sbindir}/bsmtp
672 %{_mandir}/man8/bacula.8*
673 %dir %{_libexecdir}/%{name}
674 %{_libexecdir}/%{name}/btraceback.dbx
675 %{_libexecdir}/%{name}/btraceback.gdb
676 %attr(770,root,bacula) %dir %{_localstatedir}
679 %defattr(644,root,root,755)
680 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
681 %doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
682 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-dir.conf
683 %ghost %{_sysconfdir}/.pw.sed
684 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
685 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
686 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/bacula-dir
687 %attr(755,root,root) %{_sbindir}/bacula-dir
688 %attr(755,root,root) %{_sbindir}/dbcheck
689 %{_mandir}/man8/bacula-dir.8*
690 %{_mandir}/man1/dbcheck.1*
691 %{_libexecdir}/%{name}/query.sql
692 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
693 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
694 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
695 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
696 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
697 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite*
698 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
699 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
700 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
701 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
702 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
703 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
704 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
705 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
708 %defattr(644,root,root,755)
710 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-fd.conf
711 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
712 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/bacula-fd
713 %attr(755,root,root) %{_sbindir}/bacula-fd
714 %{_mandir}/man8/bacula-fd.8*
717 %defattr(644,root,root,755)
720 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-sd.conf
721 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
722 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/bacula-sd
723 %attr(755,root,root) %{_sbindir}/bacula-sd
724 %attr(755,root,root) %{_sbindir}/bcopy
725 %attr(755,root,root) %{_sbindir}/bextract
726 %attr(755,root,root) %{_sbindir}/bls
727 %attr(755,root,root) %{_sbindir}/bscan
728 %attr(755,root,root) %{_sbindir}/btape
729 %{_libexecdir}/%{name}/mtx-changer
730 %{_mandir}/man8/bacula-sd.8*
731 %{_mandir}/man1/bcopy.1*
732 %{_mandir}/man1/bextract.1*
733 %{_mandir}/man1/bls.1*
734 %{_mandir}/man1/bscan.1*
735 %{_mandir}/man1/btape.1*
738 %defattr(644,root,root,755)
740 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bconsole.conf
741 %attr(755,root,root) %{_sbindir}/bconsole
742 %{_mandir}/man1/bconsole.1*
744 %if %{with console_wx}
746 %defattr(644,root,root,755)
748 %{_pixmapsdir}/%{name}.png
749 %{_desktopdir}/bacula-wx.desktop
750 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/wx-console.conf
751 %attr(755,root,root) %{_sbindir}/wx-console
752 %{_mandir}/man1/wx-console.1*
757 %defattr(644,root,root,755)
759 %{_pixmapsdir}/%{name}.png
760 %{_desktopdir}/bacula.desktop
761 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/gnome-console.conf
762 %attr(755,root,root) %{_sbindir}/gnome-console
763 #%{_mandir}/man1/gnome-console.1*
767 %defattr(644,root,root,755)
769 %{_pixmapsdir}/%{name}-tray-monitor.xpm
770 %{_desktopdir}/%{name}-tray-monitor.desktop
771 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/tray-monitor.conf
772 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
773 #%{_mandir}/man1/bacula-tray-monitor.1*
777 %defattr(644,root,root,755)
779 %dir %{_sysconfdir}/rescue
780 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/backup.etc.list
781 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/bacula-fd
782 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/format_floppy
783 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/getdiskinfo
784 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/make_rescue_disk
785 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/restore_bacula
786 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/restore_etc
787 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/run_grub
788 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/run_lilo
789 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/sfdisk.bz2