3 # - update desktop files, think about su-wrappers for console
5 # - fix log file permissions
8 %bcond_without console_wx # wx-console program
9 %bcond_without gnome # gnome-console program
13 Summary: Bacula - The Network Backup Solution
14 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
19 Group: Networking/Utilities
20 License: extended GPL v2
21 Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
22 # Source0-md5: 6273f45bfbcddd66e179bc6cb7e28ad1
23 Source1: %{name}-manpages.tar.bz2
24 # Source1-md5: e4dae86d6574b360e831efd3913e7f4c
25 Source2: http://dl.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
26 # Source2-md5: da29daa9027c402f5d6b55a4c7982fdb
27 #Source3: http://dl.sourceforge.net/bacula/%{name}-gui-%{version}.tar.gz
28 ## Source3-md5: 5fb575ceed9dee0cdf8bc7f81ef60f54
29 Source4: http://dl.sourceforge.net/bacula/%{name}-rescue-1.8.3.tar.gz
30 # Source4-md5: 61e97e011e8d939bb15e47b6c8f0797d
31 Source10: %{name}-dir.init
32 Source11: %{name}-fd.init
33 Source12: %{name}-sd.init
34 Source13: %{name}.logrotate
35 Source14: %{name}-dir.sysconfig
36 Source15: %{name}-fd.sysconfig
37 Source16: %{name}-sd.sysconfig
38 Patch0: %{name}-dvd-handler_path.patch
39 Patch1: %{name}-dvd_append.patch
40 URL: http://www.bacula.org/
41 BuildRequires: acl-static
42 BuildRequires: automake
43 %{?with_rescue:BuildRequires: fakeroot}
44 BuildRequires: glibc-static
46 BuildRequires: libgnome-devel >= 2.0
47 BuildRequires: libgnomeui-devel >= 2.0
49 BuildRequires: libstdc++-static
50 BuildRequires: libwrap-static
52 BuildRequires: ncurses-devel
53 BuildRequires: openssl-devel
54 BuildRequires: openssl-static
55 BuildRequires: pkgconfig
56 %{?with_python:BuildRequires: python-static}
57 BuildRequires: readline-devel
58 BuildRequires: rpmbuild(macros) >= 1.202
59 BuildRequires: sed >= 4.0
60 BuildRequires: sqlite-devel
61 %if %{with console_wx}
62 BuildRequires: wxGTK2-devel >= 2.4.0
64 BuildRequires: zlib-devel
65 BuildRequires: zlib-static
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 %define _sysconfdir /etc/%{name}
69 %define _localstatedir /var/lib/%{name}
72 Bacula - It comes by night and sucks the vital essence from your
75 Bacula is a set of computer programs that permit you (or the system
76 administrator) to manage backup, recovery, and verification of
77 computer data across a network of computers of different kinds. In
78 technical terms, it is a network client/server based backup program.
79 Bacula is relatively easy to use and efficient, while offering many
80 advanced storage management features that make it easy to find and
81 recover lost or damaged files.
84 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
86 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
87 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
88 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
89 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
90 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
91 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
92 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
96 Summary: Common files for bacula package
97 Summary(pl): Pliki wspólne dla pakietu bacula
98 Group: Networking/Utilities
99 Requires(post): openssl-tools
100 Requires(post): sed >= 4.0
101 Requires(post,preun): /sbin/chkconfig
102 Requires(pre): /usr/sbin/groupadd
103 Requires(pre): /usr/sbin/useradd
104 Conflicts: bacula-console < 0:1.34.6
105 Conflicts: bacula-dir < 0:1.34.6
106 Conflicts: bacula-fd < 0:1.34.6
107 Conflicts: bacula-sd < 0:1.34.6
110 Bacula - It comes by night and sucks the vital essence from your
113 Bacula is a set of computer programs that permit you (or the system
114 administrator) to manage backup, recovery, and verification of
115 computer data across a network of computers of different kinds. In
116 technical terms, it is a network client/server based backup program.
117 Bacula is relatively easy to use and efficient, while offering many
118 advanced storage management features that make it easy to find and
119 recover lost or damaged files.
121 %description common -l pl
122 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
124 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
125 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
126 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
127 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
128 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
129 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
130 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
134 Summary: Bacula Director and Catalog services
135 Summary(pl): Us³ugi Bacula Director i Catalog
136 Group: Networking/Utilities
137 Requires(post): sed >= 4.0
138 Requires: %{name}-common = %{epoch}:%{version}-%{release}
139 Obsoletes: bacula-updatedb
142 Bacula - It comes by night and sucks the vital essence from your
145 Bacula Director is the program that supervises all the backup,
146 restore, verify and archive operations. The system administrator uses
147 the Bacula Director to schedule backups and to recover files. Catalog
148 services are comprised of the software programs responsible for
149 maintaining the file indexes and volume databases for all files backed
150 up. The Catalog services permit the System Administrator or user to
151 quickly locate and restore any desired file, since it maintains a
152 record of all Volumes used, all Jobs run, and all Files saved. This
153 build requires sqlite to be installed separately as the catalog
156 %description dir -l pl
157 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
159 Bacula Director to program nadzoruj±cy wszystkie operacje wykonywania
160 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
161 Administrator u¿ywa Bacula Directora do szeregowania kopii zapasowych
162 oraz odzyskiwania plików. Us³ugi katalogowe (Catalog services) s±
163 u¿ywane przez programy odpowiedzialne za zarz±dzanie indeksami plików
164 i baz± danych wolumenów dla wszystkich kopiowanych plików. Us³ugi
165 katalogowe umo¿liwiaj± administratorowi lub u¿ytkownikowi szybko
166 zlokalizowaæ i odtworzyæ dowolny plik, poniewa¿ utrzymuj± rekord ze
167 wszystkimi u¿ywanymi wolumenami, uruchomionymi zadaniami i zapisanymi
168 plikami. Pakiet wymaga sqlite zainstalowanego oddzielnie jako bazy
172 Summary: Bacula Console
173 Summary(pl): Konsola Baculi
174 Group: Networking/Utilities
175 Requires(post): sed >= 4.0
176 Requires: %{name}-common = %{epoch}:%{version}-%{release}
179 Bacula - It comes by night and sucks the vital essence from your
182 Bacula Console is the program that allows the administrator or user to
183 communicate with the Bacula Director. This is the text only console
186 %description console -l pl
187 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
189 Bacula Console to program umo¿liwiaj±cy administratorowi lub
190 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
191 interfejs czysto tekstowy.
194 Summary: Bacula wxWidgets Console
195 Summary(pl): Konsola Baculi oparta na wxWidgets
196 Group: Networking/Utilities
197 Requires(post): sed >= 4.0
198 Requires: %{name}-common = %{epoch}:%{version}-%{release}
200 %description console-wx
201 Bacula - It comes by night and sucks the vital essence from your
204 Bacula Console is the program that allows the administrator or user to
205 communicate with the Bacula Director. This is the wxWidgets GUI
208 %description console-wx -l pl
209 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
211 Bacula Console to program umo¿liwiaj±cy administratorowi lub
212 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
213 interfejs graficzny oparty na wxWidgets.
215 %package console-gnome
216 Summary: Bacula GNOME Console
217 Summary(pl): Konsola Baculi oparta dla GNOME
218 Group: Networking/Utilities
219 Requires(post): sed >= 4.0
220 Requires: %{name}-common = %{epoch}:%{version}-%{release}
222 %description console-gnome
223 Bacula - It comes by night and sucks the vital essence from your
226 Bacula Console is the program that allows the administrator or user to
227 communicate with the Bacula Director. This is the GNOME GUI interface.
229 %description console-gnome -l pl
230 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
232 Bacula Console to program umo¿liwiaj±cy administratorowi lub
233 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
234 interfejs graficzny oparty na GNOME.
236 %package tray-monitor
237 Summary: Bacula Tray Monitor
238 Group: Networking/Utilities
239 Requires(post): sed >= 4.0
240 Requires: %{name}-common = %{epoch}:%{version}-%{release}
242 %description tray-monitor
243 Bacula - It comes by night and sucks the vital essence from your
246 The Monitor program is typically an icon in the system tray. However,
247 once the icon is expanded into a full window, the administrator or
248 user can obtain status information about the Director or the backup
249 status on the local workstation or any other Bacula daemon that is
253 Summary: Bacula File services (Client)
254 Summary(pl): Us³ugi Bacula File (klient)
255 Group: Networking/Utilities
256 Requires(post): sed >= 4.0
257 Requires: %{name}-common = %{epoch}:%{version}-%{release}
260 Bacula - It comes by night and sucks the vital essence from your
263 Bacula File services (or Client program) is the software program that
264 is installed on the machine to be backed up. It is specific to the
265 operating system on which it runs and is responsible for providing the
266 file attributes and data when requested by the Director. The File
267 services are also responsible for the file system dependent part of
268 restoring the file attributes and data during a recovery operation.
269 This program runs as a daemon on the machine to be backed up, and in
270 some of the documentation, the File daemon is referred to as the
271 Client (for example in Bacula configuration file).
273 %description fd -l pl
274 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
276 Us³ugi Bacula File (inaczej program kliencki) to oprogramowanie, które
277 instaluje siê na maszynach, z których maj± byæ wykonywane kopie
278 zapasowe. S± one specyficzne dla systemu operacyjnego, pod którym
279 dzia³a dana maszyna i odpowiadaj± za dostarczanie atrybutów i danych
280 plików na ¿±danie Directora. Us³ugi plikowe s± tak¿e odpowiedzialne za
281 zale¿n± od systemu plików czê¶æ odzyskiwania atrybutów i danych plików
282 podczas operacji odzyskiwania danych. Program dzia³a jako demon na
283 maszynie, która ma byæ backupowana i w czê¶ci dokumentacji demon ten
284 (File) jest nazywany klientem (na przyk³ad w pliku konfiguracyjnym
288 Summary: Bacula Storage services
289 Summary(pl): Us³ugi Bacula Storage
290 Group: Networking/Utilities
291 Requires(post): sed >= 4.0
292 Requires: %{name}-common = %{epoch}:%{version}-%{release}
293 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
296 Bacula - It comes by night and sucks the vital essence from your
299 Bacula Storage services consist of the software programs that perform
300 the storage and recovery of the file attributes and data to the
301 physical backup media or volumes. In other words, the Storage daemon
302 is responsible for reading and writing your tapes (or other storage
303 media, e.g. files). The Storage services runs as a daemon on the
304 machine that has the backup device (usually a tape drive).
306 %description sd -l pl
307 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
309 Us³ugi Bacula Storage sk³adaj± siê z programów obs³uguj±cych
310 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
311 fizycznych no¶nikach lub wolumenach. Innymi s³owy, demon Storage jest
312 odpowiedzialny za odczyt i zapis ta¶m (lub innych no¶ników do
313 przechowywania danych, np. plików). Us³ugi Storage dzia³aj± jako demon
314 na maszynie, która zawiera urz±dzenie backupowe (zwykle napêd
318 Summary: Bacula - The Network Backup Solution
319 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
320 Group: Networking/Utilities
321 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
326 Bacula - It comes by night and sucks the vital essence from your
329 Bacula is a set of computer programs that permit you (or the system
330 administrator) to manage backup, recovery, and verification of
331 computer data across a network of computers of different kinds. In
332 technical terms, it is a network client/server based backup program.
333 Bacula is relatively easy to use and efficient, while offering many
334 advanced storage management features that make it easy to find and
335 recover lost or damaged files.
337 This package installs scripts for disaster recovery and builds rescue
338 floppy disk for bare metal recovery.
340 To make the bacula rescue disk run "./make_rescue_disk --copy-static-bacula
341 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To recreate the
342 rescue information for this system run ./getdiskinfo again.
344 %description rescue -l pl
345 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
347 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
348 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
349 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
350 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
351 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
352 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
353 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
356 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkê
357 ratunkowe do odtwarzania systemu od zera.
359 Aby stworzyæ dyskietkê ratunkow± Baculi, nale¿y uruchomiæ "./make_rescue_disk
360 --copy-static-bacula - --copy-etc-files" z katalogu
361 %{_sysconfdir}/rescue . Aby ponownie utworzyæ informacje ratunkowe dla
362 danego systemu, nale¿y ponownie uruchomiæ ./getdiskinfo .
369 tar -xf %{SOURCE4} && ln -s bacula-rescue-* rescue
370 sed -i -e 's#wx-config#wx-gtk2-ansi-config#g' configure*
371 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
372 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
373 src/cats/create_* src/cats/delete_* src/cats/drop_* \
374 src/cats/grant_* src/cats/make_* src/cats/update_*
375 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
378 cp -f %{_datadir}/automake/config.sub autoconf
379 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
381 --with-scriptdir=%{_libexecdir}/%{name} \
382 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
384 --enable-smartalloc \
385 %{?with_console_wx:--enable-wx-console} \
386 --enable-tray-monitor \
387 %{?with_python:--with-python} \
389 --with-tcp-wrappers \
390 --with-working-dir=%{_var}/lib/%{name} \
391 --with-dump-email="root@localhost" \
392 --with-job-email="root@localhost" \
393 --with-smtp-host=localhost \
394 --with-pid-dir=/var/run \
395 --with-subsys-dir=/var/lock/subsys \
397 --with-dir-password="#FAKE-dir-password#" \
398 --with-fd-password="#FAKE-fd-password#" \
399 --with-sd-password="#FAKE-sd-password#" \
400 --with-mon-dir-password="#FAKE-mon-dir-password#" \
401 --with-mon-fd-password="#FAKE-mon-fd-password#" \
402 --with-mon-sd-password="#FAKE-mon-sd-password#" \
417 rm -rf $RPM_BUILD_ROOT
419 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
420 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
421 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
424 DESTDIR=$RPM_BUILD_ROOT
427 strip -R.comment -R.note src/filed/static-bacula-fd
428 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
430 # tray-monitor is for regular users
431 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
433 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
434 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
435 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
436 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
437 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
438 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
439 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
441 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
442 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
443 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
444 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
445 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
446 sed -e 's#%{_sbindir}#%{_bindir}#' \
447 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
450 # install the rescue stuff, these are the rescue scripts
451 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
452 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
453 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
454 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
457 # install the updatedb scripts
458 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
461 cp -a man1 man8 $RPM_BUILD_ROOT%{_mandir}
463 # place for site passwords
464 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
465 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
468 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
469 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
470 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gnome*
471 %if %{without console_wx}
472 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
473 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/wx-console*
475 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
478 rm -rf $RPM_BUILD_ROOT
481 %groupadd -P %{name}-common -g 136 -r -f bacula
482 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
485 echo "Updating bacula passwords and names..."
487 for f in *-password ; do
488 if [ ! -s $f ] ; then
489 openssl rand -base64 33 > $f
492 for cf in *.conf *.conf.rpmnew ; do
493 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
496 for cf in *.conf *.conf.rpmnew ; do
497 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
501 if [ "$1" = "0" ]; then
508 [ -s %{_localstatedir}/bacula.db ] && \
509 DB_VER=`echo "select * from Version;" | \
510 %{_bindir}/sqlite %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
511 if [ -z "$DB_VER" ]; then
512 # grant privileges and create tables
513 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
514 %{_libexecdir}/%{name}/create_bacula_database > dev/null
515 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
516 elif [ "$DB_VER" -lt "9" ]; then
517 echo "Backing up bacula tables"
518 echo ".dump" | sqlite %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
520 echo "Upgrading bacula tables"
521 if [ "$DB_VER" -lt "9" ]; then
522 if [ "$DB_VER" -lt "8" ]; then
523 if [ "$DB_VER" -lt "7" ]; then
524 if [ "$DB_VER" -lt "6" ]; then
525 if [ "$DB_VER" -lt "5" ]; then
526 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
528 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
530 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
532 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
534 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
536 %{_libexecdir}/%{name}/update_bacula_tables
537 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
539 chown -R bacula:bacula %{_localstatedir}
540 chmod -R u+rX,go-rwx %{_localstatedir}/*
542 echo "Updating Bacula passwords and names..."
544 for f in *-password ; do
546 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
548 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
550 /sbin/chkconfig --add bacula-dir
551 if [ -f /var/lock/subsys/bacula-dir ]; then
552 /etc/rc.d/init.d/bacula-dir restart 1>&2
554 echo "Run \"/etc/rc.d/init.d/bacula-dir start\" to start Bacula Director daemon."
558 if [ "$1" = "0" ]; then
559 if [ -f /var/lock/subsys/bacula-dir ]; then
560 /etc/rc.d/init.d/bacula-dir stop 1>&2
562 /sbin/chkconfig --del bacula-dir
566 echo "Updating Bacula passwords and names..."
568 for f in *-password ; do
570 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
572 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
574 /sbin/chkconfig --add bacula-fd
575 if [ -f /var/lock/subsys/bacula-fd ]; then
576 /etc/rc.d/init.d/bacula-fd restart 1>&2
578 echo "Run \"/etc/rc.d/init.d/bacula-fd start\" to start Bacula File daemon."
582 if [ "$1" = "0" ]; then
583 if [ -f /var/lock/subsys/bacula-fd ]; then
584 /etc/rc.d/init.d/bacula-fd stop 1>&2
586 /sbin/chkconfig --del bacula-fd
590 echo "Updating Bacula passwords and names..."
592 for f in *-password ; do
594 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
596 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
598 /sbin/chkconfig --add bacula-sd
599 if [ -f /var/lock/subsys/bacula-sd ]; then
600 /etc/rc.d/init.d/bacula-sd restart 1>&2
602 echo "Run \"/etc/rc.d/init.d/bacula-sd start\" to start Bacula Storage daemon."
606 if [ "$1" = "0" ]; then
607 if [ -f /var/lock/subsys/bacula-sd ]; then
608 /etc/rc.d/init.d/bacula-sd stop 1>&2
610 /sbin/chkconfig --del bacula-sd
614 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
615 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
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 echo "Updating Bacula passwords and names..."
648 for f in *-password ; do
650 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
652 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
655 # link our current installed conf file to the rescue directory
656 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
659 echo "Creating rescue files for this system..."
660 cd %{_sysconfdir}/rescue
664 # remove the files created after the initial rpm installation
665 if [ "$1" = "0" ]; then
666 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
667 rm -f %{_sysconfdir}/rescue/partition.*
668 rm -f %{_sysconfdir}/rescue/format.*
669 rm -f %{_sysconfdir}/rescue/mount_drives
670 rm -f %{_sysconfdir}/rescue/start_network
671 rm -f %{_sysconfdir}/rescue/sfdisk
672 rm -rf %{_sysconfdir}/rescue/diskinfo/*
676 %defattr(644,root,root,755)
679 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
680 %attr(755,root,root) %{_sbindir}/btraceback
681 %attr(755,root,root) %{_sbindir}/bsmtp
682 %{_mandir}/man8/bacula.8*
683 %dir %{_libexecdir}/%{name}
684 %{_libexecdir}/%{name}/btraceback.dbx
685 %{_libexecdir}/%{name}/btraceback.gdb
686 %attr(770,root,bacula) %dir %{_localstatedir}
689 %defattr(644,root,root,755)
690 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
691 %doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
692 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
693 %ghost %{_sysconfdir}/.pw.sed
694 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
695 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
696 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
697 %attr(755,root,root) %{_sbindir}/bacula-dir
698 %attr(755,root,root) %{_sbindir}/dbcheck
699 %{_mandir}/man8/bacula-dir.8*
700 %{_mandir}/man1/dbcheck.1*
701 %{_libexecdir}/%{name}/query.sql
702 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
703 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
704 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
705 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
706 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
707 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite*
708 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
709 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
710 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
711 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
712 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
713 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
714 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
715 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
718 %defattr(644,root,root,755)
720 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
721 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
722 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
723 %attr(755,root,root) %{_sbindir}/bacula-fd
724 %{_mandir}/man8/bacula-fd.8*
727 %defattr(644,root,root,755)
730 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
731 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
732 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
733 %attr(755,root,root) %{_sbindir}/bacula-sd
734 %attr(755,root,root) %{_sbindir}/bcopy
735 %attr(755,root,root) %{_sbindir}/bextract
736 %attr(755,root,root) %{_sbindir}/bls
737 %attr(755,root,root) %{_sbindir}/bscan
738 %attr(755,root,root) %{_sbindir}/btape
739 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
740 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
741 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
742 %{_mandir}/man8/bacula-sd.8*
743 %{_mandir}/man1/bcopy.1*
744 %{_mandir}/man1/bextract.1*
745 %{_mandir}/man1/bls.1*
746 %{_mandir}/man1/bscan.1*
747 %{_mandir}/man1/btape.1*
750 %defattr(644,root,root,755)
752 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
753 %attr(755,root,root) %{_sbindir}/bconsole
754 %{_mandir}/man1/bconsole.1*
756 %if %{with console_wx}
758 %defattr(644,root,root,755)
760 %{_pixmapsdir}/%{name}.png
761 %{_desktopdir}/bacula-wx.desktop
762 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wx-console.conf
763 %attr(755,root,root) %{_sbindir}/wx-console
764 %{_mandir}/man1/wx-console.1*
769 %defattr(644,root,root,755)
771 %{_pixmapsdir}/%{name}.png
772 %{_desktopdir}/bacula.desktop
773 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gnome-console.conf
774 %attr(755,root,root) %{_sbindir}/gnome-console
775 #%{_mandir}/man1/gnome-console.1*
779 %defattr(644,root,root,755)
781 %{_pixmapsdir}/%{name}-tray-monitor.xpm
782 %{_desktopdir}/%{name}-tray-monitor.desktop
783 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
784 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
785 #%{_mandir}/man1/bacula-tray-monitor.1*
789 %defattr(644,root,root,755)
791 %dir %{_sysconfdir}/rescue
792 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
793 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
794 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
795 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
796 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
797 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
798 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
799 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
800 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
801 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2