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
12 %bcond_with sqlite3_sync_off # makes sqlite3 backend much faster, but less reliable
14 Summary: Bacula - The Network Backup Solution
15 Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
20 License: extended GPL v2
21 Group: Networking/Utilities
22 Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
23 # Source0-md5: 299883ddd460336cfb613fd6d9bff989
24 Source1: http://dl.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
25 # Source1-md5: a114daae0e276ee274ccd558e42e13f0
26 #Source2: http://dl.sourceforge.net/bacula/%{name}-gui-%{version}.tar.gz
27 ## Source2-md5: c46b03dbdd9becfd56e109badcad3593
28 Source3: http://dl.sourceforge.net/bacula/%{name}-rescue-2.0.0.tar.gz
29 # Source3-md5: 4a21381f16355193771a34fc2eb4e806
30 Source10: %{name}-dir.init
31 Source11: %{name}-fd.init
32 Source12: %{name}-sd.init
33 Source13: %{name}.logrotate
34 Source14: %{name}-dir.sysconfig
35 Source15: %{name}-fd.sysconfig
36 Source16: %{name}-sd.sysconfig
37 Patch0: %{name}-dvd-handler_path.patch
38 Patch1: %{name}-link.patch
39 Patch2: %{name}-compile.patch
40 Patch3: %{name}-wx28.patch
41 Patch4: %{name}-sqlite3_init_query.patch
42 URL: http://www.bacula.org/
43 BuildRequires: acl-static
44 BuildRequires: automake
46 BuildRequires: fakeroot
48 BuildRequires: glibc-static
50 BuildRequires: libgnome-devel >= 2.0
51 BuildRequires: libgnomeui-devel >= 2.0
53 BuildRequires: libstdc++-static
54 BuildRequires: libwrap-static
56 BuildRequires: ncurses-devel
57 BuildRequires: openssl-devel
58 BuildRequires: openssl-static
59 BuildRequires: pkgconfig
61 BuildRequires: python-static
63 BuildRequires: readline-devel
64 BuildRequires: rpmbuild(macros) >= 1.268
65 BuildRequires: sed >= 4.0
67 BuildRequires: sqlite3-devel
69 BuildRequires: sqlite-devel
71 %if %{with console_wx}
72 BuildRequires: wxGTK2-unicode-devel >= 2.4.0
74 BuildRequires: zlib-devel
75 BuildRequires: zlib-static
76 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78 %define _sysconfdir /etc/%{name}
79 %define _localstatedir /var/lib/%{name}
81 # dependency section is broken. ccache usage is instead to makefiles
85 Bacula - It comes by night and sucks the vital essence from your
88 Bacula is a set of computer programs that permit you (or the system
89 administrator) to manage backup, recovery, and verification of
90 computer data across a network of computers of different kinds. In
91 technical terms, it is a network client/server based backup program.
92 Bacula is relatively easy to use and efficient, while offering many
93 advanced storage management features that make it easy to find and
94 recover lost or damaged files.
96 %description -l pl.UTF-8
97 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
99 Bacula to zbiór programów umożliwiających administratorowi na
100 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
101 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
102 program do kopii zapasowych pracujący w architekturze klient-serwer.
103 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
104 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
105 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
109 Summary: Common files for bacula package
110 Summary(pl.UTF-8): Pliki wspólne dla pakietu bacula
111 Group: Networking/Utilities
112 Requires(post): openssl-tools
113 Requires(post): sed >= 4.0
114 Requires(post,preun): /sbin/chkconfig
115 Requires(postun): /usr/sbin/groupdel
116 Requires(postun): /usr/sbin/userdel
117 Requires(pre): /usr/sbin/groupadd
118 Requires(pre): /usr/sbin/useradd
119 Conflicts: bacula-console < 0:1.34.6
120 Conflicts: bacula-dir < 0:1.34.6
121 Conflicts: bacula-fd < 0:1.34.6
122 Conflicts: bacula-sd < 0:1.34.6
125 Bacula - It comes by night and sucks the vital essence from your
128 Bacula is a set of computer programs that permit you (or the system
129 administrator) to manage backup, recovery, and verification of
130 computer data across a network of computers of different kinds. In
131 technical terms, it is a network client/server based backup program.
132 Bacula is relatively easy to use and efficient, while offering many
133 advanced storage management features that make it easy to find and
134 recover lost or damaged files.
136 %description common -l pl.UTF-8
137 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
139 Bacula to zbiór programów umożliwiających administratorowi na
140 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
141 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
142 program do kopii zapasowych pracujący w architekturze klient-serwer.
143 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
144 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
145 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
149 Summary: Bacula Director and Catalog services
150 Summary(pl.UTF-8): Usługi Bacula Director i Catalog
151 Group: Networking/Utilities
152 Requires(post): sed >= 4.0
153 Requires: %{name}-common = %{epoch}:%{version}-%{release}
154 Obsoletes: bacula-updatedb
157 Bacula - It comes by night and sucks the vital essence from your
160 Bacula Director is the program that supervises all the backup,
161 restore, verify and archive operations. The system administrator uses
162 the Bacula Director to schedule backups and to recover files. Catalog
163 services are comprised of the software programs responsible for
164 maintaining the file indexes and volume databases for all files backed
165 up. The Catalog services permit the System Administrator or user to
166 quickly locate and restore any desired file, since it maintains a
167 record of all Volumes used, all Jobs run, and all Files saved. This
168 build requires sqlite%{?with_sqlite3:3} to be installed separately as the catalog
171 %description dir -l pl.UTF-8
172 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
174 Bacula Director to program nadzorujący wszystkie operacje wykonywania
175 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
176 Administrator używa Bacula Directora do szeregowania kopii zapasowych
177 oraz odzyskiwania plików. Usługi katalogowe (Catalog services) są
178 używane przez programy odpowiedzialne za zarządzanie indeksami plików
179 i bazą danych wolumenów dla wszystkich kopiowanych plików. Usługi
180 katalogowe umożliwiają administratorowi lub użytkownikowi szybko
181 zlokalizować i odtworzyć dowolny plik, ponieważ utrzymują rekord ze
182 wszystkimi używanymi wolumenami, uruchomionymi zadaniami i zapisanymi
183 plikami. Pakiet wymaga sqlite%{?with_sqlite3:3} zainstalowanego oddzielnie jako bazy
187 Summary: Bacula Console
188 Summary(pl.UTF-8): Konsola Baculi
189 Group: Networking/Utilities
190 Requires(post): sed >= 4.0
191 Requires: %{name}-common = %{epoch}:%{version}-%{release}
194 Bacula - It comes by night and sucks the vital essence from your
197 Bacula Console is the program that allows the administrator or user to
198 communicate with the Bacula Director. This is the text only console
201 %description console -l pl.UTF-8
202 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
204 Bacula Console to program umożliwiający administratorowi lub
205 użytkownikowi komunikowanie się z programem Bacula Director. To jest
206 interfejs czysto tekstowy.
209 Summary: Bacula wxWidgets Console
210 Summary(pl.UTF-8): Konsola Baculi oparta na wxWidgets
211 Group: Networking/Utilities
212 Requires(post): sed >= 4.0
213 Requires: %{name}-common = %{epoch}:%{version}-%{release}
215 %description console-wx
216 Bacula - It comes by night and sucks the vital essence from your
219 Bacula Console is the program that allows the administrator or user to
220 communicate with the Bacula Director. This is the wxWidgets GUI
223 %description console-wx -l pl.UTF-8
224 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
226 Bacula Console to program umożliwiający administratorowi lub
227 użytkownikowi komunikowanie się z programem Bacula Director. To jest
228 interfejs graficzny oparty na wxWidgets.
230 %package console-gnome
231 Summary: Bacula GNOME Console
232 Summary(pl.UTF-8): Konsola Baculi oparta dla GNOME
233 Group: Networking/Utilities
234 Requires(post): sed >= 4.0
235 Requires: %{name}-common = %{epoch}:%{version}-%{release}
237 %description console-gnome
238 Bacula - It comes by night and sucks the vital essence from your
241 Bacula Console is the program that allows the administrator or user to
242 communicate with the Bacula Director. This is the GNOME GUI interface.
244 %description console-gnome -l pl.UTF-8
245 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
247 Bacula Console to program umożliwiający administratorowi lub
248 użytkownikowi komunikowanie się z programem Bacula Director. To jest
249 interfejs graficzny oparty na GNOME.
251 %package tray-monitor
252 Summary: Bacula Tray Monitor
253 Group: Networking/Utilities
254 Requires(post): sed >= 4.0
255 Requires: %{name}-common = %{epoch}:%{version}-%{release}
257 %description tray-monitor
258 Bacula - It comes by night and sucks the vital essence from your
261 The Monitor program is typically an icon in the system tray. However,
262 once the icon is expanded into a full window, the administrator or
263 user can obtain status information about the Director or the backup
264 status on the local workstation or any other Bacula daemon that is
268 Summary: Bacula File services (Client)
269 Summary(pl.UTF-8): Usługi Bacula File (klient)
270 Group: Networking/Utilities
271 Requires(post): sed >= 4.0
272 Requires: %{name}-common = %{epoch}:%{version}-%{release}
275 Bacula - It comes by night and sucks the vital essence from your
278 Bacula File services (or Client program) is the software program that
279 is installed on the machine to be backed up. It is specific to the
280 operating system on which it runs and is responsible for providing the
281 file attributes and data when requested by the Director. The File
282 services are also responsible for the file system dependent part of
283 restoring the file attributes and data during a recovery operation.
284 This program runs as a daemon on the machine to be backed up, and in
285 some of the documentation, the File daemon is referred to as the
286 Client (for example in Bacula configuration file).
288 %description fd -l pl.UTF-8
289 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
291 Usługi Bacula File (inaczej program kliencki) to oprogramowanie, które
292 instaluje się na maszynach, z których mają być wykonywane kopie
293 zapasowe. Są one specyficzne dla systemu operacyjnego, pod którym
294 działa dana maszyna i odpowiadają za dostarczanie atrybutów i danych
295 plików na żądanie Directora. Usługi plikowe są także odpowiedzialne za
296 zależną od systemu plików część odzyskiwania atrybutów i danych plików
297 podczas operacji odzyskiwania danych. Program działa jako demon na
298 maszynie, która ma być backupowana i w części dokumentacji demon ten
299 (File) jest nazywany klientem (na przykład w pliku konfiguracyjnym
303 Summary: Bacula Storage services
304 Summary(pl.UTF-8): Usługi Bacula Storage
305 Group: Networking/Utilities
306 Requires(post): sed >= 4.0
307 Requires: %{name}-common = %{epoch}:%{version}-%{release}
308 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
311 Bacula - It comes by night and sucks the vital essence from your
314 Bacula Storage services consist of the software programs that perform
315 the storage and recovery of the file attributes and data to the
316 physical backup media or volumes. In other words, the Storage daemon
317 is responsible for reading and writing your tapes (or other storage
318 media, e.g. files). The Storage services runs as a daemon on the
319 machine that has the backup device (usually a tape drive).
321 %description sd -l pl.UTF-8
322 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
324 Usługi Bacula Storage składają się z programów obsługujących
325 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
326 fizycznych nośnikach lub wolumenach. Innymi słowy, demon Storage jest
327 odpowiedzialny za odczyt i zapis taśm (lub innych nośników do
328 przechowywania danych, np. plików). Usługi Storage działają jako demon
329 na maszynie, która zawiera urządzenie backupowe (zwykle napęd
333 Summary: Bacula - The Network Backup Solution
334 Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
335 Group: Networking/Utilities
336 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
341 Bacula - It comes by night and sucks the vital essence from your
344 Bacula is a set of computer programs that permit you (or the system
345 administrator) to manage backup, recovery, and verification of
346 computer data across a network of computers of different kinds. In
347 technical terms, it is a network client/server based backup program.
348 Bacula is relatively easy to use and efficient, while offering many
349 advanced storage management features that make it easy to find and
350 recover lost or damaged files.
352 This package installs scripts for disaster recovery and builds rescue
353 floppy disk for bare metal recovery.
355 To make the bacula rescue disk run "./make_rescue_disk
357 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
358 recreate the rescue information for this system run ./getdiskinfo
361 %description rescue -l pl.UTF-8
362 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
364 Bacula to zbiór programów umożliwiających administratorowi na
365 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
366 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
367 program do kopii zapasowych pracujący w architekturze klient-serwer.
368 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
369 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
370 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
373 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkę
374 ratunkowe do odtwarzania systemu od zera.
376 Aby stworzyć dyskietkę ratunkową Baculi, należy uruchomić "./make_rescue_disk
377 --copy-static-bacula - --copy-etc-files" z katalogu
378 %{_sysconfdir}/rescue . Aby ponownie utworzyć informacje ratunkowe dla
379 danego systemu, należy ponownie uruchomić ./getdiskinfo .
390 tar -xf %{SOURCE3} && ln -s bacula-rescue-* rescue
391 sed -i -e 's#wx-config#wx-gtk2-unicode-config#g' configure*
392 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
393 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
394 src/cats/create_* src/cats/delete_* src/cats/drop_* \
395 src/cats/grant_* src/cats/make_* src/cats/update_*
396 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
399 cp -f %{_datadir}/automake/config.sub autoconf
400 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
402 --with-scriptdir=%{_libexecdir}/%{name} \
403 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
405 --enable-smartalloc \
406 %{?with_console_wx:--enable-wx-console} \
407 --enable-tray-monitor \
408 %{?with_python:--with-python} \
410 --with-tcp-wrappers \
411 --with-working-dir=%{_var}/lib/%{name} \
412 --with-dump-email="root@localhost" \
413 --with-job-email="root@localhost" \
414 --with-smtp-host=localhost \
415 --with-pid-dir=/var/run \
416 --with-subsys-dir=/var/lock/subsys \
417 --with-sqlite%{?with_sqlite3:3} \
418 %{?with_sqlite3_sync_off:--enable-extra-sqlite3-init="pragma synchronous=0;"} \
419 --with-dir-password="#FAKE-dir-password#" \
420 --with-fd-password="#FAKE-fd-password#" \
421 --with-sd-password="#FAKE-sd-password#" \
422 --with-mon-dir-password="#FAKE-mon-dir-password#" \
423 --with-mon-fd-password="#FAKE-mon-fd-password#" \
424 --with-mon-sd-password="#FAKE-mon-sd-password#" \
438 rm -rf $RPM_BUILD_ROOT
440 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
441 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
442 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
445 DESTDIR=$RPM_BUILD_ROOT
448 strip -R.comment -R.note src/filed/static-bacula-fd
449 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
451 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
452 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
453 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
454 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
455 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
456 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
457 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
459 %if %{with console_wx}
460 # tray-monitor is for regular users
461 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
463 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
464 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
465 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
466 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
467 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
468 sed -e 's#%{_sbindir}#%{_bindir}#' \
469 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
473 # install the rescue stuff, these are the rescue scripts
474 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
475 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
476 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
477 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
480 # install the updatedb scripts
481 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
483 # place for site passwords
484 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
485 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
488 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
489 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
490 %if !%{with console_wx}
491 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
493 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
496 rm -rf $RPM_BUILD_ROOT
499 %groupadd -P %{name}-common -g 136 -r -f bacula
500 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
503 echo "Updating bacula passwords and names..."
505 for f in *-password ; do
506 if [ ! -s $f ] ; then
507 openssl rand -base64 33 > $f
510 for cf in *.conf *.conf.rpmnew ; do
511 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
514 for cf in *.conf *.conf.rpmnew ; do
515 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
519 if [ "$1" = "0" ]; then
526 [ -s %{_localstatedir}/bacula.db ] && \
527 DB_VER=`echo "select * from Version;" | \
528 %{_bindir}/sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
529 if [ -z "$DB_VER" ]; then
530 # grant privileges and create tables
531 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
532 %{_libexecdir}/%{name}/create_bacula_database > dev/null
533 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
534 elif [ "$DB_VER" -lt "9" ]; then
535 echo "Backing up bacula tables"
536 echo ".dump" | sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
537 echo "Upgrading bacula tables"
540 if [ "$DB_VER" -lt "9" ]; then
541 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
545 if [ "$DB_VER" -lt "9" ]; then
546 if [ "$DB_VER" -lt "8" ]; then
547 if [ "$DB_VER" -lt "7" ]; then
548 if [ "$DB_VER" -lt "6" ]; then
549 if [ "$DB_VER" -lt "5" ]; then
550 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
552 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
554 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
556 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
558 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
561 %{_libexecdir}/%{name}/update_bacula_tables
562 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
564 chown -R bacula:bacula %{_localstatedir}
565 chmod -R u+rX,go-rwx %{_localstatedir}/*
567 echo "Updating Bacula passwords and names..."
569 for f in *-password ; do
571 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
573 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
575 /sbin/chkconfig --add bacula-dir
576 %service bacula-dir restart "Bacula Director daemon"
579 if [ "$1" = "0" ]; then
580 %service bacula-dir stop
581 /sbin/chkconfig --del bacula-dir
585 echo "Updating Bacula passwords and names..."
587 for f in *-password ; do
589 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
591 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
593 /sbin/chkconfig --add bacula-fd
594 %service bacula-fd restart "Bacula File daemon"
597 if [ "$1" = "0" ]; then
598 %service bacula-fd stop
599 /sbin/chkconfig --del bacula-fd
603 echo "Updating Bacula passwords and names..."
605 for f in *-password ; do
607 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
609 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
611 /sbin/chkconfig --add bacula-sd
612 %service bacula-sd restart "Bacula Storage daemon"
615 if [ "$1" = "0" ]; then
616 %service bacula-sd stop
617 /sbin/chkconfig --del bacula-sd
621 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
622 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
626 echo "Updating Bacula passwords and names..."
628 for f in *-password ; do
630 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
632 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
635 echo "Updating Bacula passwords and names..."
637 for f in *-password ; do
639 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
641 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
644 echo "Updating Bacula passwords and names..."
646 for f in *-password ; do
648 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
650 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
653 echo "Updating Bacula passwords and names..."
655 for f in *-password ; do
657 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
659 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
662 # link our current installed conf file to the rescue directory
663 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
666 echo "Creating rescue files for this system..."
667 cd %{_sysconfdir}/rescue
671 # remove the files created after the initial rpm installation
672 if [ "$1" = "0" ]; then
673 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
674 rm -f %{_sysconfdir}/rescue/partition.*
675 rm -f %{_sysconfdir}/rescue/format.*
676 rm -f %{_sysconfdir}/rescue/mount_drives
677 rm -f %{_sysconfdir}/rescue/start_network
678 rm -f %{_sysconfdir}/rescue/sfdisk
679 rm -rf %{_sysconfdir}/rescue/diskinfo/*
683 %defattr(644,root,root,755)
686 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
687 %attr(755,root,root) %{_sbindir}/bsmtp
688 %attr(755,root,root) %{_sbindir}/btraceback
689 %{_mandir}/man8/bacula.8*
690 %{_mandir}/man1/bsmtp.1*
691 %{_mandir}/man8/btraceback.8*
692 %dir %{_libexecdir}/%{name}
693 %{_libexecdir}/%{name}/btraceback.dbx
694 %{_libexecdir}/%{name}/btraceback.gdb
695 %attr(770,root,bacula) %dir %{_localstatedir}
698 %defattr(644,root,root,755)
699 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
700 %doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
701 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
702 %ghost %{_sysconfdir}/.pw.sed
703 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
704 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
705 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
706 %attr(755,root,root) %{_sbindir}/bacula-dir
707 %attr(755,root,root) %{_sbindir}/bregex
708 %attr(755,root,root) %{_sbindir}/bwild
709 %attr(755,root,root) %{_sbindir}/dbcheck
710 %{_mandir}/man8/bacula-dir.8*
711 %{_mandir}/man8/dbcheck.8*
712 %{_libexecdir}/%{name}/query.sql
714 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database
715 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_database
716 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_tables
717 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
718 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
719 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
721 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
722 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
723 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
724 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
725 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
726 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite_*
728 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
729 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
730 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
731 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
732 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
733 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
734 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
735 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
738 %defattr(644,root,root,755)
740 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
741 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
742 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
743 %attr(755,root,root) %{_sbindir}/bacula-fd
744 %{_mandir}/man8/bacula-fd.8*
747 %defattr(644,root,root,755)
750 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
751 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
752 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
753 %attr(755,root,root) %{_sbindir}/bacula-sd
754 %attr(755,root,root) %{_sbindir}/bcopy
755 %attr(755,root,root) %{_sbindir}/bextract
756 %attr(755,root,root) %{_sbindir}/bls
757 %attr(755,root,root) %{_sbindir}/bscan
758 %attr(755,root,root) %{_sbindir}/btape
759 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
760 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
761 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
762 %{_mandir}/man8/bacula-sd.8*
763 %{_mandir}/man8/bcopy.8*
764 %{_mandir}/man8/bextract.8*
765 %{_mandir}/man8/bls.8*
766 %{_mandir}/man8/bscan.8*
767 %{_mandir}/man8/btape.8*
770 %defattr(644,root,root,755)
772 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
773 %attr(755,root,root) %{_sbindir}/bconsole
774 %{_mandir}/man8/bconsole.8*
776 %if %{with console_wx}
778 %defattr(644,root,root,755)
780 %{_pixmapsdir}/%{name}.png
781 %{_desktopdir}/bacula-wx.desktop
782 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wx-console.conf
783 %attr(755,root,root) %{_sbindir}/wx-console
784 %{_mandir}/man1/bacula-wxconsole.1*
789 %defattr(644,root,root,755)
791 %{_pixmapsdir}/%{name}.png
792 %{_desktopdir}/bacula.desktop
793 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gnome-console.conf
794 %attr(755,root,root) %{_sbindir}/gnome-console
795 %{_mandir}/man1/bacula-console-gnome.1*
798 %if %{with console_wx}
800 %defattr(644,root,root,755)
802 %{_pixmapsdir}/%{name}-tray-monitor.xpm
803 %{_desktopdir}/%{name}-tray-monitor.desktop
804 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
805 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
806 %{_mandir}/man1/bacula-tray-monitor.1*
811 %defattr(644,root,root,755)
813 %dir %{_sysconfdir}/rescue
814 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
815 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
816 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
817 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
818 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
819 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
820 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
821 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
822 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
823 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2