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 bat # bat Qt4 GUI
11 %bcond_with mysql # use mysql
12 %bcond_with pgsql # use PostgreSQL
15 %bcond_with sqlite3 # use sqlite3 insted sqlite
16 %bcond_with sqlite3_sync_off # makes sqlite3 backend much faster, but less reliable
18 %define _database sqlite
21 %define _database sqlite3
27 %define _database postgresql
29 %undefine with_sqlite3
33 %define _database mysql
35 %undefine with_sqlite3
37 %undefine with_sqlite3_sync_off
40 Summary: Bacula - The Network Backup Solution
41 Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
46 License: extended GPL v2
47 Group: Networking/Utilities
48 Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
49 # Source0-md5: 175a796b96c28fc28cbedb1dc881826f
50 Source1: http://dl.sourceforge.net/bacula/%{name}-docs-%{version}.tar.bz2
51 # Source1-md5: 578e4221afd009d711f1430e392823d6
52 Source2: http://dl.sourceforge.net/bacula/%{name}-rescue-%{version}.tar.gz
53 # Source2-md5: 266e3e814482c2c33e071607cb25d38f
54 Source10: %{name}-dir.init
55 Source11: %{name}-fd.init
56 Source12: %{name}-sd.init
57 Source13: %{name}.logrotate
58 Source14: %{name}-dir.sysconfig
59 Source15: %{name}-fd.sysconfig
60 Source16: %{name}-sd.sysconfig
61 Patch0: %{name}-dvd-handler_path.patch
62 Patch1: %{name}-link.patch
63 Patch2: %{name}-compile.patch
64 Patch3: %{name}-wx28.patch
65 Patch4: %{name}-sqlite3_init_query.patch
66 URL: http://www.bacula.org/
67 BuildRequires: acl-static
68 BuildRequires: automake
70 BuildRequires: fakeroot
72 BuildRequires: glibc-static
74 BuildRequires: libgnome-devel >= 2.0
75 BuildRequires: libgnomeui-devel >= 2.0
77 BuildRequires: libstdc++-static
78 BuildRequires: libwrap-static
80 BuildRequires: ncurses-devel
81 BuildRequires: openssl-devel
82 BuildRequires: openssl-static
83 BuildRequires: pkgconfig
85 BuildRequires: python-static
88 BuildRequires: qwt-devel
89 BuildRequires: QtGui-devel
91 BuildRequires: readline-devel
92 BuildRequires: rpmbuild(macros) >= 1.268
93 BuildRequires: sed >= 4.0
94 %{?with_sqlite3:BuildRequires: sqlite3-devel}
95 %{?with_sqlite:BuildRequires: sqlite-devel}
96 %{?with_mysql:BuildRequires: mysql-devel}
97 %{?with_pgsql:BuildRequires: postgresql-devel}
98 %if %{with console_wx}
99 BuildRequires: wxGTK2-unicode-devel >= 2.4.0
101 BuildRequires: zlib-devel
102 BuildRequires: zlib-static
103 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
105 %define _sysconfdir /etc/%{name}
106 %define _localstatedir /var/lib/%{name}
108 # dependency section is broken. ccache usage is instead to makefiles
109 %undefine with_ccache
112 Bacula - It comes by night and sucks the vital essence from your
115 Bacula is a set of computer programs that permit you (or the system
116 administrator) to manage backup, recovery, and verification of
117 computer data across a network of computers of different kinds. In
118 technical terms, it is a network client/server based backup program.
119 Bacula is relatively easy to use and efficient, while offering many
120 advanced storage management features that make it easy to find and
121 recover lost or damaged files.
123 %description -l pl.UTF-8
124 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
126 Bacula to zbiór programów umożliwiających administratorowi na
127 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
128 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
129 program do kopii zapasowych pracujący w architekturze klient-serwer.
130 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
131 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
132 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
136 Summary: Common files for bacula package
137 Summary(pl.UTF-8): Pliki wspólne dla pakietu bacula
138 Group: Networking/Utilities
139 Requires(post): openssl-tools
140 Requires(post): sed >= 4.0
141 Requires(post,preun): /sbin/chkconfig
142 Requires(postun): /usr/sbin/groupdel
143 Requires(postun): /usr/sbin/userdel
144 Requires(pre): /usr/sbin/groupadd
145 Requires(pre): /usr/sbin/useradd
146 Conflicts: bacula-console < 0:1.34.6
147 Conflicts: bacula-dir < 0:1.34.6
148 Conflicts: bacula-fd < 0:1.34.6
149 Conflicts: bacula-sd < 0:1.34.6
152 Bacula - It comes by night and sucks the vital essence from your
155 Bacula is a set of computer programs that permit you (or the system
156 administrator) to manage backup, recovery, and verification of
157 computer data across a network of computers of different kinds. In
158 technical terms, it is a network client/server based backup program.
159 Bacula is relatively easy to use and efficient, while offering many
160 advanced storage management features that make it easy to find and
161 recover lost or damaged files.
163 %description common -l pl.UTF-8
164 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
166 Bacula to zbiór programów umożliwiających administratorowi na
167 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
168 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
169 program do kopii zapasowych pracujący w architekturze klient-serwer.
170 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
171 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
172 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
176 Summary: Bacula Director and Catalog services
177 Summary(pl.UTF-8): Usługi Bacula Director i Catalog
178 Group: Networking/Utilities
179 Requires(post): sed >= 4.0
180 Requires: %{name}-common = %{epoch}:%{version}-%{release}
181 Obsoletes: bacula-updatedb
184 Bacula - It comes by night and sucks the vital essence from your
187 Bacula Director is the program that supervises all the backup,
188 restore, verify and archive operations. The system administrator uses
189 the Bacula Director to schedule backups and to recover files. Catalog
190 services are comprised of the software programs responsible for
191 maintaining the file indexes and volume databases for all files backed
192 up. The Catalog services permit the System Administrator or user to
193 quickly locate and restore any desired file, since it maintains a
194 record of all Volumes used, all Jobs run, and all Files saved. This
195 build requires sqlite%{?with_sqlite3:3} to be installed separately as the catalog
198 %description dir -l pl.UTF-8
199 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
201 Bacula Director to program nadzorujący wszystkie operacje wykonywania
202 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
203 Administrator używa Bacula Directora do szeregowania kopii zapasowych
204 oraz odzyskiwania plików. Usługi katalogowe (Catalog services) są
205 używane przez programy odpowiedzialne za zarządzanie indeksami plików
206 i bazą danych wolumenów dla wszystkich kopiowanych plików. Usługi
207 katalogowe umożliwiają administratorowi lub użytkownikowi szybko
208 zlokalizować i odtworzyć dowolny plik, ponieważ utrzymują rekord ze
209 wszystkimi używanymi wolumenami, uruchomionymi zadaniami i zapisanymi
210 plikami. Pakiet wymaga %{_database} zainstalowanego oddzielnie jako bazy
214 Summary: Bacula Console
215 Summary(pl.UTF-8): Konsola Baculi
216 Group: Networking/Utilities
217 Requires(post): sed >= 4.0
218 Requires: %{name}-common = %{epoch}:%{version}-%{release}
221 Bacula - It comes by night and sucks the vital essence from your
224 Bacula Console is the program that allows the administrator or user to
225 communicate with the Bacula Director. This is the text only console
228 %description console -l pl.UTF-8
229 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
231 Bacula Console to program umożliwiający administratorowi lub
232 użytkownikowi komunikowanie się z programem Bacula Director. To jest
233 interfejs czysto tekstowy.
236 Summary: Bacula wxWidgets Console
237 Summary(pl.UTF-8): Konsola Baculi oparta na wxWidgets
238 Group: Networking/Utilities
239 Requires(post): sed >= 4.0
240 Requires: %{name}-common = %{epoch}:%{version}-%{release}
242 %description console-wx
243 Bacula - It comes by night and sucks the vital essence from your
246 Bacula Console is the program that allows the administrator or user to
247 communicate with the Bacula Director. This is the wxWidgets GUI
250 %description console-wx -l pl.UTF-8
251 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
253 Bacula Console to program umożliwiający administratorowi lub
254 użytkownikowi komunikowanie się z programem Bacula Director. To jest
255 interfejs graficzny oparty na wxWidgets.
257 %package console-gnome
258 Summary: Bacula GNOME Console
259 Summary(pl.UTF-8): Konsola Baculi oparta dla GNOME
260 Group: Networking/Utilities
261 Requires(post): sed >= 4.0
262 Requires: %{name}-common = %{epoch}:%{version}-%{release}
264 %description console-gnome
265 Bacula - It comes by night and sucks the vital essence from your
268 Bacula Console is the program that allows the administrator or user to
269 communicate with the Bacula Director. This is the GNOME GUI interface.
271 %description console-gnome -l pl.UTF-8
272 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
274 Bacula Console to program umożliwiający administratorowi lub
275 użytkownikowi komunikowanie się z programem Bacula Director. To jest
276 interfejs graficzny oparty na GNOME.
278 %package tray-monitor
279 Summary: Bacula Tray Monitor
280 Group: Networking/Utilities
281 Requires(post): sed >= 4.0
282 Requires: %{name}-common = %{epoch}:%{version}-%{release}
284 %description tray-monitor
285 Bacula - It comes by night and sucks the vital essence from your
288 The Monitor program is typically an icon in the system tray. However,
289 once the icon is expanded into a full window, the administrator or
290 user can obtain status information about the Director or the backup
291 status on the local workstation or any other Bacula daemon that is
295 Summary: Bacula File services (Client)
296 Summary(pl.UTF-8): Usługi Bacula File (klient)
297 Group: Networking/Utilities
298 Requires(post): sed >= 4.0
299 Requires: %{name}-common = %{epoch}:%{version}-%{release}
302 Bacula - It comes by night and sucks the vital essence from your
305 Bacula File services (or Client program) is the software program that
306 is installed on the machine to be backed up. It is specific to the
307 operating system on which it runs and is responsible for providing the
308 file attributes and data when requested by the Director. The File
309 services are also responsible for the file system dependent part of
310 restoring the file attributes and data during a recovery operation.
311 This program runs as a daemon on the machine to be backed up, and in
312 some of the documentation, the File daemon is referred to as the
313 Client (for example in Bacula configuration file).
315 %description fd -l pl.UTF-8
316 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
318 Usługi Bacula File (inaczej program kliencki) to oprogramowanie, które
319 instaluje się na maszynach, z których mają być wykonywane kopie
320 zapasowe. Są one specyficzne dla systemu operacyjnego, pod którym
321 działa dana maszyna i odpowiadają za dostarczanie atrybutów i danych
322 plików na żądanie Directora. Usługi plikowe są także odpowiedzialne za
323 zależną od systemu plików część odzyskiwania atrybutów i danych plików
324 podczas operacji odzyskiwania danych. Program działa jako demon na
325 maszynie, która ma być backupowana i w części dokumentacji demon ten
326 (File) jest nazywany klientem (na przykład w pliku konfiguracyjnym
330 Summary: Bacula Storage services
331 Summary(pl.UTF-8): Usługi Bacula Storage
332 Group: Networking/Utilities
333 Requires(post): sed >= 4.0
334 Requires: %{name}-common = %{epoch}:%{version}-%{release}
335 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
338 Bacula - It comes by night and sucks the vital essence from your
341 Bacula Storage services consist of the software programs that perform
342 the storage and recovery of the file attributes and data to the
343 physical backup media or volumes. In other words, the Storage daemon
344 is responsible for reading and writing your tapes (or other storage
345 media, e.g. files). The Storage services runs as a daemon on the
346 machine that has the backup device (usually a tape drive).
348 %description sd -l pl.UTF-8
349 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
351 Usługi Bacula Storage składają się z programów obsługujących
352 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
353 fizycznych nośnikach lub wolumenach. Innymi słowy, demon Storage jest
354 odpowiedzialny za odczyt i zapis taśm (lub innych nośników do
355 przechowywania danych, np. plików). Usługi Storage działają jako demon
356 na maszynie, która zawiera urządzenie backupowe (zwykle napęd
360 Summary: Bacula - The Network Backup Solution
361 Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
362 Group: Networking/Utilities
363 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
368 Bacula - It comes by night and sucks the vital essence from your
371 Bacula is a set of computer programs that permit you (or the system
372 administrator) to manage backup, recovery, and verification of
373 computer data across a network of computers of different kinds. In
374 technical terms, it is a network client/server based backup program.
375 Bacula is relatively easy to use and efficient, while offering many
376 advanced storage management features that make it easy to find and
377 recover lost or damaged files.
379 This package installs scripts for disaster recovery and builds rescue
380 floppy disk for bare metal recovery.
382 To make the bacula rescue disk run "./make_rescue_disk
384 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
385 recreate the rescue information for this system run ./getdiskinfo
388 %description rescue -l pl.UTF-8
389 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
391 Bacula to zbiór programów umożliwiających administratorowi na
392 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
393 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
394 program do kopii zapasowych pracujący w architekturze klient-serwer.
395 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
396 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
397 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
400 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkę
401 ratunkowe do odtwarzania systemu od zera.
403 Aby stworzyć dyskietkę ratunkową Baculi, należy uruchomić "./make_rescue_disk
404 --copy-static-bacula - --copy-etc-files" z katalogu
405 %{_sysconfdir}/rescue . Aby ponownie utworzyć informacje ratunkowe dla
406 danego systemu, należy ponownie uruchomić ./getdiskinfo .
416 tar -xf %{SOURCE2} && ln -s bacula-rescue-* rescue
417 sed -i -e 's#wx-config#wx-gtk2-unicode-config#g' configure*
418 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
419 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
420 src/cats/create_* src/cats/delete_* src/cats/drop_* \
421 src/cats/grant_* src/cats/make_* src/cats/update_*
422 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
425 cp -f %{_datadir}/automake/config.sub autoconf
426 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
428 --with-scriptdir=%{_libexecdir}/%{name} \
429 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
430 %{?with_bat:--enable-bat} \
432 --enable-smartalloc \
433 %{?with_console_wx:--enable-bwx-console} \
434 --enable-tray-monitor \
435 %{?with_python:--with-python} \
437 --with-tcp-wrappers \
438 --with-working-dir=%{_var}/lib/%{name} \
439 --with-dump-email="root@localhost" \
440 --with-job-email="root@localhost" \
441 --with-smtp-host=localhost \
442 --with-pid-dir=/var/run \
443 --with-subsys-dir=/var/lock/subsys \
444 --with-%{_database} \
445 %{?with_sqlite3_sync_off:--enable-extra-sqlite3-init="pragma synchronous=0;"} \
446 --with-dir-password="#FAKE-dir-password#" \
447 --with-fd-password="#FAKE-fd-password#" \
448 --with-sd-password="#FAKE-sd-password#" \
449 --with-mon-dir-password="#FAKE-mon-dir-password#" \
450 --with-mon-fd-password="#FAKE-mon-fd-password#" \
451 --with-mon-sd-password="#FAKE-mon-sd-password#" \
464 rm -rf $RPM_BUILD_ROOT
466 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
467 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
468 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
471 DESTDIR=$RPM_BUILD_ROOT
474 #strip -R.comment -R.note src/filed/static-bacula-fd
475 #install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
477 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
478 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
479 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
480 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
481 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
482 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
483 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
485 %if %{with console_wx}
486 # tray-monitor is for regular users
487 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
489 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
490 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
491 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
492 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
493 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
494 sed -e 's#%{_sbindir}#%{_bindir}#' \
495 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
499 # install the rescue stuff, these are the rescue scripts
500 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
501 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
502 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
503 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
506 # install the updatedb scripts
507 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
509 # place for site passwords
510 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
511 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
514 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
515 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
516 %if !%{with console_wx}
517 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
519 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
522 rm -rf $RPM_BUILD_ROOT
525 %groupadd -P %{name}-common -g 136 -r -f bacula
526 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
529 echo "Updating bacula passwords and names..."
531 for f in *-password ; do
532 if [ ! -s $f ] ; then
533 openssl rand -base64 33 > $f
536 for cf in *.conf *.conf.rpmnew ; do
537 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
540 for cf in *.conf *.conf.rpmnew ; do
541 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
545 if [ "$1" = "0" ]; then
552 [ -s %{_localstatedir}/bacula.db ] && \
553 DB_VER=`echo "select * from Version;" | \
554 %{_bindir}/sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
555 if [ -z "$DB_VER" ]; then
556 # grant privileges and create tables
557 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
558 %{_libexecdir}/%{name}/create_bacula_database > dev/null
559 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
560 elif [ "$DB_VER" -lt "9" ]; then
561 echo "Backing up bacula tables"
562 echo ".dump" | sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
563 echo "Upgrading bacula tables"
566 if [ "$DB_VER" -lt "9" ]; then
567 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
572 if [ "$DB_VER" -lt "9" ]; then
573 if [ "$DB_VER" -lt "8" ]; then
574 if [ "$DB_VER" -lt "7" ]; then
575 if [ "$DB_VER" -lt "6" ]; then
576 if [ "$DB_VER" -lt "5" ]; then
577 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
579 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
581 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
583 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
585 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
588 %{_libexecdir}/%{name}/update_bacula_tables
589 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
591 chown -R bacula:bacula %{_localstatedir}
592 chmod -R u+rX,go-rwx %{_localstatedir}/*
594 echo "Updating Bacula passwords and names..."
596 for f in *-password ; do
598 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
600 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
602 /sbin/chkconfig --add bacula-dir
603 %service bacula-dir restart "Bacula Director daemon"
606 if [ "$1" = "0" ]; then
607 %service bacula-dir stop
608 /sbin/chkconfig --del bacula-dir
612 echo "Updating Bacula passwords and names..."
614 for f in *-password ; do
616 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
618 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
620 /sbin/chkconfig --add bacula-fd
621 %service bacula-fd restart "Bacula File daemon"
624 if [ "$1" = "0" ]; then
625 %service bacula-fd stop
626 /sbin/chkconfig --del bacula-fd
630 echo "Updating Bacula passwords and names..."
632 for f in *-password ; do
634 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
636 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
638 /sbin/chkconfig --add bacula-sd
639 %service bacula-sd restart "Bacula Storage daemon"
642 if [ "$1" = "0" ]; then
643 %service bacula-sd stop
644 /sbin/chkconfig --del bacula-sd
648 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
649 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
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 echo "Updating Bacula passwords and names..."
664 for f in *-password ; do
666 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
668 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
671 echo "Updating Bacula passwords and names..."
673 for f in *-password ; do
675 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
677 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
680 echo "Updating Bacula passwords and names..."
682 for f in *-password ; do
684 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
686 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
689 # link our current installed conf file to the rescue directory
690 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
693 echo "Creating rescue files for this system..."
694 cd %{_sysconfdir}/rescue
698 # remove the files created after the initial rpm installation
699 if [ "$1" = "0" ]; then
700 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
701 rm -f %{_sysconfdir}/rescue/partition.*
702 rm -f %{_sysconfdir}/rescue/format.*
703 rm -f %{_sysconfdir}/rescue/mount_drives
704 rm -f %{_sysconfdir}/rescue/start_network
705 rm -f %{_sysconfdir}/rescue/sfdisk
706 rm -rf %{_sysconfdir}/rescue/diskinfo/*
710 %defattr(644,root,root,755)
713 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
714 %attr(755,root,root) %{_sbindir}/bsmtp
715 %attr(755,root,root) %{_sbindir}/btraceback
716 %{_mandir}/man8/bacula.8*
717 %{_mandir}/man1/bsmtp.1*
718 %{_mandir}/man8/btraceback.8*
719 %dir %{_libexecdir}/%{name}
720 %{_libexecdir}/%{name}/btraceback.dbx
721 %{_libexecdir}/%{name}/btraceback.gdb
722 %attr(770,root,bacula) %dir %{_localstatedir}
725 %defattr(644,root,root,755)
726 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
727 #%doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
728 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
729 %ghost %{_sysconfdir}/.pw.sed
730 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
731 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
732 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
733 %attr(755,root,root) %{_sbindir}/bacula-dir
734 %attr(755,root,root) %{_sbindir}/bregex
735 %attr(755,root,root) %{_sbindir}/bwild
736 %attr(755,root,root) %{_sbindir}/dbcheck
737 %{_mandir}/man8/bacula-dir.8*
738 %{_mandir}/man8/dbcheck.8*
739 %{_libexecdir}/%{name}/query.sql
741 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database
742 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_database
743 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_tables
744 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
745 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
746 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
749 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
750 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
751 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
752 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
753 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
754 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite_*
757 %attr(755,root,root) %{_libexecdir}/%{name}/create_mysql_database
758 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_database
759 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_tables
760 %attr(755,root,root) %{_libexecdir}/%{name}/grant_mysql_privileges
761 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_tables
762 %attr(755,root,root) %{_libexecdir}/%{name}/update_mysql_*
765 %attr(755,root,root) %{_libexecdir}/%{name}/create_postgresql_database
766 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_database
767 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_tables
768 %attr(755,root,root) %{_libexecdir}/%{name}/grant_postgresql_privileges
769 %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_tables
770 %attr(755,root,root) %{_libexecdir}/%{name}/update_postgresql_*
772 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
773 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
774 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
775 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
776 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
777 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
778 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
779 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
782 %defattr(644,root,root,755)
784 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
785 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
786 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
787 %attr(755,root,root) %{_sbindir}/bacula-fd
788 %{_mandir}/man8/bacula-fd.8*
791 %defattr(644,root,root,755)
794 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
795 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
796 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
797 %attr(755,root,root) %{_sbindir}/bacula-sd
798 %attr(755,root,root) %{_sbindir}/bcopy
799 %attr(755,root,root) %{_sbindir}/bextract
800 %attr(755,root,root) %{_sbindir}/bls
801 %attr(755,root,root) %{_sbindir}/bscan
802 %attr(755,root,root) %{_sbindir}/btape
803 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
804 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
805 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
806 %{_mandir}/man8/bacula-sd.8*
807 %{_mandir}/man8/bcopy.8*
808 %{_mandir}/man8/bextract.8*
809 %{_mandir}/man8/bls.8*
810 %{_mandir}/man8/bscan.8*
811 %{_mandir}/man8/btape.8*
814 %defattr(644,root,root,755)
816 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
817 %attr(755,root,root) %{_sbindir}/bconsole
818 %{_mandir}/man8/bconsole.8*
820 %if %{with console_wx}
822 %defattr(644,root,root,755)
824 %{_pixmapsdir}/%{name}.png
825 %{_desktopdir}/bacula-wx.desktop
826 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bwx-console.conf
827 %attr(755,root,root) %{_sbindir}/bwx-console
828 %{_mandir}/man1/bacula-bwxconsole.1*
833 %defattr(644,root,root,755)
835 %{_pixmapsdir}/%{name}.png
836 %{_desktopdir}/bacula.desktop
837 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bgnome-console.conf
838 %attr(755,root,root) %{_sbindir}/bgnome-console
839 %{_mandir}/man1/bacula-bgnome-console.1*
842 %if %{with console_wx}
844 %defattr(644,root,root,755)
846 %{_pixmapsdir}/%{name}-tray-monitor.xpm
847 %{_desktopdir}/%{name}-tray-monitor.desktop
848 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
849 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
850 %{_mandir}/man1/bacula-tray-monitor.1*
855 %defattr(644,root,root,755)
857 %dir %{_sysconfdir}/rescue
858 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
859 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
860 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
861 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
862 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
863 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
864 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
865 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
866 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
867 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2