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
11 %bcond_with sqlite3 # use sqlite3 insted sqlite
13 Summary: Bacula - The Network Backup Solution
14 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
19 License: extended GPL v2
20 Group: Networking/Utilities
21 Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
22 # Source0-md5: fbf990e64eb895a674c52c0de5acf0cd
23 Source1: http://dl.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
24 # Source1-md5: 9fe0efdf50c82f40f15b3ea6c7ad7ed6
25 #Source2: http://dl.sourceforge.net/bacula/%{name}-gui-%{version}.tar.gz
26 ## Source2-md5: c46b03dbdd9becfd56e109badcad3593
27 Source3: http://dl.sourceforge.net/bacula/%{name}-rescue-%{version}.tar.gz
28 # Source3-md5: 4a21381f16355193771a34fc2eb4e806
29 Source10: %{name}-dir.init
30 Source11: %{name}-fd.init
31 Source12: %{name}-sd.init
32 Source13: %{name}.logrotate
33 Source14: %{name}-dir.sysconfig
34 Source15: %{name}-fd.sysconfig
35 Source16: %{name}-sd.sysconfig
36 Patch0: %{name}-dvd-handler_path.patch
37 Patch1: %{name}-dvd_append.patch
38 Patch2: %{name}-link.patch
39 Patch3: %{name}-compile.patch
40 Patch4: %{name}-wx28.patch
41 URL: http://www.bacula.org/
42 BuildRequires: acl-static
43 BuildRequires: automake
45 BuildRequires: fakeroot
47 BuildRequires: glibc-static
49 BuildRequires: libgnome-devel >= 2.0
50 BuildRequires: libgnomeui-devel >= 2.0
52 BuildRequires: libstdc++-static
53 BuildRequires: libwrap-static
55 BuildRequires: ncurses-devel
56 BuildRequires: openssl-devel
57 BuildRequires: openssl-static
58 BuildRequires: pkgconfig
60 BuildRequires: python-static
62 BuildRequires: readline-devel
63 BuildRequires: rpmbuild(macros) >= 1.268
64 BuildRequires: sed >= 4.0
66 BuildRequires: sqlite3-devel
68 BuildRequires: sqlite-devel
70 %if %{with console_wx}
71 BuildRequires: wxGTK2-unicode-devel >= 2.4.0
73 BuildRequires: zlib-devel
74 BuildRequires: zlib-static
75 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
77 %define _sysconfdir /etc/%{name}
78 %define _localstatedir /var/lib/%{name}
80 # dependency section is broken. ccache usage is instead to makefiles
84 Bacula - It comes by night and sucks the vital essence from your
87 Bacula is a set of computer programs that permit you (or the system
88 administrator) to manage backup, recovery, and verification of
89 computer data across a network of computers of different kinds. In
90 technical terms, it is a network client/server based backup program.
91 Bacula is relatively easy to use and efficient, while offering many
92 advanced storage management features that make it easy to find and
93 recover lost or damaged files.
96 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
98 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
99 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
100 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
101 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
102 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
103 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
104 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
108 Summary: Common files for bacula package
109 Summary(pl): Pliki wspólne dla pakietu bacula
110 Group: Networking/Utilities
111 Requires(post): openssl-tools
112 Requires(post): sed >= 4.0
113 Requires(post,preun): /sbin/chkconfig
114 Requires(postun): /usr/sbin/groupdel
115 Requires(postun): /usr/sbin/userdel
116 Requires(pre): /usr/sbin/groupadd
117 Requires(pre): /usr/sbin/useradd
118 Conflicts: bacula-console < 0:1.34.6
119 Conflicts: bacula-dir < 0:1.34.6
120 Conflicts: bacula-fd < 0:1.34.6
121 Conflicts: bacula-sd < 0:1.34.6
124 Bacula - It comes by night and sucks the vital essence from your
127 Bacula is a set of computer programs that permit you (or the system
128 administrator) to manage backup, recovery, and verification of
129 computer data across a network of computers of different kinds. In
130 technical terms, it is a network client/server based backup program.
131 Bacula is relatively easy to use and efficient, while offering many
132 advanced storage management features that make it easy to find and
133 recover lost or damaged files.
135 %description common -l pl
136 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
138 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
139 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
140 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
141 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
142 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
143 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
144 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
148 Summary: Bacula Director and Catalog services
149 Summary(pl): Us³ugi Bacula Director i Catalog
150 Group: Networking/Utilities
151 Requires(post): sed >= 4.0
152 Requires: %{name}-common = %{epoch}:%{version}-%{release}
153 Obsoletes: bacula-updatedb
156 Bacula - It comes by night and sucks the vital essence from your
159 Bacula Director is the program that supervises all the backup,
160 restore, verify and archive operations. The system administrator uses
161 the Bacula Director to schedule backups and to recover files. Catalog
162 services are comprised of the software programs responsible for
163 maintaining the file indexes and volume databases for all files backed
164 up. The Catalog services permit the System Administrator or user to
165 quickly locate and restore any desired file, since it maintains a
166 record of all Volumes used, all Jobs run, and all Files saved. This
167 build requires sqlite%{?with_sqlite3:3} to be installed separately as the catalog
170 %description dir -l pl
171 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
173 Bacula Director to program nadzoruj±cy wszystkie operacje wykonywania
174 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
175 Administrator u¿ywa Bacula Directora do szeregowania kopii zapasowych
176 oraz odzyskiwania plików. Us³ugi katalogowe (Catalog services) s±
177 u¿ywane przez programy odpowiedzialne za zarz±dzanie indeksami plików
178 i baz± danych wolumenów dla wszystkich kopiowanych plików. Us³ugi
179 katalogowe umo¿liwiaj± administratorowi lub u¿ytkownikowi szybko
180 zlokalizowaæ i odtworzyæ dowolny plik, poniewa¿ utrzymuj± rekord ze
181 wszystkimi u¿ywanymi wolumenami, uruchomionymi zadaniami i zapisanymi
182 plikami. Pakiet wymaga sqlite%{?with_sqlite3:3} zainstalowanego oddzielnie jako bazy
186 Summary: Bacula Console
187 Summary(pl): Konsola Baculi
188 Group: Networking/Utilities
189 Requires(post): sed >= 4.0
190 Requires: %{name}-common = %{epoch}:%{version}-%{release}
193 Bacula - It comes by night and sucks the vital essence from your
196 Bacula Console is the program that allows the administrator or user to
197 communicate with the Bacula Director. This is the text only console
200 %description console -l pl
201 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
203 Bacula Console to program umo¿liwiaj±cy administratorowi lub
204 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
205 interfejs czysto tekstowy.
208 Summary: Bacula wxWidgets Console
209 Summary(pl): Konsola Baculi oparta na wxWidgets
210 Group: Networking/Utilities
211 Requires(post): sed >= 4.0
212 Requires: %{name}-common = %{epoch}:%{version}-%{release}
214 %description console-wx
215 Bacula - It comes by night and sucks the vital essence from your
218 Bacula Console is the program that allows the administrator or user to
219 communicate with the Bacula Director. This is the wxWidgets GUI
222 %description console-wx -l pl
223 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
225 Bacula Console to program umo¿liwiaj±cy administratorowi lub
226 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
227 interfejs graficzny oparty na wxWidgets.
229 %package console-gnome
230 Summary: Bacula GNOME Console
231 Summary(pl): Konsola Baculi oparta dla GNOME
232 Group: Networking/Utilities
233 Requires(post): sed >= 4.0
234 Requires: %{name}-common = %{epoch}:%{version}-%{release}
236 %description console-gnome
237 Bacula - It comes by night and sucks the vital essence from your
240 Bacula Console is the program that allows the administrator or user to
241 communicate with the Bacula Director. This is the GNOME GUI interface.
243 %description console-gnome -l pl
244 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
246 Bacula Console to program umo¿liwiaj±cy administratorowi lub
247 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
248 interfejs graficzny oparty na GNOME.
250 %package tray-monitor
251 Summary: Bacula Tray Monitor
252 Group: Networking/Utilities
253 Requires(post): sed >= 4.0
254 Requires: %{name}-common = %{epoch}:%{version}-%{release}
256 %description tray-monitor
257 Bacula - It comes by night and sucks the vital essence from your
260 The Monitor program is typically an icon in the system tray. However,
261 once the icon is expanded into a full window, the administrator or
262 user can obtain status information about the Director or the backup
263 status on the local workstation or any other Bacula daemon that is
267 Summary: Bacula File services (Client)
268 Summary(pl): Us³ugi Bacula File (klient)
269 Group: Networking/Utilities
270 Requires(post): sed >= 4.0
271 Requires: %{name}-common = %{epoch}:%{version}-%{release}
274 Bacula - It comes by night and sucks the vital essence from your
277 Bacula File services (or Client program) is the software program that
278 is installed on the machine to be backed up. It is specific to the
279 operating system on which it runs and is responsible for providing the
280 file attributes and data when requested by the Director. The File
281 services are also responsible for the file system dependent part of
282 restoring the file attributes and data during a recovery operation.
283 This program runs as a daemon on the machine to be backed up, and in
284 some of the documentation, the File daemon is referred to as the
285 Client (for example in Bacula configuration file).
287 %description fd -l pl
288 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
290 Us³ugi Bacula File (inaczej program kliencki) to oprogramowanie, które
291 instaluje siê na maszynach, z których maj± byæ wykonywane kopie
292 zapasowe. S± one specyficzne dla systemu operacyjnego, pod którym
293 dzia³a dana maszyna i odpowiadaj± za dostarczanie atrybutów i danych
294 plików na ¿±danie Directora. Us³ugi plikowe s± tak¿e odpowiedzialne za
295 zale¿n± od systemu plików czê¶æ odzyskiwania atrybutów i danych plików
296 podczas operacji odzyskiwania danych. Program dzia³a jako demon na
297 maszynie, która ma byæ backupowana i w czê¶ci dokumentacji demon ten
298 (File) jest nazywany klientem (na przyk³ad w pliku konfiguracyjnym
302 Summary: Bacula Storage services
303 Summary(pl): Us³ugi Bacula Storage
304 Group: Networking/Utilities
305 Requires(post): sed >= 4.0
306 Requires: %{name}-common = %{epoch}:%{version}-%{release}
307 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
310 Bacula - It comes by night and sucks the vital essence from your
313 Bacula Storage services consist of the software programs that perform
314 the storage and recovery of the file attributes and data to the
315 physical backup media or volumes. In other words, the Storage daemon
316 is responsible for reading and writing your tapes (or other storage
317 media, e.g. files). The Storage services runs as a daemon on the
318 machine that has the backup device (usually a tape drive).
320 %description sd -l pl
321 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
323 Us³ugi Bacula Storage sk³adaj± siê z programów obs³uguj±cych
324 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
325 fizycznych no¶nikach lub wolumenach. Innymi s³owy, demon Storage jest
326 odpowiedzialny za odczyt i zapis ta¶m (lub innych no¶ników do
327 przechowywania danych, np. plików). Us³ugi Storage dzia³aj± jako demon
328 na maszynie, która zawiera urz±dzenie backupowe (zwykle napêd
332 Summary: Bacula - The Network Backup Solution
333 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
334 Group: Networking/Utilities
335 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
340 Bacula - It comes by night and sucks the vital essence from your
343 Bacula is a set of computer programs that permit you (or the system
344 administrator) to manage backup, recovery, and verification of
345 computer data across a network of computers of different kinds. In
346 technical terms, it is a network client/server based backup program.
347 Bacula is relatively easy to use and efficient, while offering many
348 advanced storage management features that make it easy to find and
349 recover lost or damaged files.
351 This package installs scripts for disaster recovery and builds rescue
352 floppy disk for bare metal recovery.
354 To make the bacula rescue disk run "./make_rescue_disk
356 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
357 recreate the rescue information for this system run ./getdiskinfo
360 %description rescue -l pl
361 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
363 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
364 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
365 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
366 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
367 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
368 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
369 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
372 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkê
373 ratunkowe do odtwarzania systemu od zera.
375 Aby stworzyæ dyskietkê ratunkow± Baculi, nale¿y uruchomiæ "./make_rescue_disk
376 --copy-static-bacula - --copy-etc-files" z katalogu
377 %{_sysconfdir}/rescue . Aby ponownie utworzyæ informacje ratunkowe dla
378 danego systemu, nale¿y ponownie uruchomiæ ./getdiskinfo .
388 tar -xf %{SOURCE3} && ln -s bacula-rescue-* rescue
389 sed -i -e 's#wx-config#wx-gtk2-unicode-config#g' configure*
390 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
391 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
392 src/cats/create_* src/cats/delete_* src/cats/drop_* \
393 src/cats/grant_* src/cats/make_* src/cats/update_*
394 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
397 cp -f %{_datadir}/automake/config.sub autoconf
398 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
400 --with-scriptdir=%{_libexecdir}/%{name} \
401 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
403 --enable-smartalloc \
404 %{?with_console_wx:--enable-wx-console} \
405 --enable-tray-monitor \
406 %{?with_python:--with-python} \
408 --with-tcp-wrappers \
409 --with-working-dir=%{_var}/lib/%{name} \
410 --with-dump-email="root@localhost" \
411 --with-job-email="root@localhost" \
412 --with-smtp-host=localhost \
413 --with-pid-dir=/var/run \
414 --with-subsys-dir=/var/lock/subsys \
415 --with-sqlite%{?with_sqlite3:3} \
416 --with-dir-password="#FAKE-dir-password#" \
417 --with-fd-password="#FAKE-fd-password#" \
418 --with-sd-password="#FAKE-sd-password#" \
419 --with-mon-dir-password="#FAKE-mon-dir-password#" \
420 --with-mon-fd-password="#FAKE-mon-fd-password#" \
421 --with-mon-sd-password="#FAKE-mon-sd-password#" \
435 rm -rf $RPM_BUILD_ROOT
437 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
438 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
439 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
442 DESTDIR=$RPM_BUILD_ROOT
445 strip -R.comment -R.note src/filed/static-bacula-fd
446 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
448 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
449 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
450 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
451 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
452 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
453 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
454 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
456 %if %{with console_wx}
457 # tray-monitor is for regular users
458 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
460 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
461 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
462 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
463 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
464 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
465 sed -e 's#%{_sbindir}#%{_bindir}#' \
466 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
470 # install the rescue stuff, these are the rescue scripts
471 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
472 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
473 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
474 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
477 # install the updatedb scripts
478 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
480 # place for site passwords
481 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
482 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
485 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
486 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
487 %if !%{with console_wx}
488 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
490 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
493 rm -rf $RPM_BUILD_ROOT
496 %groupadd -P %{name}-common -g 136 -r -f bacula
497 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
500 echo "Updating bacula passwords and names..."
502 for f in *-password ; do
503 if [ ! -s $f ] ; then
504 openssl rand -base64 33 > $f
507 for cf in *.conf *.conf.rpmnew ; do
508 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
511 for cf in *.conf *.conf.rpmnew ; do
512 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
516 if [ "$1" = "0" ]; then
523 [ -s %{_localstatedir}/bacula.db ] && \
524 DB_VER=`echo "select * from Version;" | \
525 %{_bindir}/sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
526 if [ -z "$DB_VER" ]; then
527 # grant privileges and create tables
528 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
529 %{_libexecdir}/%{name}/create_bacula_database > dev/null
530 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
531 elif [ "$DB_VER" -lt "9" ]; then
532 echo "Backing up bacula tables"
533 echo ".dump" | sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
534 echo "Upgrading bacula tables"
537 if [ "$DB_VER" -lt "9" ]; then
538 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
542 if [ "$DB_VER" -lt "9" ]; then
543 if [ "$DB_VER" -lt "8" ]; then
544 if [ "$DB_VER" -lt "7" ]; then
545 if [ "$DB_VER" -lt "6" ]; then
546 if [ "$DB_VER" -lt "5" ]; then
547 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
549 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
551 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
553 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
555 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
558 %{_libexecdir}/%{name}/update_bacula_tables
559 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
561 chown -R bacula:bacula %{_localstatedir}
562 chmod -R u+rX,go-rwx %{_localstatedir}/*
564 echo "Updating Bacula passwords and names..."
566 for f in *-password ; do
568 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
570 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
572 /sbin/chkconfig --add bacula-dir
573 %service bacula-dir restart "Bacula Director daemon"
576 if [ "$1" = "0" ]; then
577 %service bacula-dir stop
578 /sbin/chkconfig --del bacula-dir
582 echo "Updating Bacula passwords and names..."
584 for f in *-password ; do
586 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
588 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
590 /sbin/chkconfig --add bacula-fd
591 %service bacula-fd restart "Bacula File daemon"
594 if [ "$1" = "0" ]; then
595 %service bacula-fd stop
596 /sbin/chkconfig --del bacula-fd
600 echo "Updating Bacula passwords and names..."
602 for f in *-password ; do
604 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
606 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
608 /sbin/chkconfig --add bacula-sd
609 %service bacula-sd restart "Bacula Storage daemon"
612 if [ "$1" = "0" ]; then
613 %service bacula-sd stop
614 /sbin/chkconfig --del bacula-sd
618 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
619 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
623 echo "Updating Bacula passwords and names..."
625 for f in *-password ; do
627 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
629 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
632 echo "Updating Bacula passwords and names..."
634 for f in *-password ; do
636 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
638 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
641 echo "Updating Bacula passwords and names..."
643 for f in *-password ; do
645 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
647 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
650 echo "Updating Bacula passwords and names..."
652 for f in *-password ; do
654 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
656 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
659 # link our current installed conf file to the rescue directory
660 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
663 echo "Creating rescue files for this system..."
664 cd %{_sysconfdir}/rescue
668 # remove the files created after the initial rpm installation
669 if [ "$1" = "0" ]; then
670 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
671 rm -f %{_sysconfdir}/rescue/partition.*
672 rm -f %{_sysconfdir}/rescue/format.*
673 rm -f %{_sysconfdir}/rescue/mount_drives
674 rm -f %{_sysconfdir}/rescue/start_network
675 rm -f %{_sysconfdir}/rescue/sfdisk
676 rm -rf %{_sysconfdir}/rescue/diskinfo/*
680 %defattr(644,root,root,755)
683 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
684 %attr(755,root,root) %{_sbindir}/bsmtp
685 %attr(755,root,root) %{_sbindir}/btraceback
686 %{_mandir}/man8/bacula.8*
687 %{_mandir}/man1/bsmtp.1*
688 %{_mandir}/man8/btraceback.8*
689 %dir %{_libexecdir}/%{name}
690 %{_libexecdir}/%{name}/btraceback.dbx
691 %{_libexecdir}/%{name}/btraceback.gdb
692 %attr(770,root,bacula) %dir %{_localstatedir}
695 %defattr(644,root,root,755)
696 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
697 %doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
698 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
699 %ghost %{_sysconfdir}/.pw.sed
700 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
701 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
702 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
703 %attr(755,root,root) %{_sbindir}/bacula-dir
704 %attr(755,root,root) %{_sbindir}/bregex
705 %attr(755,root,root) %{_sbindir}/bwild
706 %attr(755,root,root) %{_sbindir}/dbcheck
707 %{_mandir}/man8/bacula-dir.8*
708 %{_mandir}/man8/dbcheck.8*
709 %{_libexecdir}/%{name}/query.sql
711 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database
712 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_database
713 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_tables
714 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
715 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
716 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
718 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
719 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
720 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
721 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
722 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
723 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite_*
725 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
726 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
727 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
728 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
729 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
730 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
731 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
732 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
735 %defattr(644,root,root,755)
737 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
738 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
739 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
740 %attr(755,root,root) %{_sbindir}/bacula-fd
741 %{_mandir}/man8/bacula-fd.8*
744 %defattr(644,root,root,755)
747 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
748 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
749 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
750 %attr(755,root,root) %{_sbindir}/bacula-sd
751 %attr(755,root,root) %{_sbindir}/bcopy
752 %attr(755,root,root) %{_sbindir}/bextract
753 %attr(755,root,root) %{_sbindir}/bls
754 %attr(755,root,root) %{_sbindir}/bscan
755 %attr(755,root,root) %{_sbindir}/btape
756 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
757 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
758 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
759 %{_mandir}/man8/bacula-sd.8*
760 %{_mandir}/man8/bcopy.8*
761 %{_mandir}/man8/bextract.8*
762 %{_mandir}/man8/bls.8*
763 %{_mandir}/man8/bscan.8*
764 %{_mandir}/man8/btape.8*
767 %defattr(644,root,root,755)
769 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
770 %attr(755,root,root) %{_sbindir}/bconsole
771 %{_mandir}/man8/bconsole.8*
773 %if %{with console_wx}
775 %defattr(644,root,root,755)
777 %{_pixmapsdir}/%{name}.png
778 %{_desktopdir}/bacula-wx.desktop
779 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wx-console.conf
780 %attr(755,root,root) %{_sbindir}/wx-console
781 %{_mandir}/man1/bacula-wxconsole.1*
786 %defattr(644,root,root,755)
788 %{_pixmapsdir}/%{name}.png
789 %{_desktopdir}/bacula.desktop
790 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gnome-console.conf
791 %attr(755,root,root) %{_sbindir}/gnome-console
792 %{_mandir}/man1/bacula-console-gnome.1*
795 %if %{with console_wx}
797 %defattr(644,root,root,755)
799 %{_pixmapsdir}/%{name}-tray-monitor.xpm
800 %{_desktopdir}/%{name}-tray-monitor.desktop
801 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
802 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
803 %{_mandir}/man1/bacula-tray-monitor.1*
808 %defattr(644,root,root,755)
810 %dir %{_sysconfdir}/rescue
811 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
812 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
813 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
814 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
815 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
816 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
817 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
818 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
819 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
820 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2