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 sqlite # use sqlite
10 %bcond_with mysql # use mysql
11 %bcond_with pgsql # use PostgreSQL
14 %bcond_with sqlite3 # use sqlite3 insted sqlite
15 %bcond_with sqlite3_sync_off # makes sqlite3 backend much faster, but less reliable
17 %define _database sqlite
20 %define _database sqlite3
26 %define _database postgresql
28 %undefine with_sqlite3
32 %define _database mysql
34 %undefine with_sqlite3
36 %undefine with_sqlite3_sync_off
39 Summary: Bacula - The Network Backup Solution
40 Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
45 License: extended GPL v2
46 Group: Networking/Utilities
47 Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
48 # Source0-md5: 7d21d14d8411949383b2cfd58dbb9f26
49 Source1: http://dl.sourceforge.net/bacula/%{name}-docs-%{version}.tar.bz2
50 # Source1-md5: cd3d6e4a425a2c4a9607a1597528add9
51 Source2: http://dl.sourceforge.net/bacula/%{name}-rescue-2.2.2.tar.gz
52 # Source2-md5: 5d827dfc73c6307269173b5aa4fa49ce
53 Source10: %{name}-dir.init
54 Source11: %{name}-fd.init
55 Source12: %{name}-sd.init
56 Source13: %{name}.logrotate
57 Source14: %{name}-dir.sysconfig
58 Source15: %{name}-fd.sysconfig
59 Source16: %{name}-sd.sysconfig
60 Patch0: %{name}-dvd-handler_path.patch
61 Patch1: %{name}-link.patch
62 Patch2: %{name}-compile.patch
63 Patch3: %{name}-wx28.patch
64 Patch4: %{name}-sqlite3_init_query.patch
65 URL: http://www.bacula.org/
66 BuildRequires: acl-static
67 BuildRequires: automake
69 BuildRequires: fakeroot
71 BuildRequires: glibc-static
73 BuildRequires: libgnome-devel >= 2.0
74 BuildRequires: libgnomeui-devel >= 2.0
76 BuildRequires: libstdc++-static
77 BuildRequires: libwrap-static
79 BuildRequires: ncurses-devel
80 BuildRequires: openssl-devel
81 BuildRequires: openssl-static
82 BuildRequires: pkgconfig
84 BuildRequires: python-static
86 BuildRequires: qwt-devel
87 BuildRequires: QtGui-devel
88 BuildRequires: readline-devel
89 BuildRequires: rpmbuild(macros) >= 1.268
90 BuildRequires: sed >= 4.0
91 %{?with_sqlite3:BuildRequires: sqlite3-devel}
92 %{?with_sqlite:BuildRequires: sqlite-devel}
93 %{?with_mysql:BuildRequires: mysql-devel}
94 %{?with_pgsql:BuildRequires: postgresql-devel}
95 %if %{with console_wx}
96 BuildRequires: wxGTK2-unicode-devel >= 2.4.0
98 BuildRequires: zlib-devel
99 BuildRequires: zlib-static
100 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
102 %define _sysconfdir /etc/%{name}
103 %define _localstatedir /var/lib/%{name}
105 # dependency section is broken. ccache usage is instead to makefiles
106 %undefine with_ccache
109 Bacula - It comes by night and sucks the vital essence from your
112 Bacula is a set of computer programs that permit you (or the system
113 administrator) to manage backup, recovery, and verification of
114 computer data across a network of computers of different kinds. In
115 technical terms, it is a network client/server based backup program.
116 Bacula is relatively easy to use and efficient, while offering many
117 advanced storage management features that make it easy to find and
118 recover lost or damaged files.
120 %description -l pl.UTF-8
121 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
123 Bacula to zbiór programów umożliwiających administratorowi na
124 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
125 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
126 program do kopii zapasowych pracujący w architekturze klient-serwer.
127 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
128 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
129 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
133 Summary: Common files for bacula package
134 Summary(pl.UTF-8): Pliki wspólne dla pakietu bacula
135 Group: Networking/Utilities
136 Requires(post): openssl-tools
137 Requires(post): sed >= 4.0
138 Requires(post,preun): /sbin/chkconfig
139 Requires(postun): /usr/sbin/groupdel
140 Requires(postun): /usr/sbin/userdel
141 Requires(pre): /usr/sbin/groupadd
142 Requires(pre): /usr/sbin/useradd
143 Conflicts: bacula-console < 0:1.34.6
144 Conflicts: bacula-dir < 0:1.34.6
145 Conflicts: bacula-fd < 0:1.34.6
146 Conflicts: bacula-sd < 0:1.34.6
149 Bacula - It comes by night and sucks the vital essence from your
152 Bacula is a set of computer programs that permit you (or the system
153 administrator) to manage backup, recovery, and verification of
154 computer data across a network of computers of different kinds. In
155 technical terms, it is a network client/server based backup program.
156 Bacula is relatively easy to use and efficient, while offering many
157 advanced storage management features that make it easy to find and
158 recover lost or damaged files.
160 %description common -l pl.UTF-8
161 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
163 Bacula to zbiór programów umożliwiających administratorowi na
164 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
165 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
166 program do kopii zapasowych pracujący w architekturze klient-serwer.
167 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
168 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
169 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
173 Summary: Bacula Director and Catalog services
174 Summary(pl.UTF-8): Usługi Bacula Director i Catalog
175 Group: Networking/Utilities
176 Requires(post): sed >= 4.0
177 Requires: %{name}-common = %{epoch}:%{version}-%{release}
178 Obsoletes: bacula-updatedb
181 Bacula - It comes by night and sucks the vital essence from your
184 Bacula Director is the program that supervises all the backup,
185 restore, verify and archive operations. The system administrator uses
186 the Bacula Director to schedule backups and to recover files. Catalog
187 services are comprised of the software programs responsible for
188 maintaining the file indexes and volume databases for all files backed
189 up. The Catalog services permit the System Administrator or user to
190 quickly locate and restore any desired file, since it maintains a
191 record of all Volumes used, all Jobs run, and all Files saved. This
192 build requires sqlite%{?with_sqlite3:3} to be installed separately as the catalog
195 %description dir -l pl.UTF-8
196 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
198 Bacula Director to program nadzorujący wszystkie operacje wykonywania
199 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
200 Administrator używa Bacula Directora do szeregowania kopii zapasowych
201 oraz odzyskiwania plików. Usługi katalogowe (Catalog services) są
202 używane przez programy odpowiedzialne za zarządzanie indeksami plików
203 i bazą danych wolumenów dla wszystkich kopiowanych plików. Usługi
204 katalogowe umożliwiają administratorowi lub użytkownikowi szybko
205 zlokalizować i odtworzyć dowolny plik, ponieważ utrzymują rekord ze
206 wszystkimi używanymi wolumenami, uruchomionymi zadaniami i zapisanymi
207 plikami. Pakiet wymaga %{_database} zainstalowanego oddzielnie jako bazy
211 Summary: Bacula Console
212 Summary(pl.UTF-8): Konsola Baculi
213 Group: Networking/Utilities
214 Requires(post): sed >= 4.0
215 Requires: %{name}-common = %{epoch}:%{version}-%{release}
218 Bacula - It comes by night and sucks the vital essence from your
221 Bacula Console is the program that allows the administrator or user to
222 communicate with the Bacula Director. This is the text only console
225 %description console -l pl.UTF-8
226 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
228 Bacula Console to program umożliwiający administratorowi lub
229 użytkownikowi komunikowanie się z programem Bacula Director. To jest
230 interfejs czysto tekstowy.
233 Summary: Bacula wxWidgets Console
234 Summary(pl.UTF-8): Konsola Baculi oparta na wxWidgets
235 Group: Networking/Utilities
236 Requires(post): sed >= 4.0
237 Requires: %{name}-common = %{epoch}:%{version}-%{release}
239 %description console-wx
240 Bacula - It comes by night and sucks the vital essence from your
243 Bacula Console is the program that allows the administrator or user to
244 communicate with the Bacula Director. This is the wxWidgets GUI
247 %description console-wx -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 wxWidgets.
254 %package console-gnome
255 Summary: Bacula GNOME Console
256 Summary(pl.UTF-8): Konsola Baculi oparta dla GNOME
257 Group: Networking/Utilities
258 Requires(post): sed >= 4.0
259 Requires: %{name}-common = %{epoch}:%{version}-%{release}
261 %description console-gnome
262 Bacula - It comes by night and sucks the vital essence from your
265 Bacula Console is the program that allows the administrator or user to
266 communicate with the Bacula Director. This is the GNOME GUI interface.
268 %description console-gnome -l pl.UTF-8
269 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
271 Bacula Console to program umożliwiający administratorowi lub
272 użytkownikowi komunikowanie się z programem Bacula Director. To jest
273 interfejs graficzny oparty na GNOME.
275 %package tray-monitor
276 Summary: Bacula Tray Monitor
277 Group: Networking/Utilities
278 Requires(post): sed >= 4.0
279 Requires: %{name}-common = %{epoch}:%{version}-%{release}
281 %description tray-monitor
282 Bacula - It comes by night and sucks the vital essence from your
285 The Monitor program is typically an icon in the system tray. However,
286 once the icon is expanded into a full window, the administrator or
287 user can obtain status information about the Director or the backup
288 status on the local workstation or any other Bacula daemon that is
292 Summary: Bacula File services (Client)
293 Summary(pl.UTF-8): Usługi Bacula File (klient)
294 Group: Networking/Utilities
295 Requires(post): sed >= 4.0
296 Requires: %{name}-common = %{epoch}:%{version}-%{release}
299 Bacula - It comes by night and sucks the vital essence from your
302 Bacula File services (or Client program) is the software program that
303 is installed on the machine to be backed up. It is specific to the
304 operating system on which it runs and is responsible for providing the
305 file attributes and data when requested by the Director. The File
306 services are also responsible for the file system dependent part of
307 restoring the file attributes and data during a recovery operation.
308 This program runs as a daemon on the machine to be backed up, and in
309 some of the documentation, the File daemon is referred to as the
310 Client (for example in Bacula configuration file).
312 %description fd -l pl.UTF-8
313 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
315 Usługi Bacula File (inaczej program kliencki) to oprogramowanie, które
316 instaluje się na maszynach, z których mają być wykonywane kopie
317 zapasowe. Są one specyficzne dla systemu operacyjnego, pod którym
318 działa dana maszyna i odpowiadają za dostarczanie atrybutów i danych
319 plików na żądanie Directora. Usługi plikowe są także odpowiedzialne za
320 zależną od systemu plików część odzyskiwania atrybutów i danych plików
321 podczas operacji odzyskiwania danych. Program działa jako demon na
322 maszynie, która ma być backupowana i w części dokumentacji demon ten
323 (File) jest nazywany klientem (na przykład w pliku konfiguracyjnym
327 Summary: Bacula Storage services
328 Summary(pl.UTF-8): Usługi Bacula Storage
329 Group: Networking/Utilities
330 Requires(post): sed >= 4.0
331 Requires: %{name}-common = %{epoch}:%{version}-%{release}
332 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
335 Bacula - It comes by night and sucks the vital essence from your
338 Bacula Storage services consist of the software programs that perform
339 the storage and recovery of the file attributes and data to the
340 physical backup media or volumes. In other words, the Storage daemon
341 is responsible for reading and writing your tapes (or other storage
342 media, e.g. files). The Storage services runs as a daemon on the
343 machine that has the backup device (usually a tape drive).
345 %description sd -l pl.UTF-8
346 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
348 Usługi Bacula Storage składają się z programów obsługujących
349 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
350 fizycznych nośnikach lub wolumenach. Innymi słowy, demon Storage jest
351 odpowiedzialny za odczyt i zapis taśm (lub innych nośników do
352 przechowywania danych, np. plików). Usługi Storage działają jako demon
353 na maszynie, która zawiera urządzenie backupowe (zwykle napęd
357 Summary: Bacula - The Network Backup Solution
358 Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
359 Group: Networking/Utilities
360 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
365 Bacula - It comes by night and sucks the vital essence from your
368 Bacula is a set of computer programs that permit you (or the system
369 administrator) to manage backup, recovery, and verification of
370 computer data across a network of computers of different kinds. In
371 technical terms, it is a network client/server based backup program.
372 Bacula is relatively easy to use and efficient, while offering many
373 advanced storage management features that make it easy to find and
374 recover lost or damaged files.
376 This package installs scripts for disaster recovery and builds rescue
377 floppy disk for bare metal recovery.
379 To make the bacula rescue disk run "./make_rescue_disk
381 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
382 recreate the rescue information for this system run ./getdiskinfo
385 %description rescue -l pl.UTF-8
386 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
388 Bacula to zbiór programów umożliwiających administratorowi na
389 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
390 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
391 program do kopii zapasowych pracujący w architekturze klient-serwer.
392 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
393 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
394 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
397 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkę
398 ratunkowe do odtwarzania systemu od zera.
400 Aby stworzyć dyskietkę ratunkową Baculi, należy uruchomić "./make_rescue_disk
401 --copy-static-bacula - --copy-etc-files" z katalogu
402 %{_sysconfdir}/rescue . Aby ponownie utworzyć informacje ratunkowe dla
403 danego systemu, należy ponownie uruchomić ./getdiskinfo .
413 tar -xf %{SOURCE2} && ln -s bacula-rescue-* rescue
414 sed -i -e 's#wx-config#wx-gtk2-unicode-config#g' configure*
415 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
416 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
417 src/cats/create_* src/cats/delete_* src/cats/drop_* \
418 src/cats/grant_* src/cats/make_* src/cats/update_*
419 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
422 cp -f %{_datadir}/automake/config.sub autoconf
423 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
425 --with-scriptdir=%{_libexecdir}/%{name} \
426 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
429 --enable-smartalloc \
430 %{?with_console_wx:--enable-bwx-console} \
431 --enable-tray-monitor \
432 %{?with_python:--with-python} \
434 --with-tcp-wrappers \
435 --with-working-dir=%{_var}/lib/%{name} \
436 --with-dump-email="root@localhost" \
437 --with-job-email="root@localhost" \
438 --with-smtp-host=localhost \
439 --with-pid-dir=/var/run \
440 --with-subsys-dir=/var/lock/subsys \
441 --with-%{_database} \
442 %{?with_sqlite3_sync_off:--enable-extra-sqlite3-init="pragma synchronous=0;"} \
443 --with-dir-password="#FAKE-dir-password#" \
444 --with-fd-password="#FAKE-fd-password#" \
445 --with-sd-password="#FAKE-sd-password#" \
446 --with-mon-dir-password="#FAKE-mon-dir-password#" \
447 --with-mon-fd-password="#FAKE-mon-fd-password#" \
448 --with-mon-sd-password="#FAKE-mon-sd-password#" \
461 rm -rf $RPM_BUILD_ROOT
463 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
464 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
465 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
468 DESTDIR=$RPM_BUILD_ROOT
471 #strip -R.comment -R.note src/filed/static-bacula-fd
472 #install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
474 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
475 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
476 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
477 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
478 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
479 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
480 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
482 %if %{with console_wx}
483 # tray-monitor is for regular users
484 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
486 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
487 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
488 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
489 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
490 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
491 sed -e 's#%{_sbindir}#%{_bindir}#' \
492 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
496 # install the rescue stuff, these are the rescue scripts
497 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
498 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
499 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
500 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
503 # install the updatedb scripts
504 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
506 # place for site passwords
507 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
508 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
511 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
512 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
513 %if !%{with console_wx}
514 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
516 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
519 rm -rf $RPM_BUILD_ROOT
522 %groupadd -P %{name}-common -g 136 -r -f bacula
523 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
526 echo "Updating bacula passwords and names..."
528 for f in *-password ; do
529 if [ ! -s $f ] ; then
530 openssl rand -base64 33 > $f
533 for cf in *.conf *.conf.rpmnew ; do
534 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
537 for cf in *.conf *.conf.rpmnew ; do
538 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
542 if [ "$1" = "0" ]; then
549 [ -s %{_localstatedir}/bacula.db ] && \
550 DB_VER=`echo "select * from Version;" | \
551 %{_bindir}/sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
552 if [ -z "$DB_VER" ]; then
553 # grant privileges and create tables
554 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
555 %{_libexecdir}/%{name}/create_bacula_database > dev/null
556 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
557 elif [ "$DB_VER" -lt "9" ]; then
558 echo "Backing up bacula tables"
559 echo ".dump" | sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
560 echo "Upgrading bacula tables"
563 if [ "$DB_VER" -lt "9" ]; then
564 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
569 if [ "$DB_VER" -lt "9" ]; then
570 if [ "$DB_VER" -lt "8" ]; then
571 if [ "$DB_VER" -lt "7" ]; then
572 if [ "$DB_VER" -lt "6" ]; then
573 if [ "$DB_VER" -lt "5" ]; then
574 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
576 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
578 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
580 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
582 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
585 %{_libexecdir}/%{name}/update_bacula_tables
586 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
588 chown -R bacula:bacula %{_localstatedir}
589 chmod -R u+rX,go-rwx %{_localstatedir}/*
591 echo "Updating Bacula passwords and names..."
593 for f in *-password ; do
595 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
597 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
599 /sbin/chkconfig --add bacula-dir
600 %service bacula-dir restart "Bacula Director daemon"
603 if [ "$1" = "0" ]; then
604 %service bacula-dir stop
605 /sbin/chkconfig --del bacula-dir
609 echo "Updating Bacula passwords and names..."
611 for f in *-password ; do
613 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
615 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
617 /sbin/chkconfig --add bacula-fd
618 %service bacula-fd restart "Bacula File daemon"
621 if [ "$1" = "0" ]; then
622 %service bacula-fd stop
623 /sbin/chkconfig --del bacula-fd
627 echo "Updating Bacula passwords and names..."
629 for f in *-password ; do
631 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
633 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
635 /sbin/chkconfig --add bacula-sd
636 %service bacula-sd restart "Bacula Storage daemon"
639 if [ "$1" = "0" ]; then
640 %service bacula-sd stop
641 /sbin/chkconfig --del bacula-sd
645 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
646 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
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 echo "Updating Bacula passwords and names..."
661 for f in *-password ; do
663 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
665 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
668 echo "Updating Bacula passwords and names..."
670 for f in *-password ; do
672 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
674 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
677 echo "Updating Bacula passwords and names..."
679 for f in *-password ; do
681 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
683 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
686 # link our current installed conf file to the rescue directory
687 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
690 echo "Creating rescue files for this system..."
691 cd %{_sysconfdir}/rescue
695 # remove the files created after the initial rpm installation
696 if [ "$1" = "0" ]; then
697 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
698 rm -f %{_sysconfdir}/rescue/partition.*
699 rm -f %{_sysconfdir}/rescue/format.*
700 rm -f %{_sysconfdir}/rescue/mount_drives
701 rm -f %{_sysconfdir}/rescue/start_network
702 rm -f %{_sysconfdir}/rescue/sfdisk
703 rm -rf %{_sysconfdir}/rescue/diskinfo/*
707 %defattr(644,root,root,755)
710 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
711 %attr(755,root,root) %{_sbindir}/bsmtp
712 %attr(755,root,root) %{_sbindir}/btraceback
713 %{_mandir}/man8/bacula.8*
714 %{_mandir}/man1/bsmtp.1*
715 %{_mandir}/man8/btraceback.8*
716 %dir %{_libexecdir}/%{name}
717 %{_libexecdir}/%{name}/btraceback.dbx
718 %{_libexecdir}/%{name}/btraceback.gdb
719 %attr(770,root,bacula) %dir %{_localstatedir}
722 %defattr(644,root,root,755)
723 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
724 #%doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
725 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
726 %ghost %{_sysconfdir}/.pw.sed
727 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
728 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
729 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
730 %attr(755,root,root) %{_sbindir}/bacula-dir
731 %attr(755,root,root) %{_sbindir}/bregex
732 %attr(755,root,root) %{_sbindir}/bwild
733 %attr(755,root,root) %{_sbindir}/dbcheck
734 %{_mandir}/man8/bacula-dir.8*
735 %{_mandir}/man8/dbcheck.8*
736 %{_libexecdir}/%{name}/query.sql
738 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database
739 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_database
740 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_tables
741 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
742 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
743 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
746 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
747 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
748 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
749 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
750 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
751 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite_*
754 %attr(755,root,root) %{_libexecdir}/%{name}/create_mysql_database
755 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_database
756 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_tables
757 %attr(755,root,root) %{_libexecdir}/%{name}/grant_mysql_privileges
758 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_tables
759 %attr(755,root,root) %{_libexecdir}/%{name}/update_mysql_*
762 %attr(755,root,root) %{_libexecdir}/%{name}/create_postgresql_database
763 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_database
764 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_tables
765 %attr(755,root,root) %{_libexecdir}/%{name}/grant_postgresql_privileges
766 %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_tables
767 %attr(755,root,root) %{_libexecdir}/%{name}/update_postgresql_*
769 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
770 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
771 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
772 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
773 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
774 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
775 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
776 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
779 %defattr(644,root,root,755)
781 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
782 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
783 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
784 %attr(755,root,root) %{_sbindir}/bacula-fd
785 %{_mandir}/man8/bacula-fd.8*
788 %defattr(644,root,root,755)
791 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
792 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
793 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
794 %attr(755,root,root) %{_sbindir}/bacula-sd
795 %attr(755,root,root) %{_sbindir}/bcopy
796 %attr(755,root,root) %{_sbindir}/bextract
797 %attr(755,root,root) %{_sbindir}/bls
798 %attr(755,root,root) %{_sbindir}/bscan
799 %attr(755,root,root) %{_sbindir}/btape
800 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
801 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
802 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
803 %{_mandir}/man8/bacula-sd.8*
804 %{_mandir}/man8/bcopy.8*
805 %{_mandir}/man8/bextract.8*
806 %{_mandir}/man8/bls.8*
807 %{_mandir}/man8/bscan.8*
808 %{_mandir}/man8/btape.8*
811 %defattr(644,root,root,755)
813 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
814 %attr(755,root,root) %{_sbindir}/bconsole
815 %{_mandir}/man8/bconsole.8*
817 %if %{with console_wx}
819 %defattr(644,root,root,755)
821 %{_pixmapsdir}/%{name}.png
822 %{_desktopdir}/bacula-wx.desktop
823 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bwx-console.conf
824 %attr(755,root,root) %{_sbindir}/bwx-console
825 %{_mandir}/man1/bacula-bwxconsole.1*
830 %defattr(644,root,root,755)
832 %{_pixmapsdir}/%{name}.png
833 %{_desktopdir}/bacula.desktop
834 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bgnome-console.conf
835 %attr(755,root,root) %{_sbindir}/bgnome-console
836 %{_mandir}/man1/bacula-bgnome-console.1*
839 %if %{with console_wx}
841 %defattr(644,root,root,755)
843 %{_pixmapsdir}/%{name}-tray-monitor.xpm
844 %{_desktopdir}/%{name}-tray-monitor.desktop
845 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
846 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
847 %{_mandir}/man1/bacula-tray-monitor.1*
852 %defattr(644,root,root,755)
854 %dir %{_sysconfdir}/rescue
855 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
856 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
857 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
858 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
859 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
860 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
861 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
862 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
863 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
864 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2