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,
245 once the icon is expanded into a full window, the administrator or
246 user can obtain status information about the Director or the backup
247 status on the local workstation or any other Bacula daemon that is
251 Summary: Bacula File services (Client)
252 Summary(pl): Us³ugi Bacula File (klient)
253 Group: Networking/Utilities
254 PreReq: bacula-common = %{epoch}:%{version}-%{release}
255 Requires(post): sed >= 4.0
258 Bacula - It comes by night and sucks the vital essence from your
261 Bacula File services (or Client program) is the software program that
262 is installed on the machine to be backed up. It is specific to the
263 operating system on which it runs and is responsible for providing the
264 file attributes and data when requested by the Director. The File
265 services are also responsible for the file system dependent part of
266 restoring the file attributes and data during a recovery operation.
267 This program runs as a daemon on the machine to be backed up, and in
268 some of the documentation, the File daemon is referred to as the
269 Client (for example in Bacula configuration file).
271 %description fd -l pl
272 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
274 Us³ugi Bacula File (inaczej program kliencki) to oprogramowanie, które
275 instaluje siê na maszynach, z których maj± byæ wykonywane kopie
276 zapasowe. S± one specyficzne dla systemu operacyjnego, pod którym
277 dzia³a dana maszyna i odpowiadaj± za dostarczanie atrybutów i danych
278 plików na ¿±danie Directora. Us³ugi plikowe s± tak¿e odpowiedzialne za
279 zale¿n± od systemu plików czê¶æ odzyskiwania atrybutów i danych plików
280 podczas operacji odzyskiwania danych. Program dzia³a jako demon na
281 maszynie, która ma byæ backupowana i w czê¶ci dokumentacji demon ten
282 (File) jest nazywany klientem (na przyk³ad w pliku konfiguracyjnym
286 Summary: Bacula Storage services
287 Summary(pl): Us³ugi Bacula Storage
288 Group: Networking/Utilities
289 PreReq: bacula-common = %{epoch}:%{version}-%{release}
290 Requires(post): sed >= 4.0
293 Bacula - It comes by night and sucks the vital essence from your
296 Bacula Storage services consist of the software programs that perform
297 the storage and recovery of the file attributes and data to the
298 physical backup media or volumes. In other words, the Storage daemon
299 is responsible for reading and writing your tapes (or other storage
300 media, e.g. files). The Storage services runs as a daemon on the
301 machine that has the backup device (usually a tape drive).
303 %description sd -l pl
304 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
306 Us³ugi Bacula Storage sk³adaj± siê z programów obs³uguj±cych
307 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
308 fizycznych no¶nikach lub wolumenach. Innymi s³owy, demon Storage jest
309 odpowiedzialny za odczyt i zapis ta¶m (lub innych no¶ników do
310 przechowywania danych, np. plików). Us³ugi Storage dzia³aj± jako demon
311 na maszynie, która zawiera urz±dzenie backupowe (zwykle napêd
315 Summary: Bacula - The Network Backup Solution
316 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
317 Group: Networking/Utilities
318 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
323 Bacula - It comes by night and sucks the vital essence from your
326 Bacula is a set of computer programs that permit you (or the system
327 administrator) to manage backup, recovery, and verification of
328 computer data across a network of computers of different kinds. In
329 technical terms, it is a network client/server based backup program.
330 Bacula is relatively easy to use and efficient, while offering many
331 advanced storage management features that make it easy to find and
332 recover lost or damaged files.
334 This package installs scripts for disaster recovery and builds rescue
335 floppy disk for bare metal recovery.
337 To make the bacula rescue disk run "./make_rescue_disk --copy-static-bacula
338 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To recreate the
339 rescue information for this system run ./getdiskinfo again.
341 %description rescue -l pl
342 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
344 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
345 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
346 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
347 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
348 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
349 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
350 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
353 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkê
354 ratunkowe do odtwarzania systemu od zera.
356 Aby stworzyæ dyskietkê ratunkow± Baculi, nale¿y uruchomiæ "./make_rescue_disk
357 --copy-static-bacula - --copy-etc-files" z katalogu
358 %{_sysconfdir}/rescue . Aby ponownie utworzyæ informacje ratunkowe dla
359 danego systemu, nale¿y ponownie uruchomiæ ./getdiskinfo .
364 tar -xf %{SOURCE4} && ln -s bacula-rescue-* rescue
365 sed -i -e 's#wx-config#wx-gtk2-ansi-config#g' configure*
366 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
367 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
368 src/cats/create_* src/cats/delete_* src/cats/drop_* \
369 src/cats/grant_* src/cats/make_* src/cats/update_*
370 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
373 cp -f %{_datadir}/automake/config.sub autoconf
374 CPPFLAGS="-I%{_includedir}/ncurses -I%{_includedir}/readline"
376 --with-scriptdir=%{_libexecdir}/%{name} \
377 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
379 --enable-smartalloc \
380 %{?with_console_wx:--enable-wx-console} \
381 --enable-tray-monitor \
383 --with-tcp-wrappers \
384 --with-working-dir=%{_var}/lib/%{name} \
385 --with-dump-email="root@localhost" \
386 --with-job-email="root@localhost" \
387 --with-smtp-host=localhost \
388 --with-pid-dir=/var/run \
389 --with-subsys-dir=/var/lock/subsys \
391 --with-dir-password="#FAKE-dir-password#" \
392 --with-fd-password="#FAKE-fd-password#" \
393 --with-sd-password="#FAKE-sd-password#" \
394 --with-mon-dir-password="#FAKE-mon-dir-password#" \
395 --with-mon-fd-password="#FAKE-mon-fd-password#" \
396 --with-mon-sd-password="#FAKE-mon-sd-password#" \
411 rm -rf $RPM_BUILD_ROOT
413 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
414 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
415 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
418 DESTDIR=$RPM_BUILD_ROOT
421 strip -R.comment -R.note src/filed/static-bacula-fd
422 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
424 # tray-monitor is for regular users
425 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
427 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
428 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
429 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
430 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
431 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
432 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
433 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
435 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
436 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
437 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
438 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
439 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
440 sed -e 's#%{_sbindir}#%{_bindir}#' \
441 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
444 # install the rescue stuff, these are the rescue scripts
445 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
446 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
447 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
448 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
451 # install the updatedb scripts
452 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
455 cp -a man1 man8 $RPM_BUILD_ROOT%{_mandir}
457 # place for site passwords
458 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
459 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
462 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
463 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
464 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gnome*
465 %if %{without console_wx}
466 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
467 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/wx-console*
469 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
472 rm -rf $RPM_BUILD_ROOT
475 %groupadd -P %{name}-common -g 136 -r -f bacula
476 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
479 echo "Updating bacula passwords and names..."
481 for f in *-password ; do
482 if [ ! -s $f ] ; then
483 openssl rand -base64 33 > $f
486 for cf in *.conf *.conf.rpmnew ; do
487 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
490 for cf in *.conf *.conf.rpmnew ; do
491 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
495 if [ "$1" = "0" ]; then
502 [ -s %{_localstatedir}/bacula.db ] && \
503 DB_VER=`echo "select * from Version;" | \
504 %{_bindir}/sqlite %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
505 if [ -z "$DB_VER" ]; then
506 # grant privileges and create tables
507 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
508 %{_libexecdir}/%{name}/create_bacula_database > dev/null
509 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
510 elif [ "$DB_VER" -lt "8" ]; then
511 echo "Backing up bacula tables"
512 echo ".dump" | sqlite %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
514 echo "Upgrading bacula tables"
515 if [ "$DB_VER" -lt "8" ]; then
516 if [ "$DB_VER" -lt "7" ]; then
517 if [ "$DB_VER" -lt "6" ]; then
518 if [ "$DB_VER" -lt "5" ]; then
519 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
521 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
523 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
525 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
527 %{_libexecdir}/%{name}/update_bacula_tables
528 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
530 chown -R bacula:bacula %{_localstatedir}
531 chmod -R u+rX,go-rwx %{_localstatedir}/*
533 echo "Updating Bacula passwords and names..."
535 for f in *-password ; do
537 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
539 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
541 /sbin/chkconfig --add bacula-dir
542 if [ -f /var/lock/subsys/bacula-dir ]; then
543 /etc/rc.d/init.d/bacula-dir restart 1>&2
545 echo "Run \"/etc/rc.d/init.d/bacula-dir start\" to start Bacula Director daemon."
549 if [ "$1" = "0" ]; then
550 if [ -f /var/lock/subsys/bacula-dir ]; then
551 /etc/rc.d/init.d/bacula-dir stop 1>&2
553 /sbin/chkconfig --del bacula-dir
557 echo "Updating Bacula passwords and names..."
559 for f in *-password ; do
561 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
563 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
565 /sbin/chkconfig --add bacula-fd
566 if [ -f /var/lock/subsys/bacula-fd ]; then
567 /etc/rc.d/init.d/bacula-fd restart 1>&2
569 echo "Run \"/etc/rc.d/init.d/bacula-fd start\" to start Bacula File daemon."
573 if [ "$1" = "0" ]; then
574 if [ -f /var/lock/subsys/bacula-fd ]; then
575 /etc/rc.d/init.d/bacula-fd stop 1>&2
577 /sbin/chkconfig --del bacula-fd
581 echo "Updating Bacula passwords and names..."
583 for f in *-password ; do
585 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
587 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
589 /sbin/chkconfig --add bacula-sd
590 if [ -f /var/lock/subsys/bacula-sd ]; then
591 /etc/rc.d/init.d/bacula-sd restart 1>&2
593 echo "Run \"/etc/rc.d/init.d/bacula-sd start\" to start Bacula Storage daemon."
597 if [ "$1" = "0" ]; then
598 if [ -f /var/lock/subsys/bacula-sd ]; then
599 /etc/rc.d/init.d/bacula-sd stop 1>&2
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
616 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
619 echo "Updating Bacula passwords and names..."
621 for f in *-password ; do
623 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
625 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
628 echo "Updating Bacula passwords and names..."
630 for f in *-password ; do
632 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
634 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
637 echo "Updating Bacula passwords and names..."
639 for f in *-password ; do
641 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew
643 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew
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}/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 %attr(644,root,root) %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}/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 %attr(644,root,root) %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 %attr(644,root,root) %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 %{_libexecdir}/%{name}/mtx-changer
731 %{_mandir}/man8/bacula-sd.8*
732 %{_mandir}/man1/bcopy.1*
733 %{_mandir}/man1/bextract.1*
734 %{_mandir}/man1/bls.1*
735 %{_mandir}/man1/bscan.1*
736 %{_mandir}/man1/btape.1*
739 %defattr(644,root,root,755)
741 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
742 %attr(755,root,root) %{_sbindir}/bconsole
743 %{_mandir}/man1/bconsole.1*
745 %if %{with console_wx}
747 %defattr(644,root,root,755)
749 %{_pixmapsdir}/%{name}.png
750 %{_desktopdir}/bacula-wx.desktop
751 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wx-console.conf
752 %attr(755,root,root) %{_sbindir}/wx-console
753 %{_mandir}/man1/wx-console.1*
758 %defattr(644,root,root,755)
760 %{_pixmapsdir}/%{name}.png
761 %{_desktopdir}/bacula.desktop
762 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gnome-console.conf
763 %attr(755,root,root) %{_sbindir}/gnome-console
764 #%{_mandir}/man1/gnome-console.1*
768 %defattr(644,root,root,755)
770 %{_pixmapsdir}/%{name}-tray-monitor.xpm
771 %{_desktopdir}/%{name}-tray-monitor.desktop
772 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
773 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
774 #%{_mandir}/man1/bacula-tray-monitor.1*
778 %defattr(644,root,root,755)
780 %dir %{_sysconfdir}/rescue
781 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
782 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
783 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
784 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
785 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
786 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
787 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
788 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
789 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
790 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2