2 # - fix log file permissions
5 %bcond_without bat # bat Qt4 GUI
6 %bcond_without mysql # use MySQL
7 %bcond_without pgsql # use PostgreSQL
8 %bcond_without sqlite3 # use SQLite3
9 %bcond_without nagios # build nagios plugin
10 %bcond_with sqlite3_sync_off # makes SQLite3 backend much faster, but less reliable
12 %if %{without sqlite3}
13 %undefine with_sqlite3_sync_off
17 Summary: Bacula - The Network Backup Solution
18 Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
23 Group: Networking/Utilities
24 Source0: http://downloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
25 # Source0-md5: a0f825a3f083f8f586278f36d12eb5c0
26 Source10: %{name}-dir.init
27 Source11: %{name}-fd.init
28 Source12: %{name}-sd.init
29 Source13: %{name}.logrotate
30 Source14: %{name}-dir.sysconfig
31 Source15: %{name}-fd.sysconfig
32 Source16: %{name}-sd.sysconfig
33 Patch0: %{name}-mtx-changer.patch
34 Patch1: %{name}-branding.patch
35 Patch2: %{name}-conf.patch
36 Patch3: %{name}-desktop.patch
37 Patch4: make_catalog_backup-setup-home.patch
38 Patch5: %{name}-libtool.patch
39 URL: http://www.bacula.org/
40 BuildRequires: acl-devel
41 BuildRequires: autoconf
42 BuildRequires: automake
43 BuildRequires: gettext-devel
44 BuildRequires: libcap-devel
45 BuildRequires: libtool >= 2:2.2
46 BuildRequires: libwrap-devel
47 BuildRequires: ncurses-devel
48 BuildRequires: openssl-devel
49 BuildRequires: pkgconfig
50 BuildRequires: python-devel
51 BuildRequires: python-modules
53 BuildRequires: QtCore-devel
54 BuildRequires: QtGui-devel
55 BuildRequires: qt4-build >= %{qtver}
56 BuildRequires: qt4-qmake >= %{qtver}
58 %{?with_mysql:BuildRequires: mysql-devel}
59 %{?with_pgsql:BuildRequires: postgresql-devel}
60 BuildRequires: readline-devel
61 BuildRequires: rpm >= 4.4.9-56
62 BuildRequires: rpm-pythonprov
63 BuildRequires: rpmbuild(macros) >= 1.268
64 BuildRequires: sed >= 4.0
65 %{?with_sqlite3:BuildRequires: sqlite3-devel}
67 BuildRequires: zlib-devel
68 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70 %define _sysconfdir /etc/%{name}
71 %define _localstatedir /var/lib/%{name}
72 %define nagiosplugindir %{_libdir}/nagios/plugins
74 # from 'the worst' to 'the best'
75 %define databases %{?with_sqlite3:sqlite3} %{?with_mysql:mysql} %{?with_pgsql:postgresql}
77 # dependency section is broken. ccache usage is instead to makefiles
81 Bacula - It comes by night and sucks the vital essence from your
84 Bacula is a set of computer programs that permit you (or the system
85 administrator) to manage backup, recovery, and verification of
86 computer data across a network of computers of different kinds. In
87 technical terms, it is a network client/server based backup program.
88 Bacula is relatively easy to use and efficient, while offering many
89 advanced storage management features that make it easy to find and
90 recover lost or damaged files.
92 %description -l pl.UTF-8
93 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
95 Bacula to zbiór programów umożliwiających administratorowi na
96 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
97 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
98 program do kopii zapasowych pracujący w architekturze klient-serwer.
99 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
100 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
101 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
105 Summary: Common files for bacula package
106 Summary(pl.UTF-8): Pliki wspólne dla pakietu bacula
107 Group: Networking/Utilities
108 Requires(post): openssl-tools
109 Requires(post): sed >= 4.0
110 Requires(post,preun): /sbin/chkconfig
111 Requires(postun): /usr/sbin/groupdel
112 Requires(postun): /usr/sbin/userdel
113 Requires(pre): /usr/sbin/groupadd
114 Requires(pre): /usr/sbin/useradd
115 Conflicts: bacula-console < 0:1.34.6
116 Conflicts: bacula-dir < 0:1.34.6
117 Conflicts: bacula-fd < 0:1.34.6
118 Conflicts: bacula-sd < 0:1.34.6
119 Conflicts: logrotate < 3.8.0
122 Bacula - It comes by night and sucks the vital essence from your
125 Bacula is a set of computer programs that permit you (or the system
126 administrator) to manage backup, recovery, and verification of
127 computer data across a network of computers of different kinds. In
128 technical terms, it is a network client/server based backup program.
129 Bacula is relatively easy to use and efficient, while offering many
130 advanced storage management features that make it easy to find and
131 recover lost or damaged files.
133 %description common -l pl.UTF-8
134 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
136 Bacula to zbiór programów umożliwiających administratorowi na
137 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
138 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
139 program do kopii zapasowych pracujący w architekturze klient-serwer.
140 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
141 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
142 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
146 Summary: Bacula Director and Catalog services
147 Summary(pl.UTF-8): Usługi Bacula Director i Catalog
148 Group: Networking/Utilities
149 Requires(post): sed >= 4.0
150 Requires: %{name}-common = %{version}-%{release}
151 Requires: bacula(db) = %{version}-%{release}
152 Obsoletes: bacula-updatedb
155 Bacula - It comes by night and sucks the vital essence from your
158 Bacula Director is the program that supervises all the backup,
159 restore, verify and archive operations. The system administrator uses
160 the Bacula Director to schedule backups and to recover files. Catalog
161 services are comprised of the software programs responsible for
162 maintaining the file indexes and volume databases for all files backed
163 up. The Catalog services permit the System Administrator or user to
164 quickly locate and restore any desired file, since it maintains a
165 record of all Volumes used, all Jobs run, and all Files saved.
167 %description dir -l pl.UTF-8
168 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
170 Bacula Director to program nadzorujący wszystkie operacje wykonywania
171 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
172 Administrator używa Bacula Directora do szeregowania kopii zapasowych
173 oraz odzyskiwania plików. Usługi katalogowe (Catalog services) są
174 używane przez programy odpowiedzialne za zarządzanie indeksami plików
175 i bazą danych wolumenów dla wszystkich kopiowanych plików. Usługi
176 katalogowe umożliwiają administratorowi lub użytkownikowi szybko
177 zlokalizować i odtworzyć dowolny plik, ponieważ utrzymują rekord ze
178 wszystkimi używanymi wolumenami, uruchomionymi zadaniami i zapisanymi
182 Summary: Bacula Console
183 Summary(pl.UTF-8): Konsola Baculi
184 Group: Networking/Utilities
185 Requires(post): sed >= 4.0
186 Requires: %{name}-common = %{version}-%{release}
189 Bacula - It comes by night and sucks the vital essence from your
192 Bacula Console is the program that allows the administrator or user to
193 communicate with the Bacula Director. This is the text only console
196 %description console -l pl.UTF-8
197 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
199 Bacula Console to program umożliwiający administratorowi lub
200 użytkownikowi komunikowanie się z programem Bacula Director. To jest
201 interfejs czysto tekstowy.
204 Summary: Bacula wxWidgets Console
205 Summary(pl.UTF-8): Konsola Baculi oparta na wxWidgets
206 Group: Networking/Utilities
207 Requires(post): sed >= 4.0
208 Requires: %{name}-common = %{version}-%{release}
210 %description console-wx
211 Bacula - It comes by night and sucks the vital essence from your
214 Bacula Console is the program that allows the administrator or user to
215 communicate with the Bacula Director. This is the wxWidgets GUI
218 %description console-wx -l pl.UTF-8
219 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
221 Bacula Console to program umożliwiający administratorowi lub
222 użytkownikowi komunikowanie się z programem Bacula Director. To jest
223 interfejs graficzny oparty na wxWidgets.
226 Summary: Bacula Qt4 Console
227 Summary(pl.UTF-8): Konsola Baculi oparta na Qt4
228 Group: Networking/Utilities
229 Requires(post): sed >= 4.0
230 Requires: %{name}-common = %{version}-%{release}
231 Requires: QtCore >= %{qtver}
233 %description console-qt4
234 Bacula - It comes by night and sucks the vital essence from your
237 Bacula Console is the program that allows the administrator or user to
238 communicate with the Bacula Director. This is the Qt4 GUI interface.
240 %description console-qt4 -l pl.UTF-8
241 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
243 Bacula Console to program umożliwiający administratorowi lub
244 użytkownikowi komunikowanie się z programem Bacula Director. To jest
245 interfejs graficzny oparty na Qt4.
248 Summary: Bacula File services (Client)
249 Summary(pl.UTF-8): Usługi Bacula File (klient)
250 Group: Networking/Utilities
251 Requires(post): sed >= 4.0
252 Requires: %{name}-common = %{version}-%{release}
255 Bacula - It comes by night and sucks the vital essence from your
258 Bacula File services (or Client program) is the software program that
259 is installed on the machine to be backed up. It is specific to the
260 operating system on which it runs and is responsible for providing the
261 file attributes and data when requested by the Director. The File
262 services are also responsible for the file system dependent part of
263 restoring the file attributes and data during a recovery operation.
264 This program runs as a daemon on the machine to be backed up, and in
265 some of the documentation, the File daemon is referred to as the
266 Client (for example in Bacula configuration file).
268 %description fd -l pl.UTF-8
269 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
271 Usługi Bacula File (inaczej program kliencki) to oprogramowanie, które
272 instaluje się na maszynach, z których mają być wykonywane kopie
273 zapasowe. Są one specyficzne dla systemu operacyjnego, pod którym
274 działa dana maszyna i odpowiadają za dostarczanie atrybutów i danych
275 plików na żądanie Directora. Usługi plikowe są także odpowiedzialne za
276 zależną od systemu plików część odzyskiwania atrybutów i danych plików
277 podczas operacji odzyskiwania danych. Program działa jako demon na
278 maszynie, która ma być backupowana i w części dokumentacji demon ten
279 (File) jest nazywany klientem (na przykład w pliku konfiguracyjnym
283 Summary: Bacula Storage services
284 Summary(pl.UTF-8): Usługi Bacula Storage
285 Group: Networking/Utilities
286 Requires(post): sed >= 4.0
287 Requires: %{name}-common = %{version}-%{release}
288 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
291 Bacula - It comes by night and sucks the vital essence from your
294 Bacula Storage services consist of the software programs that perform
295 the storage and recovery of the file attributes and data to the
296 physical backup media or volumes. In other words, the Storage daemon
297 is responsible for reading and writing your tapes (or other storage
298 media, e.g. files). The Storage services runs as a daemon on the
299 machine that has the backup device (usually a tape drive).
301 %description sd -l pl.UTF-8
302 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
304 Usługi Bacula Storage składają się z programów obsługujących
305 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
306 fizycznych nośnikach lub wolumenach. Innymi słowy, demon Storage jest
307 odpowiedzialny za odczyt i zapis taśm (lub innych nośników do
308 przechowywania danych, np. plików). Usługi Storage działają jako demon
309 na maszynie, która zawiera urządzenie backupowe (zwykle napęd
312 %package db-postgresql
313 Summary: PostgreSQL database driver for Bacula
314 Summary(pl.UTF-8): Sterownik bazy PostgreSQL dla Baculi
315 Group: Networking/Utilities
316 Requires(post): /sbin/ldconfig
317 Requires: %{name}-common = %{version}-%{release}
318 Provides: bacula(db) = %{version}-%{release}
319 Obsoletes: bacula(db)
321 %description db-postgresql
322 PostgreSQL database driver for Bacula.
324 %description db-postgresql -l pl.UTF-8
325 Sterownik bazy PostgreSQL dla Baculi.
328 Summary: MySQL database driver for Bacula
329 Summary(pl.UTF-8): Sterownik bazy MySQL dla Baculi
330 Group: Networking/Utilities
331 Requires(post): /sbin/ldconfig
332 Requires: %{name}-common = %{version}-%{release}
333 Provides: bacula(db) = %{version}-%{release}
334 Obsoletes: bacula(db)
336 %description db-mysql
337 MySQL database driver for Bacula.
339 %description db-mysql -l pl.UTF-8
340 Sterownik bazy MySQL dla Baculi.
343 Summary: SQLite database driver for Bacula
344 Summary(pl.UTF-8): Sterownik bazy SQLite dla Baculi
345 Group: Networking/Utilities
346 Requires(post): /sbin/ldconfig
347 Requires: %{name}-common = %{version}-%{release}
348 Provides: bacula(db) = %{version}-%{release}
349 Obsoletes: bacula(db)
351 %description db-sqlite3
352 SQLite database driver for Bacula.
354 %description db-sqlite3 -l pl.UTF-8
355 Sterownik bazy SQLite dla Baculi.
357 %package -n nagios-plugin-check_bacula
358 Summary: Nagios plugin to check bacula
360 Requires: nagios-common
362 %description -n nagios-plugin-check_bacula
363 Nagios plugin to check bacula.
365 # provided by various db libraries as a symlink
366 %define _noautoreq libbaccats-%{version}.so
377 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
378 src/cats/create_* src/cats/delete_* src/cats/drop_* \
379 src/cats/grant_* src/cats/make_* src/cats/update_*
380 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
381 sed -i -e 's/@basename@/--hostname--/' src/*/*.conf.in
385 %{__aclocal} -I bacula-macros -I gettext-macros
390 %{__autoconf} --prepend-include=$(pwd)/autoconf autoconf/configure.in > configure
392 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
394 WXCONFIG=%{_bindir}/wx-gtk2-unicode-config \
395 QMAKE=%{_bindir}/qt4-qmake \
397 --with-scriptdir=%{_libexecdir}/%{name} \
398 %{?with_bat:--enable-bat} \
400 --enable-smartalloc \
402 --with-tcp-wrappers \
403 --with-working-dir=%{_var}/lib/%{name} \
404 --with-dump-email="root@localhost" \
405 --with-job-email="root@localhost" \
406 --with-smtp-host=localhost \
407 --with-logdir=/var/log/bacula \
408 --with-pid-dir=/var/run \
409 --with-subsys-dir=/var/lock/subsys \
410 --with-systemd=/lib/systemd/system \
411 --enable-batch-insert \
412 %{?with_pgsql:--with-postgresql} \
413 %{?with_mysql:--with-mysql} \
414 %{?with_sqlite3:--with-sqlite3} \
415 %{?with_sqlite3_sync_off:--enable-extra-sqlite3-init="pragma synchronous=0;"} \
416 --with-dir-password="#FAKE-dir-password#" \
417 --with-fd-password="#FAKE-fd-password#" \
418 --with-sd-password="#FAKE-sd-password#" \
419 --with-mon-dir-password="#FAKE-mon-dir-password#" \
420 --with-mon-fd-password="#FAKE-mon-fd-password#" \
421 --with-mon-sd-password="#FAKE-mon-sd-password#" \
430 %{__make} 2>&1 | tee log
431 # check for build errors
432 grep "Error in" log && exit 1
436 %{__make} -C examples/nagios/check_bacula
440 rm -rf $RPM_BUILD_ROOT
441 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
442 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir},/var/log/bacula}
445 DESTDIR=$RPM_BUILD_ROOT
447 # create copies of make_catalog_backup for specific databases; zeore default one (will be ghost)
448 for database in %{databases}; do
449 sed -e "s#default_db_type=.*#default_db_type=${database}#g" \
450 $RPM_BUILD_ROOT%{_libdir}/%{name}/make_catalog_backup \
451 > $RPM_BUILD_ROOT%{_libdir}/%{name}/make_${database}_catalog_backup
452 chmod 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/make_${database}_catalog_backup
454 :> $RPM_BUILD_ROOT%{_libdir}/%{name}/make_catalog_backup
456 # we use db dependant (at compile time) shell script only
457 rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/make_catalog_backup.pl
459 ## replace with empty file, replaced by ldconfig from each db-* package on intsall
460 rm $RPM_BUILD_ROOT%{_libdir}/libbaccats-%{version}.so
461 touch $RPM_BUILD_ROOT%{_libdir}/libbaccats-%{version}.so
463 install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
464 install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
465 install -p %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
466 cp -a %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
467 cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
468 cp -a %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
469 cp -a %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
472 # qmake somewhy does not always create install_bins target. install our own the bin
473 rm -f $RPM_BUILD_ROOT%{_sbindir}/bat
474 libtool --silent --mode=install install src/qt-console/bat $RPM_BUILD_ROOT%{_bindir}
475 cp -a scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
476 cp -a scripts/bat.desktop $RPM_BUILD_ROOT%{_desktopdir}
479 touch $RPM_BUILD_ROOT/var/log/bacula/log
481 # place for site passwords
482 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
483 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
485 mv $RPM_BUILD_ROOT%{_libexecdir}/%{name}/mtx-changer.conf $RPM_BUILD_ROOT%{_sysconfdir}/mtx-changer.conf
488 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
489 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
491 rm $RPM_BUILD_ROOT%{_docdir}/bacula/ChangeLog
492 rm $RPM_BUILD_ROOT%{_docdir}/bacula/INSTALL
493 rm $RPM_BUILD_ROOT%{_docdir}/bacula/LICENSE
494 rm $RPM_BUILD_ROOT%{_docdir}/bacula/README
495 rm $RPM_BUILD_ROOT%{_docdir}/bacula/ReleaseNotes
496 rm $RPM_BUILD_ROOT%{_docdir}/bacula/VERIFYING
498 # startup scripts, those in /etc/rc.d/init.d are better
499 rm $RPM_BUILD_ROOT%{_sbindir}/bacula
500 rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/bacula-ctl-*
503 rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/btraceback.mdb
505 # rename to avoid possible conflicts
506 mv $RPM_BUILD_ROOT%{_sbindir}/{,bacula-}dbcheck
507 mv $RPM_BUILD_ROOT%{_mandir}/man8/{,bacula-}dbcheck.8.gz
509 # no -devel files packaged, so this is also useless
510 rm $RPM_BUILD_ROOT%{_libdir}/libbac{,cfg,find,sql}.{so,la}
513 install -d $RPM_BUILD_ROOT%{nagiosplugindir}
514 %{__make} -C examples/nagios/check_bacula install \
515 sbindir=%{nagiosplugindir} \
516 DESTDIR=$RPM_BUILD_ROOT
520 rm -rf $RPM_BUILD_ROOT
523 %groupadd -P %{name}-common -g 136 -r -f bacula
524 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
526 %define update_configs \
527 echo "Updating bacula passwords and names..." | %banner -a %{name} \
529 for f in *-password; do \
530 if [ ! -s $f ]; then \
531 openssl rand -base64 33 > $f \
534 for cf in *.conf *.conf.rpmnew; do \
535 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || : \
538 for cf in *.conf *.conf.rpmnew; do \
539 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || : \
548 if [ "$1" = "0" ]; then
553 %triggerpostun dir -- %{name}-dir < %{version}-0
554 %banner bacula-dir -t3 <<EOF
555 You have upgraded from an older version of Bacula director.
557 You will probably need to call %{_libexecdir}/%{name}/update_bacula_tables
558 script to upgrade the database.
560 Ensure you database partition has enough free space before you run the upgrade,
561 i.e check that there is enough room to rebuild 'File' table (it is the largest
568 /sbin/chkconfig --add bacula-dir
569 %service bacula-dir restart "Bacula Director daemon"
572 if [ "$1" = "0" ]; then
573 %service bacula-dir stop
574 /sbin/chkconfig --del bacula-dir
579 /sbin/chkconfig --add bacula-fd
580 %service bacula-fd restart "Bacula File daemon"
583 if [ "$1" = "0" ]; then
584 %service bacula-fd stop
585 /sbin/chkconfig --del bacula-fd
590 /sbin/chkconfig --add bacula-sd
591 %service bacula-sd restart "Bacula Storage daemon"
594 if [ "$1" = "0" ]; then
595 %service bacula-sd stop
596 /sbin/chkconfig --del bacula-sd
600 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
601 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
610 %triggerpostun common -- %{name}-common < 5.0.1-2
611 find %{_sysconfdir}/bat.conf* -perm /007 -print0 2>/dev/null | xargs -0 -r chmod 600 || :
618 for name in "create database" "drop tables" "drop database" "grant privileges" "make tables" "update tables"; do \
619 prefix="${name%% *}" \
620 suffix="${name#* }" \
621 ln -sf "${prefix}_%{1}_${suffix}" %{_libexecdir}/%{name}/"${prefix}_bacula_${suffix}" || : \
623 ln -sf "make_%{1}_catalog_backup" %{_libexecdir}/%{name}/make_catalog_backup || : \
624 ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
625 %service bacula-dir restart "Bacula Director daemon"
630 %postun db-postgresql -p /sbin/ldconfig
635 %postun db-mysql -p /sbin/ldconfig
640 %postun db-sqlite3 -p /sbin/ldconfig
643 %defattr(644,root,root,755)
646 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
647 # do not remove bsmtp from files. Fix build if it is not installed.
648 %attr(755,root,root) %{_sbindir}/bsmtp
649 %attr(755,root,root) %{_sbindir}/btraceback
650 %attr(755,root,root) %{_libdir}/libbac-9*.so
651 %attr(755,root,root) %{_libdir}/libbaccfg-9*.so
652 %attr(755,root,root) %{_libdir}/libbacfind-9*.so
653 %attr(755,root,root) %{_libdir}/libbacsd-9*.so
654 %attr(755,root,root) %{_libdir}/libbacsql-9*.so
655 %{_mandir}/man8/bacula.8*
656 %{_mandir}/man1/bsmtp.1*
657 %{_mandir}/man8/btraceback.8*
658 %dir %{_libexecdir}/%{name}
659 %{_libexecdir}/%{name}/btraceback.dbx
660 %{_libexecdir}/%{name}/btraceback.gdb
661 %{_libexecdir}/%{name}/bacula_config
662 %attr(755,root,root) %{_libexecdir}/%{name}/baculabackupreport
663 %attr(770,root,bacula) %dir %{_localstatedir}
664 %attr(750,bacula,logs) %dir /var/log/bacula
665 %attr(640,bacula,logs) %ghost /var/log/bacula/log
668 %defattr(644,root,root,755)
669 %doc ChangeLog ReleaseNotes LICENSE
670 #%doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
671 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
672 %ghost %{_sysconfdir}/.pw.sed
673 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
674 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
675 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
676 %attr(755,root,root) %{_sbindir}/bacula-dir
677 %attr(755,root,root) %{_sbindir}/bdirjson
678 %attr(755,root,root) %{_sbindir}/bregex
679 %attr(755,root,root) %{_sbindir}/bwild
680 %attr(755,root,root) %{_sbindir}/bacula-dbcheck
681 %{_mandir}/man8/bacula-dir.8*
682 %{_mandir}/man8/bacula-dbcheck.8*
683 %{_mandir}/man8/bregex.8*
684 %{_mandir}/man8/bwild.8*
685 %{_libexecdir}/%{name}/query.sql
686 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
689 %defattr(644,root,root,755)
690 %attr(755,root,root) %{_libexecdir}/%{name}/create_postgresql_database
691 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_database
692 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_tables
693 %attr(755,root,root) %{_libexecdir}/%{name}/grant_postgresql_privileges
694 %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_tables
695 %attr(755,root,root) %{_libexecdir}/%{name}/update_postgresql_*
696 %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_catalog_backup
697 %attr(755,root,root) %{_libdir}/libbaccats-postgresql-9*.so
699 %ghost %attr(755,root,root) %{_libdir}/libbaccats-9*.so
700 %ghost %{_libexecdir}/%{name}/create_bacula_database
701 %ghost %{_libexecdir}/%{name}/drop_bacula_tables
702 %ghost %{_libexecdir}/%{name}/drop_bacula_database
703 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
704 %ghost %{_libexecdir}/%{name}/make_bacula_tables
705 %ghost %{_libexecdir}/%{name}/update_bacula_tables
706 %ghost %{_libexecdir}/%{name}/make_catalog_backup
709 %defattr(644,root,root,755)
710 %attr(755,root,root) %{_libexecdir}/%{name}/create_mysql_database
711 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_database
712 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_tables
713 %attr(755,root,root) %{_libexecdir}/%{name}/grant_mysql_privileges
714 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_tables
715 %attr(755,root,root) %{_libexecdir}/%{name}/update_mysql_*
716 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_catalog_backup
717 %attr(755,root,root) %{_libdir}/libbaccats-mysql-9*.so
719 %ghost %attr(755,root,root) %{_libdir}/libbaccats-9*.so
720 %ghost %{_libexecdir}/%{name}/create_bacula_database
721 %ghost %{_libexecdir}/%{name}/drop_bacula_tables
722 %ghost %{_libexecdir}/%{name}/drop_bacula_database
723 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
724 %ghost %{_libexecdir}/%{name}/make_bacula_tables
725 %ghost %{_libexecdir}/%{name}/update_bacula_tables
726 %ghost %{_libexecdir}/%{name}/make_catalog_backup
729 %defattr(644,root,root,755)
730 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database
731 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_database
732 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_tables
733 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
734 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
735 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
736 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_catalog_backup
737 %attr(755,root,root) %{_libdir}/libbaccats-sqlite3-9*.so
739 %ghost %attr(755,root,root) %{_libdir}/libbaccats-9*.so
740 %ghost %{_libexecdir}/%{name}/create_bacula_database
741 %ghost %{_libexecdir}/%{name}/drop_bacula_tables
742 %ghost %{_libexecdir}/%{name}/drop_bacula_database
743 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
744 %ghost %{_libexecdir}/%{name}/make_bacula_tables
745 %ghost %{_libexecdir}/%{name}/update_bacula_tables
746 %ghost %{_libexecdir}/%{name}/make_catalog_backup
749 %defattr(644,root,root,755)
751 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
752 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
753 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
754 %attr(755,root,root) %{_sbindir}/bacula-fd
755 %attr(755,root,root) %{_sbindir}/bfdjson
756 %attr(755,root,root) %{_libdir}/bpipe-fd.so
757 %{_mandir}/man8/bacula-fd.8*
760 %defattr(644,root,root,755)
762 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
763 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mtx-changer.conf
764 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
765 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
766 %attr(755,root,root) %{_sbindir}/bacula-sd
767 %attr(755,root,root) %{_sbindir}/bcopy
768 %attr(755,root,root) %{_sbindir}/bextract
769 %attr(755,root,root) %{_sbindir}/bls
770 %attr(755,root,root) %{_sbindir}/bscan
771 %attr(755,root,root) %{_sbindir}/bsdjson
772 %attr(755,root,root) %{_sbindir}/btape
773 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
774 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
775 %attr(755,root,root) %{_libexecdir}/%{name}/tapealert
776 %{_mandir}/man8/bacula-sd.8*
777 %{_mandir}/man8/bcopy.8*
778 %{_mandir}/man8/bextract.8*
779 %{_mandir}/man8/bls.8*
780 %{_mandir}/man8/bscan.8*
781 %{_mandir}/man8/btape.8*
784 %defattr(644,root,root,755)
786 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
787 %attr(755,root,root) %{_sbindir}/bconsole
788 %attr(755,root,root) %{_sbindir}/bbconsjson
789 %{_mandir}/man8/bconsole.8*
793 %defattr(644,root,root,755)
795 %{_pixmapsdir}/%{name}.png
796 %{_desktopdir}/bat.desktop
797 # Do not make this file world-readable or any user will get full access to the
799 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bat.conf
800 %attr(755,root,root) %{_bindir}/bat
801 %{_mandir}/man1/bat.1*
806 %files -n nagios-plugin-check_bacula
807 %defattr(644,root,root,755)
808 %attr(755,root,root) %{nagiosplugindir}/check_bacula