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
9 %bcond_without mysql # use mysql
12 %bcond_with sqlite # use sqlite
13 %bcond_with sqlite3 # use sqlite3 insted sqlite
14 %bcond_with sqlite3_sync_off # makes sqlite3 backend much faster, but less reliable
17 %undefine with_sqlite3
18 %undefine with_sqlite3_sync_off
21 Summary: Bacula - The Network Backup Solution
22 Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
27 License: extended GPL v2
28 Group: Networking/Utilities
29 Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
30 # Source0-md5: 443d2560ace95173a0d8ba465de493ef
31 Source1: http://dl.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
32 # Source1-md5: dce3aed621b9e4abee51cc89aebf4a58
33 Source2: http://dl.sourceforge.net/bacula/%{name}-rescue-2.0.0.tar.gz
34 # Source2-md5: 4a21381f16355193771a34fc2eb4e806
35 Source10: %{name}-dir.init
36 Source11: %{name}-fd.init
37 Source12: %{name}-sd.init
38 Source13: %{name}.logrotate
39 Source14: %{name}-dir.sysconfig
40 Source15: %{name}-fd.sysconfig
41 Source16: %{name}-sd.sysconfig
42 Patch0: %{name}-dvd-handler_path.patch
43 Patch1: %{name}-link.patch
44 Patch2: %{name}-compile.patch
45 Patch3: %{name}-wx28.patch
46 Patch4: %{name}-sqlite3_init_query.patch
47 URL: http://www.bacula.org/
48 BuildRequires: acl-static
49 BuildRequires: automake
51 BuildRequires: fakeroot
53 BuildRequires: glibc-static
55 BuildRequires: libgnome-devel >= 2.0
56 BuildRequires: libgnomeui-devel >= 2.0
58 BuildRequires: libstdc++-static
59 BuildRequires: libwrap-static
61 BuildRequires: ncurses-devel
62 BuildRequires: openssl-devel
63 BuildRequires: openssl-static
64 BuildRequires: pkgconfig
66 BuildRequires: python-static
68 BuildRequires: readline-devel
69 BuildRequires: rpmbuild(macros) >= 1.268
70 BuildRequires: sed >= 4.0
71 %{?with_sqlite3:BuildRequires: sqlite3-devel}
72 %{?with_sqlite:BuildRequires: sqlite-devel}
73 %{?with_mysql:BuildRequires: mysql-devel}
74 %if %{with console_wx}
75 BuildRequires: wxGTK2-unicode-devel >= 2.4.0
77 BuildRequires: zlib-devel
78 BuildRequires: zlib-static
79 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81 %define _sysconfdir /etc/%{name}
82 %define _localstatedir /var/lib/%{name}
84 # dependency section is broken. ccache usage is instead to makefiles
88 Bacula - It comes by night and sucks the vital essence from your
91 Bacula is a set of computer programs that permit you (or the system
92 administrator) to manage backup, recovery, and verification of
93 computer data across a network of computers of different kinds. In
94 technical terms, it is a network client/server based backup program.
95 Bacula is relatively easy to use and efficient, while offering many
96 advanced storage management features that make it easy to find and
97 recover lost or damaged files.
99 %description -l pl.UTF-8
100 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
102 Bacula to zbiór programów umożliwiających administratorowi na
103 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
104 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
105 program do kopii zapasowych pracujący w architekturze klient-serwer.
106 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
107 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
108 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
112 Summary: Common files for bacula package
113 Summary(pl.UTF-8): Pliki wspólne dla pakietu bacula
114 Group: Networking/Utilities
115 Requires(post): openssl-tools
116 Requires(post): sed >= 4.0
117 Requires(post,preun): /sbin/chkconfig
118 Requires(postun): /usr/sbin/groupdel
119 Requires(postun): /usr/sbin/userdel
120 Requires(pre): /usr/sbin/groupadd
121 Requires(pre): /usr/sbin/useradd
122 Conflicts: bacula-console < 0:1.34.6
123 Conflicts: bacula-dir < 0:1.34.6
124 Conflicts: bacula-fd < 0:1.34.6
125 Conflicts: bacula-sd < 0:1.34.6
128 Bacula - It comes by night and sucks the vital essence from your
131 Bacula is a set of computer programs that permit you (or the system
132 administrator) to manage backup, recovery, and verification of
133 computer data across a network of computers of different kinds. In
134 technical terms, it is a network client/server based backup program.
135 Bacula is relatively easy to use and efficient, while offering many
136 advanced storage management features that make it easy to find and
137 recover lost or damaged files.
139 %description common -l pl.UTF-8
140 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
142 Bacula to zbiór programów umożliwiających administratorowi na
143 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
144 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
145 program do kopii zapasowych pracujący w architekturze klient-serwer.
146 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
147 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
148 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
152 Summary: Bacula Director and Catalog services
153 Summary(pl.UTF-8): Usługi Bacula Director i Catalog
154 Group: Networking/Utilities
155 Requires(post): sed >= 4.0
156 Requires: %{name}-common = %{epoch}:%{version}-%{release}
157 Obsoletes: bacula-updatedb
160 Bacula - It comes by night and sucks the vital essence from your
163 Bacula Director is the program that supervises all the backup,
164 restore, verify and archive operations. The system administrator uses
165 the Bacula Director to schedule backups and to recover files. Catalog
166 services are comprised of the software programs responsible for
167 maintaining the file indexes and volume databases for all files backed
168 up. The Catalog services permit the System Administrator or user to
169 quickly locate and restore any desired file, since it maintains a
170 record of all Volumes used, all Jobs run, and all Files saved. This
171 build requires sqlite%{?with_sqlite3:3} to be installed separately as the catalog
174 %description dir -l pl.UTF-8
175 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
177 Bacula Director to program nadzorujący wszystkie operacje wykonywania
178 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
179 Administrator używa Bacula Directora do szeregowania kopii zapasowych
180 oraz odzyskiwania plików. Usługi katalogowe (Catalog services) są
181 używane przez programy odpowiedzialne za zarządzanie indeksami plików
182 i bazą danych wolumenów dla wszystkich kopiowanych plików. Usługi
183 katalogowe umożliwiają administratorowi lub użytkownikowi szybko
184 zlokalizować i odtworzyć dowolny plik, ponieważ utrzymują rekord ze
185 wszystkimi używanymi wolumenami, uruchomionymi zadaniami i zapisanymi
186 plikami. Pakiet wymaga sqlite%{?with_sqlite3:3} zainstalowanego oddzielnie jako bazy
190 Summary: Bacula Console
191 Summary(pl.UTF-8): Konsola Baculi
192 Group: Networking/Utilities
193 Requires(post): sed >= 4.0
194 Requires: %{name}-common = %{epoch}:%{version}-%{release}
197 Bacula - It comes by night and sucks the vital essence from your
200 Bacula Console is the program that allows the administrator or user to
201 communicate with the Bacula Director. This is the text only console
204 %description console -l pl.UTF-8
205 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
207 Bacula Console to program umożliwiający administratorowi lub
208 użytkownikowi komunikowanie się z programem Bacula Director. To jest
209 interfejs czysto tekstowy.
212 Summary: Bacula wxWidgets Console
213 Summary(pl.UTF-8): Konsola Baculi oparta na wxWidgets
214 Group: Networking/Utilities
215 Requires(post): sed >= 4.0
216 Requires: %{name}-common = %{epoch}:%{version}-%{release}
218 %description console-wx
219 Bacula - It comes by night and sucks the vital essence from your
222 Bacula Console is the program that allows the administrator or user to
223 communicate with the Bacula Director. This is the wxWidgets GUI
226 %description console-wx -l pl.UTF-8
227 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
229 Bacula Console to program umożliwiający administratorowi lub
230 użytkownikowi komunikowanie się z programem Bacula Director. To jest
231 interfejs graficzny oparty na wxWidgets.
233 %package console-gnome
234 Summary: Bacula GNOME Console
235 Summary(pl.UTF-8): Konsola Baculi oparta dla GNOME
236 Group: Networking/Utilities
237 Requires(post): sed >= 4.0
238 Requires: %{name}-common = %{epoch}:%{version}-%{release}
240 %description console-gnome
241 Bacula - It comes by night and sucks the vital essence from your
244 Bacula Console is the program that allows the administrator or user to
245 communicate with the Bacula Director. This is the GNOME GUI interface.
247 %description console-gnome -l pl.UTF-8
248 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
250 Bacula Console to program umożliwiający administratorowi lub
251 użytkownikowi komunikowanie się z programem Bacula Director. To jest
252 interfejs graficzny oparty na GNOME.
254 %package tray-monitor
255 Summary: Bacula Tray Monitor
256 Group: Networking/Utilities
257 Requires(post): sed >= 4.0
258 Requires: %{name}-common = %{epoch}:%{version}-%{release}
260 %description tray-monitor
261 Bacula - It comes by night and sucks the vital essence from your
264 The Monitor program is typically an icon in the system tray. However,
265 once the icon is expanded into a full window, the administrator or
266 user can obtain status information about the Director or the backup
267 status on the local workstation or any other Bacula daemon that is
271 Summary: Bacula File services (Client)
272 Summary(pl.UTF-8): Usługi Bacula File (klient)
273 Group: Networking/Utilities
274 Requires(post): sed >= 4.0
275 Requires: %{name}-common = %{epoch}:%{version}-%{release}
278 Bacula - It comes by night and sucks the vital essence from your
281 Bacula File services (or Client program) is the software program that
282 is installed on the machine to be backed up. It is specific to the
283 operating system on which it runs and is responsible for providing the
284 file attributes and data when requested by the Director. The File
285 services are also responsible for the file system dependent part of
286 restoring the file attributes and data during a recovery operation.
287 This program runs as a daemon on the machine to be backed up, and in
288 some of the documentation, the File daemon is referred to as the
289 Client (for example in Bacula configuration file).
291 %description fd -l pl.UTF-8
292 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
294 Usługi Bacula File (inaczej program kliencki) to oprogramowanie, które
295 instaluje się na maszynach, z których mają być wykonywane kopie
296 zapasowe. Są one specyficzne dla systemu operacyjnego, pod którym
297 działa dana maszyna i odpowiadają za dostarczanie atrybutów i danych
298 plików na żądanie Directora. Usługi plikowe są także odpowiedzialne za
299 zależną od systemu plików część odzyskiwania atrybutów i danych plików
300 podczas operacji odzyskiwania danych. Program działa jako demon na
301 maszynie, która ma być backupowana i w części dokumentacji demon ten
302 (File) jest nazywany klientem (na przykład w pliku konfiguracyjnym
306 Summary: Bacula Storage services
307 Summary(pl.UTF-8): Usługi Bacula Storage
308 Group: Networking/Utilities
309 Requires(post): sed >= 4.0
310 Requires: %{name}-common = %{epoch}:%{version}-%{release}
311 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
314 Bacula - It comes by night and sucks the vital essence from your
317 Bacula Storage services consist of the software programs that perform
318 the storage and recovery of the file attributes and data to the
319 physical backup media or volumes. In other words, the Storage daemon
320 is responsible for reading and writing your tapes (or other storage
321 media, e.g. files). The Storage services runs as a daemon on the
322 machine that has the backup device (usually a tape drive).
324 %description sd -l pl.UTF-8
325 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
327 Usługi Bacula Storage składają się z programów obsługujących
328 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
329 fizycznych nośnikach lub wolumenach. Innymi słowy, demon Storage jest
330 odpowiedzialny za odczyt i zapis taśm (lub innych nośników do
331 przechowywania danych, np. plików). Usługi Storage działają jako demon
332 na maszynie, która zawiera urządzenie backupowe (zwykle napęd
336 Summary: Bacula - The Network Backup Solution
337 Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
338 Group: Networking/Utilities
339 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
344 Bacula - It comes by night and sucks the vital essence from your
347 Bacula is a set of computer programs that permit you (or the system
348 administrator) to manage backup, recovery, and verification of
349 computer data across a network of computers of different kinds. In
350 technical terms, it is a network client/server based backup program.
351 Bacula is relatively easy to use and efficient, while offering many
352 advanced storage management features that make it easy to find and
353 recover lost or damaged files.
355 This package installs scripts for disaster recovery and builds rescue
356 floppy disk for bare metal recovery.
358 To make the bacula rescue disk run "./make_rescue_disk
360 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
361 recreate the rescue information for this system run ./getdiskinfo
364 %description rescue -l pl.UTF-8
365 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
367 Bacula to zbiór programów umożliwiających administratorowi na
368 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
369 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
370 program do kopii zapasowych pracujący w architekturze klient-serwer.
371 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
372 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
373 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
376 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkę
377 ratunkowe do odtwarzania systemu od zera.
379 Aby stworzyć dyskietkę ratunkową Baculi, należy uruchomić "./make_rescue_disk
380 --copy-static-bacula - --copy-etc-files" z katalogu
381 %{_sysconfdir}/rescue . Aby ponownie utworzyć informacje ratunkowe dla
382 danego systemu, należy ponownie uruchomić ./getdiskinfo .
392 tar -xf %{SOURCE2} && ln -s bacula-rescue-* rescue
393 sed -i -e 's#wx-config#wx-gtk2-unicode-config#g' configure*
394 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
395 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
396 src/cats/create_* src/cats/delete_* src/cats/drop_* \
397 src/cats/grant_* src/cats/make_* src/cats/update_*
398 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
401 cp -f %{_datadir}/automake/config.sub autoconf
402 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
404 --with-scriptdir=%{_libexecdir}/%{name} \
405 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
407 --enable-smartalloc \
408 %{?with_console_wx:--enable-wx-console} \
409 --enable-tray-monitor \
410 %{?with_python:--with-python} \
412 --with-tcp-wrappers \
413 --with-working-dir=%{_var}/lib/%{name} \
414 --with-dump-email="root@localhost" \
415 --with-job-email="root@localhost" \
416 --with-smtp-host=localhost \
417 --with-pid-dir=/var/run \
418 --with-subsys-dir=/var/lock/subsys \
419 %{?with_mysql:--with-mysql} \
420 %{?with_sqlite:--with-sqlite} \
421 %{?with_sqlite3:--with-sqlite3} \
422 %{?with_sqlite3_sync_off:--enable-extra-sqlite3-init="pragma synchronous=0;"} \
423 --with-dir-password="#FAKE-dir-password#" \
424 --with-fd-password="#FAKE-fd-password#" \
425 --with-sd-password="#FAKE-sd-password#" \
426 --with-mon-dir-password="#FAKE-mon-dir-password#" \
427 --with-mon-fd-password="#FAKE-mon-fd-password#" \
428 --with-mon-sd-password="#FAKE-mon-sd-password#" \
442 rm -rf $RPM_BUILD_ROOT
444 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
445 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
446 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
449 DESTDIR=$RPM_BUILD_ROOT
452 strip -R.comment -R.note src/filed/static-bacula-fd
453 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
455 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
456 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
457 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
458 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
459 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
460 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
461 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
463 %if %{with console_wx}
464 # tray-monitor is for regular users
465 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
467 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
468 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
469 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
470 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
471 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
472 sed -e 's#%{_sbindir}#%{_bindir}#' \
473 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
477 # install the rescue stuff, these are the rescue scripts
478 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
479 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
480 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
481 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
484 # install the updatedb scripts
485 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
487 # place for site passwords
488 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
489 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
492 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
493 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
494 %if !%{with console_wx}
495 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
497 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
500 rm -rf $RPM_BUILD_ROOT
503 %groupadd -P %{name}-common -g 136 -r -f bacula
504 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
507 echo "Updating bacula passwords and names..."
509 for f in *-password ; do
510 if [ ! -s $f ] ; then
511 openssl rand -base64 33 > $f
514 for cf in *.conf *.conf.rpmnew ; do
515 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
518 for cf in *.conf *.conf.rpmnew ; do
519 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
523 if [ "$1" = "0" ]; then
530 [ -s %{_localstatedir}/bacula.db ] && \
531 DB_VER=`echo "select * from Version;" | \
532 %{_bindir}/sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
533 if [ -z "$DB_VER" ]; then
534 # grant privileges and create tables
535 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
536 %{_libexecdir}/%{name}/create_bacula_database > dev/null
537 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
538 elif [ "$DB_VER" -lt "9" ]; then
539 echo "Backing up bacula tables"
540 echo ".dump" | sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
541 echo "Upgrading bacula tables"
544 if [ "$DB_VER" -lt "9" ]; then
545 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
550 if [ "$DB_VER" -lt "9" ]; then
551 if [ "$DB_VER" -lt "8" ]; then
552 if [ "$DB_VER" -lt "7" ]; then
553 if [ "$DB_VER" -lt "6" ]; then
554 if [ "$DB_VER" -lt "5" ]; then
555 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
557 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
559 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
561 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
563 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
566 %{_libexecdir}/%{name}/update_bacula_tables
567 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
569 chown -R bacula:bacula %{_localstatedir}
570 chmod -R u+rX,go-rwx %{_localstatedir}/*
572 echo "Updating Bacula passwords and names..."
574 for f in *-password ; do
576 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
578 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
580 /sbin/chkconfig --add bacula-dir
581 %service bacula-dir restart "Bacula Director daemon"
584 if [ "$1" = "0" ]; then
585 %service bacula-dir stop
586 /sbin/chkconfig --del bacula-dir
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-fd
599 %service bacula-fd restart "Bacula File daemon"
602 if [ "$1" = "0" ]; then
603 %service bacula-fd stop
604 /sbin/chkconfig --del bacula-fd
608 echo "Updating Bacula passwords and names..."
610 for f in *-password ; do
612 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
614 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
616 /sbin/chkconfig --add bacula-sd
617 %service bacula-sd restart "Bacula Storage daemon"
620 if [ "$1" = "0" ]; then
621 %service bacula-sd stop
622 /sbin/chkconfig --del bacula-sd
626 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
627 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
631 echo "Updating Bacula passwords and names..."
633 for f in *-password ; do
635 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
637 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
640 echo "Updating Bacula passwords and names..."
642 for f in *-password ; do
644 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
646 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
649 echo "Updating Bacula passwords and names..."
651 for f in *-password ; do
653 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
655 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
658 echo "Updating Bacula passwords and names..."
660 for f in *-password ; do
662 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
664 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
667 # link our current installed conf file to the rescue directory
668 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
671 echo "Creating rescue files for this system..."
672 cd %{_sysconfdir}/rescue
676 # remove the files created after the initial rpm installation
677 if [ "$1" = "0" ]; then
678 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
679 rm -f %{_sysconfdir}/rescue/partition.*
680 rm -f %{_sysconfdir}/rescue/format.*
681 rm -f %{_sysconfdir}/rescue/mount_drives
682 rm -f %{_sysconfdir}/rescue/start_network
683 rm -f %{_sysconfdir}/rescue/sfdisk
684 rm -rf %{_sysconfdir}/rescue/diskinfo/*
688 %defattr(644,root,root,755)
691 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
692 %attr(755,root,root) %{_sbindir}/bsmtp
693 %attr(755,root,root) %{_sbindir}/btraceback
694 %{_mandir}/man8/bacula.8*
695 %{_mandir}/man1/bsmtp.1*
696 %{_mandir}/man8/btraceback.8*
697 %dir %{_libexecdir}/%{name}
698 %{_libexecdir}/%{name}/btraceback.dbx
699 %{_libexecdir}/%{name}/btraceback.gdb
700 %attr(770,root,bacula) %dir %{_localstatedir}
703 %defattr(644,root,root,755)
704 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
705 #%doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
706 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
707 %ghost %{_sysconfdir}/.pw.sed
708 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
709 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
710 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
711 %attr(755,root,root) %{_sbindir}/bacula-dir
712 %attr(755,root,root) %{_sbindir}/bregex
713 %attr(755,root,root) %{_sbindir}/bwild
714 %attr(755,root,root) %{_sbindir}/dbcheck
715 %{_mandir}/man8/bacula-dir.8*
716 %{_mandir}/man8/dbcheck.8*
717 %{_libexecdir}/%{name}/query.sql
719 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database
720 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_database
721 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_tables
722 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
723 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
724 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
727 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
728 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
729 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
730 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
731 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
732 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite_*
735 %attr(755,root,root) %{_libexecdir}/%{name}/create_mysql_database
736 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_database
737 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_tables
738 %attr(755,root,root) %{_libexecdir}/%{name}/grant_mysql_privileges
739 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_tables
740 %attr(755,root,root) %{_libexecdir}/%{name}/update_mysql_*
742 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
743 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
744 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
745 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
746 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
747 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
748 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
749 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
752 %defattr(644,root,root,755)
754 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
755 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
756 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
757 %attr(755,root,root) %{_sbindir}/bacula-fd
758 %{_mandir}/man8/bacula-fd.8*
761 %defattr(644,root,root,755)
764 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
765 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
766 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
767 %attr(755,root,root) %{_sbindir}/bacula-sd
768 %attr(755,root,root) %{_sbindir}/bcopy
769 %attr(755,root,root) %{_sbindir}/bextract
770 %attr(755,root,root) %{_sbindir}/bls
771 %attr(755,root,root) %{_sbindir}/bscan
772 %attr(755,root,root) %{_sbindir}/btape
773 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
774 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
775 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
776 %{_mandir}/man8/bacula-sd.8*
777 %{_mandir}/man8/bcopy.8*
778 %{_mandir}/man8/bextract.8*
779 %{_mandir}/man8/bls.8*
780 %{_mandir}/man8/bscan.8*
781 %{_mandir}/man8/btape.8*
784 %defattr(644,root,root,755)
786 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
787 %attr(755,root,root) %{_sbindir}/bconsole
788 %{_mandir}/man8/bconsole.8*
790 %if %{with console_wx}
792 %defattr(644,root,root,755)
794 %{_pixmapsdir}/%{name}.png
795 %{_desktopdir}/bacula-wx.desktop
796 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wx-console.conf
797 %attr(755,root,root) %{_sbindir}/wx-console
798 %{_mandir}/man1/bacula-wxconsole.1*
803 %defattr(644,root,root,755)
805 %{_pixmapsdir}/%{name}.png
806 %{_desktopdir}/bacula.desktop
807 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gnome-console.conf
808 %attr(755,root,root) %{_sbindir}/gnome-console
809 %{_mandir}/man1/bacula-console-gnome.1*
812 %if %{with console_wx}
814 %defattr(644,root,root,755)
816 %{_pixmapsdir}/%{name}-tray-monitor.xpm
817 %{_desktopdir}/%{name}-tray-monitor.desktop
818 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
819 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
820 %{_mandir}/man1/bacula-tray-monitor.1*
825 %defattr(644,root,root,755)
827 %dir %{_sysconfdir}/rescue
828 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
829 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
830 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
831 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
832 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
833 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
834 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
835 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
836 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
837 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2