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: 2e3bbac3bf8b6d4c0825997c3009f18f
50 Source1: http://dl.sourceforge.net/bacula/%{name}-docs-%{version}.tar.bz2
51 # Source1-md5: 115f7276ad5dda8060ac0f9595372cef
52 Source2: http://dl.sourceforge.net/bacula/%{name}-rescue-2.2.4.tar.gz
53 # Source2-md5: a5416d1e9ebd13af8e53f35e4d77bc3e
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
67 Patch10: %{name}-2.2.4-ansi-label.patch
68 Patch11: %{name}-2.2.4-lost-block.patch
69 Patch12: %{name}-2.2.4-parse-command.patch
70 Patch13: %{name}-2.2.4-poll-mount.patch
71 Patch14: %{name}-2.2.4-replace.patch
72 Patch15: %{name}-2.2.4-restore.patch
73 Patch16: %{name}-2.2.4-sd-auth-fail.patch
74 Patch17: %{name}-2.2.4-sql.patch
75 Patch18: %{name}-2.2.4-verify.patch
77 URL: http://www.bacula.org/
78 BuildRequires: acl-static
79 BuildRequires: automake
81 BuildRequires: fakeroot
83 BuildRequires: glibc-static
85 BuildRequires: libgnome-devel >= 2.0
86 BuildRequires: libgnomeui-devel >= 2.0
88 BuildRequires: libstdc++-static
89 BuildRequires: libwrap-static
91 BuildRequires: ncurses-devel
92 BuildRequires: openssl-devel
93 BuildRequires: openssl-static
94 BuildRequires: pkgconfig
96 BuildRequires: python-static
99 BuildRequires: qwt-devel
100 BuildRequires: QtGui-devel
102 BuildRequires: readline-devel
103 BuildRequires: rpmbuild(macros) >= 1.268
104 BuildRequires: sed >= 4.0
105 %{?with_sqlite3:BuildRequires: sqlite3-devel}
106 %{?with_sqlite:BuildRequires: sqlite-devel}
107 %{?with_mysql:BuildRequires: mysql-devel}
108 %{?with_pgsql:BuildRequires: postgresql-devel}
109 %if %{with console_wx}
110 BuildRequires: wxGTK2-unicode-devel >= 2.4.0
112 BuildRequires: zlib-devel
113 BuildRequires: zlib-static
114 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
116 %define _sysconfdir /etc/%{name}
117 %define _localstatedir /var/lib/%{name}
119 # dependency section is broken. ccache usage is instead to makefiles
120 %undefine with_ccache
123 Bacula - It comes by night and sucks the vital essence from your
126 Bacula is a set of computer programs that permit you (or the system
127 administrator) to manage backup, recovery, and verification of
128 computer data across a network of computers of different kinds. In
129 technical terms, it is a network client/server based backup program.
130 Bacula is relatively easy to use and efficient, while offering many
131 advanced storage management features that make it easy to find and
132 recover lost or damaged files.
134 %description -l pl.UTF-8
135 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
137 Bacula to zbiór programów umożliwiających administratorowi na
138 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
139 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
140 program do kopii zapasowych pracujący w architekturze klient-serwer.
141 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
142 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
143 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
147 Summary: Common files for bacula package
148 Summary(pl.UTF-8): Pliki wspólne dla pakietu bacula
149 Group: Networking/Utilities
150 Requires(post): openssl-tools
151 Requires(post): sed >= 4.0
152 Requires(post,preun): /sbin/chkconfig
153 Requires(postun): /usr/sbin/groupdel
154 Requires(postun): /usr/sbin/userdel
155 Requires(pre): /usr/sbin/groupadd
156 Requires(pre): /usr/sbin/useradd
157 Conflicts: bacula-console < 0:1.34.6
158 Conflicts: bacula-dir < 0:1.34.6
159 Conflicts: bacula-fd < 0:1.34.6
160 Conflicts: bacula-sd < 0:1.34.6
163 Bacula - It comes by night and sucks the vital essence from your
166 Bacula is a set of computer programs that permit you (or the system
167 administrator) to manage backup, recovery, and verification of
168 computer data across a network of computers of different kinds. In
169 technical terms, it is a network client/server based backup program.
170 Bacula is relatively easy to use and efficient, while offering many
171 advanced storage management features that make it easy to find and
172 recover lost or damaged files.
174 %description common -l pl.UTF-8
175 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
177 Bacula to zbiór programów umożliwiających administratorowi na
178 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
179 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
180 program do kopii zapasowych pracujący w architekturze klient-serwer.
181 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
182 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
183 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
187 Summary: Bacula Director and Catalog services
188 Summary(pl.UTF-8): Usługi Bacula Director i Catalog
189 Group: Networking/Utilities
190 Requires(post): sed >= 4.0
191 Requires: %{name}-common = %{epoch}:%{version}-%{release}
192 Obsoletes: bacula-updatedb
195 Bacula - It comes by night and sucks the vital essence from your
198 Bacula Director is the program that supervises all the backup,
199 restore, verify and archive operations. The system administrator uses
200 the Bacula Director to schedule backups and to recover files. Catalog
201 services are comprised of the software programs responsible for
202 maintaining the file indexes and volume databases for all files backed
203 up. The Catalog services permit the System Administrator or user to
204 quickly locate and restore any desired file, since it maintains a
205 record of all Volumes used, all Jobs run, and all Files saved. This
206 build requires sqlite%{?with_sqlite3:3} to be installed separately as the catalog
209 %description dir -l pl.UTF-8
210 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
212 Bacula Director to program nadzorujący wszystkie operacje wykonywania
213 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
214 Administrator używa Bacula Directora do szeregowania kopii zapasowych
215 oraz odzyskiwania plików. Usługi katalogowe (Catalog services) są
216 używane przez programy odpowiedzialne za zarządzanie indeksami plików
217 i bazą danych wolumenów dla wszystkich kopiowanych plików. Usługi
218 katalogowe umożliwiają administratorowi lub użytkownikowi szybko
219 zlokalizować i odtworzyć dowolny plik, ponieważ utrzymują rekord ze
220 wszystkimi używanymi wolumenami, uruchomionymi zadaniami i zapisanymi
221 plikami. Pakiet wymaga %{_database} zainstalowanego oddzielnie jako bazy
225 Summary: Bacula Console
226 Summary(pl.UTF-8): Konsola Baculi
227 Group: Networking/Utilities
228 Requires(post): sed >= 4.0
229 Requires: %{name}-common = %{epoch}:%{version}-%{release}
232 Bacula - It comes by night and sucks the vital essence from your
235 Bacula Console is the program that allows the administrator or user to
236 communicate with the Bacula Director. This is the text only console
239 %description console -l pl.UTF-8
240 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
242 Bacula Console to program umożliwiający administratorowi lub
243 użytkownikowi komunikowanie się z programem Bacula Director. To jest
244 interfejs czysto tekstowy.
247 Summary: Bacula wxWidgets Console
248 Summary(pl.UTF-8): Konsola Baculi oparta na wxWidgets
249 Group: Networking/Utilities
250 Requires(post): sed >= 4.0
251 Requires: %{name}-common = %{epoch}:%{version}-%{release}
253 %description console-wx
254 Bacula - It comes by night and sucks the vital essence from your
257 Bacula Console is the program that allows the administrator or user to
258 communicate with the Bacula Director. This is the wxWidgets GUI
261 %description console-wx -l pl.UTF-8
262 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
264 Bacula Console to program umożliwiający administratorowi lub
265 użytkownikowi komunikowanie się z programem Bacula Director. To jest
266 interfejs graficzny oparty na wxWidgets.
268 %package console-gnome
269 Summary: Bacula GNOME Console
270 Summary(pl.UTF-8): Konsola Baculi oparta dla GNOME
271 Group: Networking/Utilities
272 Requires(post): sed >= 4.0
273 Requires: %{name}-common = %{epoch}:%{version}-%{release}
275 %description console-gnome
276 Bacula - It comes by night and sucks the vital essence from your
279 Bacula Console is the program that allows the administrator or user to
280 communicate with the Bacula Director. This is the GNOME GUI interface.
282 %description console-gnome -l pl.UTF-8
283 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
285 Bacula Console to program umożliwiający administratorowi lub
286 użytkownikowi komunikowanie się z programem Bacula Director. To jest
287 interfejs graficzny oparty na GNOME.
289 %package tray-monitor
290 Summary: Bacula Tray Monitor
291 Group: Networking/Utilities
292 Requires(post): sed >= 4.0
293 Requires: %{name}-common = %{epoch}:%{version}-%{release}
295 %description tray-monitor
296 Bacula - It comes by night and sucks the vital essence from your
299 The Monitor program is typically an icon in the system tray. However,
300 once the icon is expanded into a full window, the administrator or
301 user can obtain status information about the Director or the backup
302 status on the local workstation or any other Bacula daemon that is
306 Summary: Bacula File services (Client)
307 Summary(pl.UTF-8): Usługi Bacula File (klient)
308 Group: Networking/Utilities
309 Requires(post): sed >= 4.0
310 Requires: %{name}-common = %{epoch}:%{version}-%{release}
313 Bacula - It comes by night and sucks the vital essence from your
316 Bacula File services (or Client program) is the software program that
317 is installed on the machine to be backed up. It is specific to the
318 operating system on which it runs and is responsible for providing the
319 file attributes and data when requested by the Director. The File
320 services are also responsible for the file system dependent part of
321 restoring the file attributes and data during a recovery operation.
322 This program runs as a daemon on the machine to be backed up, and in
323 some of the documentation, the File daemon is referred to as the
324 Client (for example in Bacula configuration file).
326 %description fd -l pl.UTF-8
327 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
329 Usługi Bacula File (inaczej program kliencki) to oprogramowanie, które
330 instaluje się na maszynach, z których mają być wykonywane kopie
331 zapasowe. Są one specyficzne dla systemu operacyjnego, pod którym
332 działa dana maszyna i odpowiadają za dostarczanie atrybutów i danych
333 plików na żądanie Directora. Usługi plikowe są także odpowiedzialne za
334 zależną od systemu plików część odzyskiwania atrybutów i danych plików
335 podczas operacji odzyskiwania danych. Program działa jako demon na
336 maszynie, która ma być backupowana i w części dokumentacji demon ten
337 (File) jest nazywany klientem (na przykład w pliku konfiguracyjnym
341 Summary: Bacula Storage services
342 Summary(pl.UTF-8): Usługi Bacula Storage
343 Group: Networking/Utilities
344 Requires(post): sed >= 4.0
345 Requires: %{name}-common = %{epoch}:%{version}-%{release}
346 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
349 Bacula - It comes by night and sucks the vital essence from your
352 Bacula Storage services consist of the software programs that perform
353 the storage and recovery of the file attributes and data to the
354 physical backup media or volumes. In other words, the Storage daemon
355 is responsible for reading and writing your tapes (or other storage
356 media, e.g. files). The Storage services runs as a daemon on the
357 machine that has the backup device (usually a tape drive).
359 %description sd -l pl.UTF-8
360 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
362 Usługi Bacula Storage składają się z programów obsługujących
363 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
364 fizycznych nośnikach lub wolumenach. Innymi słowy, demon Storage jest
365 odpowiedzialny za odczyt i zapis taśm (lub innych nośników do
366 przechowywania danych, np. plików). Usługi Storage działają jako demon
367 na maszynie, która zawiera urządzenie backupowe (zwykle napęd
371 Summary: Bacula - The Network Backup Solution
372 Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
373 Group: Networking/Utilities
374 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
379 Bacula - It comes by night and sucks the vital essence from your
382 Bacula is a set of computer programs that permit you (or the system
383 administrator) to manage backup, recovery, and verification of
384 computer data across a network of computers of different kinds. In
385 technical terms, it is a network client/server based backup program.
386 Bacula is relatively easy to use and efficient, while offering many
387 advanced storage management features that make it easy to find and
388 recover lost or damaged files.
390 This package installs scripts for disaster recovery and builds rescue
391 floppy disk for bare metal recovery.
393 To make the bacula rescue disk run "./make_rescue_disk
395 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To
396 recreate the rescue information for this system run ./getdiskinfo
399 %description rescue -l pl.UTF-8
400 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
402 Bacula to zbiór programów umożliwiających administratorowi na
403 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
404 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
405 program do kopii zapasowych pracujący w architekturze klient-serwer.
406 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
407 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
408 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
411 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkę
412 ratunkowe do odtwarzania systemu od zera.
414 Aby stworzyć dyskietkę ratunkową Baculi, należy uruchomić "./make_rescue_disk
415 --copy-static-bacula - --copy-etc-files" z katalogu
416 %{_sysconfdir}/rescue . Aby ponownie utworzyć informacje ratunkowe dla
417 danego systemu, należy ponownie uruchomić ./getdiskinfo .
438 tar -xf %{SOURCE2} && ln -s bacula-rescue-* rescue
439 sed -i -e 's#wx-config#wx-gtk2-unicode-config#g' configure*
440 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
441 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
442 src/cats/create_* src/cats/delete_* src/cats/drop_* \
443 src/cats/grant_* src/cats/make_* src/cats/update_*
444 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
447 cp -f %{_datadir}/automake/config.sub autoconf
448 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
450 --with-scriptdir=%{_libexecdir}/%{name} \
451 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
452 %{?with_bat:--enable-bat} \
454 --enable-smartalloc \
455 %{?with_console_wx:--enable-bwx-console} \
456 --enable-tray-monitor \
457 %{?with_python:--with-python} \
459 --with-tcp-wrappers \
460 --with-working-dir=%{_var}/lib/%{name} \
461 --with-dump-email="root@localhost" \
462 --with-job-email="root@localhost" \
463 --with-smtp-host=localhost \
464 --with-pid-dir=/var/run \
465 --with-subsys-dir=/var/lock/subsys \
466 --with-%{_database} \
467 %{?with_sqlite3_sync_off:--enable-extra-sqlite3-init="pragma synchronous=0;"} \
468 --with-dir-password="#FAKE-dir-password#" \
469 --with-fd-password="#FAKE-fd-password#" \
470 --with-sd-password="#FAKE-sd-password#" \
471 --with-mon-dir-password="#FAKE-mon-dir-password#" \
472 --with-mon-fd-password="#FAKE-mon-fd-password#" \
473 --with-mon-sd-password="#FAKE-mon-sd-password#" \
486 rm -rf $RPM_BUILD_ROOT
488 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
489 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
490 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
493 DESTDIR=$RPM_BUILD_ROOT
496 #strip -R.comment -R.note src/filed/static-bacula-fd
497 #install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
499 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
500 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
501 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
502 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
503 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
504 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
505 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
507 %if %{with console_wx}
508 # tray-monitor is for regular users
509 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
511 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
512 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
513 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
514 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
515 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
516 sed -e 's#%{_sbindir}#%{_bindir}#' \
517 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
521 # install the rescue stuff, these are the rescue scripts
522 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
523 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
524 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
525 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
528 # install the updatedb scripts
529 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
531 # place for site passwords
532 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
533 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
536 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
537 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
538 %if !%{with console_wx}
539 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
541 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
544 rm -rf $RPM_BUILD_ROOT
547 %groupadd -P %{name}-common -g 136 -r -f bacula
548 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
551 echo "Updating bacula passwords and names..."
553 for f in *-password ; do
554 if [ ! -s $f ] ; then
555 openssl rand -base64 33 > $f
558 for cf in *.conf *.conf.rpmnew ; do
559 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
562 for cf in *.conf *.conf.rpmnew ; do
563 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
567 if [ "$1" = "0" ]; then
574 [ -s %{_localstatedir}/bacula.db ] && \
575 DB_VER=`echo "select * from Version;" | \
576 %{_bindir}/sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
577 if [ -z "$DB_VER" ]; then
578 # grant privileges and create tables
579 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
580 %{_libexecdir}/%{name}/create_bacula_database > dev/null
581 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
582 elif [ "$DB_VER" -lt "9" ]; then
583 echo "Backing up bacula tables"
584 echo ".dump" | sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
585 echo "Upgrading bacula tables"
588 if [ "$DB_VER" -lt "9" ]; then
589 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
594 if [ "$DB_VER" -lt "9" ]; then
595 if [ "$DB_VER" -lt "8" ]; then
596 if [ "$DB_VER" -lt "7" ]; then
597 if [ "$DB_VER" -lt "6" ]; then
598 if [ "$DB_VER" -lt "5" ]; then
599 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
601 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
603 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
605 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
607 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
610 %{_libexecdir}/%{name}/update_bacula_tables
611 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
613 chown -R bacula:bacula %{_localstatedir}
614 chmod -R u+rX,go-rwx %{_localstatedir}/*
616 echo "Updating Bacula passwords and names..."
618 for f in *-password ; do
620 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
622 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
624 /sbin/chkconfig --add bacula-dir
625 %service bacula-dir restart "Bacula Director daemon"
628 if [ "$1" = "0" ]; then
629 %service bacula-dir stop
630 /sbin/chkconfig --del bacula-dir
634 echo "Updating Bacula passwords and names..."
636 for f in *-password ; do
638 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
640 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
642 /sbin/chkconfig --add bacula-fd
643 %service bacula-fd restart "Bacula File daemon"
646 if [ "$1" = "0" ]; then
647 %service bacula-fd stop
648 /sbin/chkconfig --del bacula-fd
652 echo "Updating Bacula passwords and names..."
654 for f in *-password ; do
656 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
658 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
660 /sbin/chkconfig --add bacula-sd
661 %service bacula-sd restart "Bacula Storage daemon"
664 if [ "$1" = "0" ]; then
665 %service bacula-sd stop
666 /sbin/chkconfig --del bacula-sd
670 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
671 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
675 echo "Updating Bacula passwords and names..."
677 for f in *-password ; do
679 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
681 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
684 echo "Updating Bacula passwords and names..."
686 for f in *-password ; do
688 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
690 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
693 echo "Updating Bacula passwords and names..."
695 for f in *-password ; do
697 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
699 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
702 echo "Updating Bacula passwords and names..."
704 for f in *-password ; do
706 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
708 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
711 # link our current installed conf file to the rescue directory
712 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
715 echo "Creating rescue files for this system..."
716 cd %{_sysconfdir}/rescue
720 # remove the files created after the initial rpm installation
721 if [ "$1" = "0" ]; then
722 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
723 rm -f %{_sysconfdir}/rescue/partition.*
724 rm -f %{_sysconfdir}/rescue/format.*
725 rm -f %{_sysconfdir}/rescue/mount_drives
726 rm -f %{_sysconfdir}/rescue/start_network
727 rm -f %{_sysconfdir}/rescue/sfdisk
728 rm -rf %{_sysconfdir}/rescue/diskinfo/*
732 %defattr(644,root,root,755)
735 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
736 %attr(755,root,root) %{_sbindir}/bsmtp
737 %attr(755,root,root) %{_sbindir}/btraceback
738 %{_mandir}/man8/bacula.8*
739 %{_mandir}/man1/bsmtp.1*
740 %{_mandir}/man8/btraceback.8*
741 %dir %{_libexecdir}/%{name}
742 %{_libexecdir}/%{name}/btraceback.dbx
743 %{_libexecdir}/%{name}/btraceback.gdb
744 %attr(770,root,bacula) %dir %{_localstatedir}
747 %defattr(644,root,root,755)
748 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
749 #%doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
750 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
751 %ghost %{_sysconfdir}/.pw.sed
752 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
753 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
754 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
755 %attr(755,root,root) %{_sbindir}/bacula-dir
756 %attr(755,root,root) %{_sbindir}/bregex
757 %attr(755,root,root) %{_sbindir}/bwild
758 %attr(755,root,root) %{_sbindir}/dbcheck
759 %{_mandir}/man8/bacula-dir.8*
760 %{_mandir}/man8/dbcheck.8*
761 %{_libexecdir}/%{name}/query.sql
763 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database
764 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_database
765 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_tables
766 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
767 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
768 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
771 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
772 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
773 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
774 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
775 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
776 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite_*
779 %attr(755,root,root) %{_libexecdir}/%{name}/create_mysql_database
780 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_database
781 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_tables
782 %attr(755,root,root) %{_libexecdir}/%{name}/grant_mysql_privileges
783 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_tables
784 %attr(755,root,root) %{_libexecdir}/%{name}/update_mysql_*
787 %attr(755,root,root) %{_libexecdir}/%{name}/create_postgresql_database
788 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_database
789 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_tables
790 %attr(755,root,root) %{_libexecdir}/%{name}/grant_postgresql_privileges
791 %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_tables
792 %attr(755,root,root) %{_libexecdir}/%{name}/update_postgresql_*
794 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
795 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
796 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
797 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
798 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
799 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
800 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
801 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
804 %defattr(644,root,root,755)
806 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
807 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
808 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
809 %attr(755,root,root) %{_sbindir}/bacula-fd
810 %{_mandir}/man8/bacula-fd.8*
813 %defattr(644,root,root,755)
816 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
817 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
818 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
819 %attr(755,root,root) %{_sbindir}/bacula-sd
820 %attr(755,root,root) %{_sbindir}/bcopy
821 %attr(755,root,root) %{_sbindir}/bextract
822 %attr(755,root,root) %{_sbindir}/bls
823 %attr(755,root,root) %{_sbindir}/bscan
824 %attr(755,root,root) %{_sbindir}/btape
825 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
826 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
827 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
828 %{_mandir}/man8/bacula-sd.8*
829 %{_mandir}/man8/bcopy.8*
830 %{_mandir}/man8/bextract.8*
831 %{_mandir}/man8/bls.8*
832 %{_mandir}/man8/bscan.8*
833 %{_mandir}/man8/btape.8*
836 %defattr(644,root,root,755)
838 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
839 %attr(755,root,root) %{_sbindir}/bconsole
840 %{_mandir}/man8/bconsole.8*
842 %if %{with console_wx}
844 %defattr(644,root,root,755)
846 %{_pixmapsdir}/%{name}.png
847 %{_desktopdir}/bacula-wx.desktop
848 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bwx-console.conf
849 %attr(755,root,root) %{_sbindir}/bwx-console
850 %{_mandir}/man1/bacula-bwxconsole.1*
855 %defattr(644,root,root,755)
857 %{_pixmapsdir}/%{name}.png
858 %{_desktopdir}/bacula.desktop
859 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bgnome-console.conf
860 %attr(755,root,root) %{_sbindir}/bgnome-console
861 %{_mandir}/man1/bacula-bgnome-console.1*
864 %if %{with console_wx}
866 %defattr(644,root,root,755)
868 %{_pixmapsdir}/%{name}-tray-monitor.xpm
869 %{_desktopdir}/%{name}-tray-monitor.desktop
870 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
871 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
872 %{_mandir}/man1/bacula-tray-monitor.1*
877 %defattr(644,root,root,755)
879 %dir %{_sysconfdir}/rescue
880 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
881 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
882 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
883 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
884 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
885 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
886 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
887 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
888 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
889 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2