2 # - update desktop files, think about su-wrappers for console (with .desktop files)
3 # - fix log file permissions
4 # - check on upgrade (5.0 and 5.2 databases are NOT compatible)
7 %bcond_without bat # bat Qt4 GUI
8 %bcond_without mysql # use MySQL
9 %bcond_without pgsql # use PostgreSQL
10 %bcond_without sqlite3 # use SQLite3
11 %bcond_without nagios # build nagios plugin
12 %bcond_with sqlite3_sync_off # makes SQLite3 backend much faster, but less reliable
14 %if %{without sqlite3}
15 %undefine with_sqlite3_sync_off
19 Summary: Bacula - The Network Backup Solution
20 Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
25 Group: Networking/Utilities
26 Source0: http://downloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
27 # Source0-md5: 219bde6b1f36625e69102c788bffa70b
28 Source1: http://downloads.sourceforge.net/bacula/%{name}-docs-7.0.3.tar.bz2
29 # Source1-md5: 5932a0aa1258d0f9e78d9fc9fac91d1f
30 Source10: %{name}-dir.init
31 Source11: %{name}-fd.init
32 Source12: %{name}-sd.init
33 Source13: %{name}.logrotate
34 Source14: %{name}-dir.sysconfig
35 Source15: %{name}-fd.sysconfig
36 Source16: %{name}-sd.sysconfig
37 Patch0: %{name}-mtx-changer.patch
38 Patch1: %{name}-branding.patch
39 Patch2: %{name}-conf.patch
40 Patch3: %{name}-desktop.patch
41 Patch4: make_catalog_backup-setup-home.patch
42 URL: http://www.bacula.org/
43 BuildRequires: acl-devel
44 BuildRequires: autoconf
45 BuildRequires: automake
46 BuildRequires: gettext-devel
47 BuildRequires: libcap-devel
48 BuildRequires: libtool >= 2:2.2
49 BuildRequires: libwrap-devel
50 BuildRequires: ncurses-devel
51 BuildRequires: openssl-devel
52 BuildRequires: pkgconfig
53 BuildRequires: python-devel
54 BuildRequires: python-modules
56 BuildRequires: QtCore-devel
57 BuildRequires: QtGui-devel
58 BuildRequires: qt4-build >= %{qtver}
59 BuildRequires: qt4-qmake >= %{qtver}
61 %{?with_mysql:BuildRequires: mysql-devel}
62 %{?with_pgsql:BuildRequires: postgresql-devel}
63 BuildRequires: readline-devel
64 BuildRequires: rpm >= 4.4.9-56
65 BuildRequires: rpm-pythonprov
66 BuildRequires: rpmbuild(macros) >= 1.268
67 BuildRequires: sed >= 4.0
68 %{?with_sqlite3:BuildRequires: sqlite3-devel}
70 BuildRequires: zlib-devel
71 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73 %define _sysconfdir /etc/%{name}
74 %define _localstatedir /var/lib/%{name}
75 %define nagiosplugindir %{_libdir}/nagios/plugins
77 # from 'the worst' to 'the best'
78 %define databases %{?with_sqlite3:sqlite3} %{?with_mysql:mysql} %{?with_pgsql:postgresql}
80 # dependency section is broken. ccache usage is instead to makefiles
84 Bacula - It comes by night and sucks the vital essence from your
87 Bacula is a set of computer programs that permit you (or the system
88 administrator) to manage backup, recovery, and verification of
89 computer data across a network of computers of different kinds. In
90 technical terms, it is a network client/server based backup program.
91 Bacula is relatively easy to use and efficient, while offering many
92 advanced storage management features that make it easy to find and
93 recover lost or damaged files.
95 %description -l pl.UTF-8
96 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
98 Bacula to zbiór programów umożliwiających administratorowi na
99 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
100 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
101 program do kopii zapasowych pracujący w architekturze klient-serwer.
102 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
103 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
104 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
108 Summary: Common files for bacula package
109 Summary(pl.UTF-8): Pliki wspólne dla pakietu bacula
110 Group: Networking/Utilities
111 Requires(post): openssl-tools
112 Requires(post): sed >= 4.0
113 Requires(post,preun): /sbin/chkconfig
114 Requires(postun): /usr/sbin/groupdel
115 Requires(postun): /usr/sbin/userdel
116 Requires(pre): /usr/sbin/groupadd
117 Requires(pre): /usr/sbin/useradd
118 Conflicts: bacula-console < 0:1.34.6
119 Conflicts: bacula-dir < 0:1.34.6
120 Conflicts: bacula-fd < 0:1.34.6
121 Conflicts: bacula-sd < 0:1.34.6
122 Conflicts: logrotate < 3.8.0
125 Bacula - It comes by night and sucks the vital essence from your
128 Bacula is a set of computer programs that permit you (or the system
129 administrator) to manage backup, recovery, and verification of
130 computer data across a network of computers of different kinds. In
131 technical terms, it is a network client/server based backup program.
132 Bacula is relatively easy to use and efficient, while offering many
133 advanced storage management features that make it easy to find and
134 recover lost or damaged files.
136 %description common -l pl.UTF-8
137 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
139 Bacula to zbiór programów umożliwiających administratorowi na
140 zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w
141 sieci komputerów różnego rodzaju. W terminologii technicznej jest to
142 program do kopii zapasowych pracujący w architekturze klient-serwer.
143 Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym
144 wiele zaawansowanych możliwości przy zarządzaniu nośnikami,
145 ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych
149 Summary: Bacula Director and Catalog services
150 Summary(pl.UTF-8): Usługi Bacula Director i Catalog
151 Group: Networking/Utilities
152 Requires(post): sed >= 4.0
153 Requires: %{name}-common = %{version}-%{release}
154 Requires: bacula(db) = %{version}-%{release}
155 Obsoletes: bacula-updatedb
158 Bacula - It comes by night and sucks the vital essence from your
161 Bacula Director is the program that supervises all the backup,
162 restore, verify and archive operations. The system administrator uses
163 the Bacula Director to schedule backups and to recover files. Catalog
164 services are comprised of the software programs responsible for
165 maintaining the file indexes and volume databases for all files backed
166 up. The Catalog services permit the System Administrator or user to
167 quickly locate and restore any desired file, since it maintains a
168 record of all Volumes used, all Jobs run, and all Files saved.
170 %description dir -l pl.UTF-8
171 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
173 Bacula Director to program nadzorujący wszystkie operacje wykonywania
174 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
175 Administrator używa Bacula Directora do szeregowania kopii zapasowych
176 oraz odzyskiwania plików. Usługi katalogowe (Catalog services) są
177 używane przez programy odpowiedzialne za zarządzanie indeksami plików
178 i bazą danych wolumenów dla wszystkich kopiowanych plików. Usługi
179 katalogowe umożliwiają administratorowi lub użytkownikowi szybko
180 zlokalizować i odtworzyć dowolny plik, ponieważ utrzymują rekord ze
181 wszystkimi używanymi wolumenami, uruchomionymi zadaniami i zapisanymi
185 Summary: Bacula Console
186 Summary(pl.UTF-8): Konsola Baculi
187 Group: Networking/Utilities
188 Requires(post): sed >= 4.0
189 Requires: %{name}-common = %{version}-%{release}
192 Bacula - It comes by night and sucks the vital essence from your
195 Bacula Console is the program that allows the administrator or user to
196 communicate with the Bacula Director. This is the text only console
199 %description console -l pl.UTF-8
200 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
202 Bacula Console to program umożliwiający administratorowi lub
203 użytkownikowi komunikowanie się z programem Bacula Director. To jest
204 interfejs czysto tekstowy.
207 Summary: Bacula wxWidgets Console
208 Summary(pl.UTF-8): Konsola Baculi oparta na wxWidgets
209 Group: Networking/Utilities
210 Requires(post): sed >= 4.0
211 Requires: %{name}-common = %{version}-%{release}
213 %description console-wx
214 Bacula - It comes by night and sucks the vital essence from your
217 Bacula Console is the program that allows the administrator or user to
218 communicate with the Bacula Director. This is the wxWidgets GUI
221 %description console-wx -l pl.UTF-8
222 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
224 Bacula Console to program umożliwiający administratorowi lub
225 użytkownikowi komunikowanie się z programem Bacula Director. To jest
226 interfejs graficzny oparty na wxWidgets.
229 Summary: Bacula Qt4 Console
230 Summary(pl.UTF-8): Konsola Baculi oparta na Qt4
231 Group: Networking/Utilities
232 Requires(post): sed >= 4.0
233 Requires: %{name}-common = %{version}-%{release}
234 Requires: QtCore >= %{qtver}
236 %description console-qt4
237 Bacula - It comes by night and sucks the vital essence from your
240 Bacula Console is the program that allows the administrator or user to
241 communicate with the Bacula Director. This is the Qt4 GUI interface.
243 %description console-qt4 -l pl.UTF-8
244 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
246 Bacula Console to program umożliwiający administratorowi lub
247 użytkownikowi komunikowanie się z programem Bacula Director. To jest
248 interfejs graficzny oparty na Qt4.
250 %package tray-monitor
251 Summary: Bacula Tray Monitor
252 Group: Networking/Utilities
253 Requires(post): sed >= 4.0
254 Requires: %{name}-common = %{version}-%{release}
256 %description tray-monitor
257 Bacula - It comes by night and sucks the vital essence from your
260 The Monitor program is typically an icon in the system tray. However,
261 once the icon is expanded into a full window, the administrator or
262 user can obtain status information about the Director or the backup
263 status on the local workstation or any other Bacula daemon that is
267 Summary: Bacula File services (Client)
268 Summary(pl.UTF-8): Usługi Bacula File (klient)
269 Group: Networking/Utilities
270 Requires(post): sed >= 4.0
271 Requires: %{name}-common = %{version}-%{release}
274 Bacula - It comes by night and sucks the vital essence from your
277 Bacula File services (or Client program) is the software program that
278 is installed on the machine to be backed up. It is specific to the
279 operating system on which it runs and is responsible for providing the
280 file attributes and data when requested by the Director. The File
281 services are also responsible for the file system dependent part of
282 restoring the file attributes and data during a recovery operation.
283 This program runs as a daemon on the machine to be backed up, and in
284 some of the documentation, the File daemon is referred to as the
285 Client (for example in Bacula configuration file).
287 %description fd -l pl.UTF-8
288 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
290 Usługi Bacula File (inaczej program kliencki) to oprogramowanie, które
291 instaluje się na maszynach, z których mają być wykonywane kopie
292 zapasowe. Są one specyficzne dla systemu operacyjnego, pod którym
293 działa dana maszyna i odpowiadają za dostarczanie atrybutów i danych
294 plików na żądanie Directora. Usługi plikowe są także odpowiedzialne za
295 zależną od systemu plików część odzyskiwania atrybutów i danych plików
296 podczas operacji odzyskiwania danych. Program działa jako demon na
297 maszynie, która ma być backupowana i w części dokumentacji demon ten
298 (File) jest nazywany klientem (na przykład w pliku konfiguracyjnym
302 Summary: Bacula Storage services
303 Summary(pl.UTF-8): Usługi Bacula Storage
304 Group: Networking/Utilities
305 Requires(post): sed >= 4.0
306 Requires: %{name}-common = %{version}-%{release}
307 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
310 Bacula - It comes by night and sucks the vital essence from your
313 Bacula Storage services consist of the software programs that perform
314 the storage and recovery of the file attributes and data to the
315 physical backup media or volumes. In other words, the Storage daemon
316 is responsible for reading and writing your tapes (or other storage
317 media, e.g. files). The Storage services runs as a daemon on the
318 machine that has the backup device (usually a tape drive).
320 %description sd -l pl.UTF-8
321 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
323 Usługi Bacula Storage składają się z programów obsługujących
324 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
325 fizycznych nośnikach lub wolumenach. Innymi słowy, demon Storage jest
326 odpowiedzialny za odczyt i zapis taśm (lub innych nośników do
327 przechowywania danych, np. plików). Usługi Storage działają jako demon
328 na maszynie, która zawiera urządzenie backupowe (zwykle napęd
331 %package db-postgresql
332 Summary: PostgreSQL database driver for Bacula
333 Summary(pl.UTF-8): Sterownik bazy PostgreSQL dla Baculi
334 Group: Networking/Utilities
335 Requires(post): /sbin/ldconfig
336 Requires: %{name}-common = %{version}-%{release}
337 Provides: bacula(db) = %{version}-%{release}
338 Obsoletes: bacula(db)
340 %description db-postgresql
341 PostgreSQL database driver for Bacula.
343 %description db-postgresql -l pl.UTF-8
344 Sterownik bazy PostgreSQL dla Baculi.
347 Summary: MySQL database driver for Bacula
348 Summary(pl.UTF-8): Sterownik bazy MySQL dla Baculi
349 Group: Networking/Utilities
350 Requires(post): /sbin/ldconfig
351 Requires: %{name}-common = %{version}-%{release}
352 Provides: bacula(db) = %{version}-%{release}
353 Obsoletes: bacula(db)
355 %description db-mysql
356 MySQL database driver for Bacula.
358 %description db-mysql -l pl.UTF-8
359 Sterownik bazy MySQL dla Baculi.
362 Summary: SQLite database driver for Bacula
363 Summary(pl.UTF-8): Sterownik bazy SQLite dla Baculi
364 Group: Networking/Utilities
365 Requires(post): /sbin/ldconfig
366 Requires: %{name}-common = %{version}-%{release}
367 Provides: bacula(db) = %{version}-%{release}
368 Obsoletes: bacula(db)
370 %description db-sqlite3
371 SQLite database driver for Bacula.
373 %description db-sqlite3 -l pl.UTF-8
374 Sterownik bazy SQLite dla Baculi.
376 %package -n nagios-plugin-check_bacula
377 Summary: Nagios plugin to check bacula
379 Requires: nagios-common
381 %description -n nagios-plugin-check_bacula
382 Nagios plugin to check bacula.
384 # provided by various db libraries as a symlink
385 %define _noautoreq libbaccats-%{version}.so
395 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
396 src/cats/create_* src/cats/delete_* src/cats/drop_* \
397 src/cats/grant_* src/cats/make_* src/cats/update_*
398 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
399 sed -i -e 's/@basename@/--hostname--/' src/*/*.conf.in
403 %{__aclocal} -I bacula-macros -I gettext-macros
404 # $BUILD_DIR not seen by libtoolize, export it
405 BUILD_DIR=.. %{__libtoolize}
407 %{__autoconf} --prepend-include=$(pwd)/autoconf autoconf/configure.in > configure
409 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
411 WXCONFIG=%{_bindir}/wx-gtk2-unicode-config \
412 QMAKE=%{_bindir}/qt4-qmake \
414 --with-scriptdir=%{_libexecdir}/%{name} \
415 %{?with_bat:--enable-bat} \
417 --enable-smartalloc \
419 --with-tcp-wrappers \
420 --with-working-dir=%{_var}/lib/%{name} \
421 --with-dump-email="root@localhost" \
422 --with-job-email="root@localhost" \
423 --with-smtp-host=localhost \
424 --with-logdir=/var/log/bacula \
425 --with-pid-dir=/var/run \
426 --with-subsys-dir=/var/lock/subsys \
427 --with-systemd=/lib/systemd/system \
428 --enable-batch-insert \
429 %{?with_pgsql:--with-postgresql} \
430 %{?with_mysql:--with-mysql} \
431 %{?with_sqlite3:--with-sqlite3} \
432 %{?with_sqlite3_sync_off:--enable-extra-sqlite3-init="pragma synchronous=0;"} \
433 --with-dir-password="#FAKE-dir-password#" \
434 --with-fd-password="#FAKE-fd-password#" \
435 --with-sd-password="#FAKE-sd-password#" \
436 --with-mon-dir-password="#FAKE-mon-dir-password#" \
437 --with-mon-fd-password="#FAKE-mon-fd-password#" \
438 --with-mon-sd-password="#FAKE-mon-sd-password#" \
447 %{__make} 2>&1 | tee log
448 # check for build errors
449 grep "Error in" log && exit 1
453 %{__make} -C examples/nagios/check_bacula
457 rm -rf $RPM_BUILD_ROOT
458 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
459 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir},/var/log/bacula}
462 DESTDIR=$RPM_BUILD_ROOT
464 # create copies of make_catalog_backup for specific databases; zeore default one (will be ghost)
465 for database in %{databases}; do
466 sed -e "s#default_db_type=.*#default_db_type=${database}#g" \
467 $RPM_BUILD_ROOT%{_libdir}/%{name}/make_catalog_backup \
468 > $RPM_BUILD_ROOT%{_libdir}/%{name}/make_${database}_catalog_backup
469 chmod 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/make_${database}_catalog_backup
471 :> $RPM_BUILD_ROOT%{_libdir}/%{name}/make_catalog_backup
473 # we use db dependant (at compile time) shell script only
474 rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/make_catalog_backup.pl
476 ## replace with empty file, replaced by ldconfig from each db-* package on intsall
477 rm $RPM_BUILD_ROOT%{_libdir}/libbaccats-%{version}.so
478 touch $RPM_BUILD_ROOT%{_libdir}/libbaccats-%{version}.so
480 install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
481 install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
482 install -p %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
483 cp -a %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
484 cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
485 cp -a %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
486 cp -a %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
489 # qmake somewhy does not always create install_bins target. install our own the bin
490 rm -f $RPM_BUILD_ROOT%{_sbindir}/bat
491 libtool --silent --mode=install install src/qt-console/bat $RPM_BUILD_ROOT%{_bindir}
492 cp -a scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
493 cp -a scripts/bat.desktop $RPM_BUILD_ROOT%{_desktopdir}
496 touch $RPM_BUILD_ROOT/var/log/bacula/log
498 # install the updatedb scripts for older versions that last full release
499 # 2.0 -> 3.0 : 10_to_11
500 # 5.0 -> 5.2 : 12_to_14
501 install -p updatedb/update_*_tables_10_to_11 $RPM_BUILD_ROOT%{_libexecdir}/%{name}
502 install -p updatedb/update_*_tables_11_to_12 $RPM_BUILD_ROOT%{_libexecdir}/%{name}
503 install -p updatedb/update_*_tables_12_to_14 $RPM_BUILD_ROOT%{_libexecdir}/%{name}
505 # place for site passwords
506 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
507 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
509 mv $RPM_BUILD_ROOT%{_libexecdir}/%{name}/mtx-changer.conf $RPM_BUILD_ROOT%{_sysconfdir}/mtx-changer.conf
512 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
513 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
515 rm $RPM_BUILD_ROOT%{_docdir}/bacula/ChangeLog
516 rm $RPM_BUILD_ROOT%{_docdir}/bacula/INSTALL
517 rm $RPM_BUILD_ROOT%{_docdir}/bacula/LICENSE
518 rm $RPM_BUILD_ROOT%{_docdir}/bacula/README
519 rm $RPM_BUILD_ROOT%{_docdir}/bacula/ReleaseNotes
520 rm $RPM_BUILD_ROOT%{_docdir}/bacula/VERIFYING
521 rm $RPM_BUILD_ROOT%{_docdir}/bacula/technotes
523 # startup scripts, those in /etc/rc.d/init.d are better
524 rm $RPM_BUILD_ROOT%{_sbindir}/bacula
525 rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/bacula-ctl-*
528 rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/btraceback.mdb
530 # rename to avoid possible conflicts
531 mv $RPM_BUILD_ROOT%{_sbindir}/{,bacula-}dbcheck
532 mv $RPM_BUILD_ROOT%{_mandir}/man8/{,bacula-}dbcheck.8.gz
534 # no -devel files packaged, so this is also useless
535 rm $RPM_BUILD_ROOT%{_libdir}/libbac{,cfg,find,sql}.{so,la}
538 install -d $RPM_BUILD_ROOT%{nagiosplugindir}
539 %{__make} -C examples/nagios/check_bacula install \
540 sbindir=%{nagiosplugindir} \
541 DESTDIR=$RPM_BUILD_ROOT
545 rm -rf $RPM_BUILD_ROOT
548 %groupadd -P %{name}-common -g 136 -r -f bacula
549 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
551 %define update_configs \
552 echo "Updating bacula passwords and names..." | %banner -a %{name} \
554 for f in *-password; do \
555 if [ ! -s $f ]; then \
556 openssl rand -base64 33 > $f \
559 for cf in *.conf *.conf.rpmnew; do \
560 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || : \
563 for cf in *.conf *.conf.rpmnew; do \
564 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || : \
573 if [ "$1" = "0" ]; then
578 %triggerpostun dir -- %{name}-dir < %{version}-0
579 %banner bacula-dir -t3 <<EOF
580 You have upgraded from an older version of Bacula director.
582 You will probably need to call %{_libexecdir}/%{name}/update_bacula_tables
583 script to upgrade the database.
585 Ensure you database partition has enough free space before you run the upgrade,
586 i.e check that there is enough room to rebuild 'File' table (it is the largest
593 /sbin/chkconfig --add bacula-dir
594 %service bacula-dir restart "Bacula Director daemon"
597 if [ "$1" = "0" ]; then
598 %service bacula-dir stop
599 /sbin/chkconfig --del bacula-dir
604 /sbin/chkconfig --add bacula-fd
605 %service bacula-fd restart "Bacula File daemon"
608 if [ "$1" = "0" ]; then
609 %service bacula-fd stop
610 /sbin/chkconfig --del bacula-fd
615 /sbin/chkconfig --add bacula-sd
616 %service bacula-sd restart "Bacula Storage daemon"
619 if [ "$1" = "0" ]; then
620 %service bacula-sd stop
621 /sbin/chkconfig --del bacula-sd
625 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
626 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
635 %triggerpostun common -- %{name}-common < 5.0.1-2
636 find %{_sysconfdir}/bat.conf* -perm /007 -print0 2>/dev/null | xargs -0 -r chmod 600 || :
646 for name in "create database" "drop tables" "drop database" "grant privileges" "make tables" "update tables"; do \
647 prefix="${name%% *}" \
648 suffix="${name#* }" \
649 ln -sf "${prefix}_%{1}_${suffix}" %{_libexecdir}/%{name}/"${prefix}_bacula_${suffix}" || : \
651 ln -sf "make_%{1}_catalog_backup" %{_libexecdir}/%{name}/make_catalog_backup || : \
652 ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
653 %service bacula-dir restart "Bacula Director daemon"
658 %postun db-postgresql -p /sbin/ldconfig
663 %postun db-mysql -p /sbin/ldconfig
668 %postun db-sqlite3 -p /sbin/ldconfig
671 %defattr(644,root,root,755)
674 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
675 # do not remove bsmtp from files. Fix build if it is not installed.
676 %attr(755,root,root) %{_sbindir}/bpluginfo
677 %attr(755,root,root) %{_sbindir}/bsmtp
678 %attr(755,root,root) %{_sbindir}/btraceback
679 %attr(755,root,root) %{_libdir}/libbac-7*.so
680 %attr(755,root,root) %{_libdir}/libbaccfg-7*.so
681 %attr(755,root,root) %{_libdir}/libbacfind-7*.so
682 #%attr(755,root,root) %{_libdir}/libbacpy-7*.so
683 %attr(755,root,root) %{_libdir}/libbacsql-7*.so
684 %{_mandir}/man8/bacula.8*
685 %{_mandir}/man8/bpluginfo.8*
686 %{_mandir}/man1/bsmtp.1*
687 %{_mandir}/man8/btraceback.8*
688 %dir %{_libexecdir}/%{name}
689 %{_libexecdir}/%{name}/btraceback.dbx
690 %{_libexecdir}/%{name}/btraceback.gdb
691 %{_libexecdir}/%{name}/bacula_config
692 %attr(770,root,bacula) %dir %{_localstatedir}
693 %attr(750,bacula,logs) %dir /var/log/bacula
694 %attr(640,bacula,logs) %ghost /var/log/bacula/log
697 %defattr(644,root,root,755)
698 %doc ChangeLog ReleaseNotes LICENSE
699 #%doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
700 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
701 %ghost %{_sysconfdir}/.pw.sed
702 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
703 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
704 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
705 %attr(755,root,root) %{_sbindir}/bacula-dir
706 %attr(755,root,root) %{_sbindir}/bregex
707 %attr(755,root,root) %{_sbindir}/bwild
708 %attr(755,root,root) %{_sbindir}/bacula-dbcheck
709 %{_mandir}/man8/bacula-dir.8*
710 %{_mandir}/man8/bacula-dbcheck.8*
711 %{_mandir}/man8/bregex.8*
712 %{_mandir}/man8/bwild.8*
713 %{_libexecdir}/%{name}/query.sql
714 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
717 %defattr(644,root,root,755)
718 %attr(755,root,root) %{_libexecdir}/%{name}/create_postgresql_database
719 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_database
720 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_tables
721 %attr(755,root,root) %{_libexecdir}/%{name}/grant_postgresql_privileges
722 %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_tables
723 %attr(755,root,root) %{_libexecdir}/%{name}/update_postgresql_*
724 %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_catalog_backup
725 %attr(755,root,root) %{_libdir}/libbaccats-postgresql-7*.so
727 %ghost %attr(755,root,root) %{_libdir}/libbaccats-7*.so
728 %ghost %{_libexecdir}/%{name}/create_bacula_database
729 %ghost %{_libexecdir}/%{name}/drop_bacula_tables
730 %ghost %{_libexecdir}/%{name}/drop_bacula_database
731 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
732 %ghost %{_libexecdir}/%{name}/make_bacula_tables
733 %ghost %{_libexecdir}/%{name}/update_bacula_tables
734 %ghost %{_libexecdir}/%{name}/make_catalog_backup
737 %defattr(644,root,root,755)
738 %attr(755,root,root) %{_libexecdir}/%{name}/create_mysql_database
739 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_database
740 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_tables
741 %attr(755,root,root) %{_libexecdir}/%{name}/grant_mysql_privileges
742 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_tables
743 %attr(755,root,root) %{_libexecdir}/%{name}/update_mysql_*
744 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_catalog_backup
745 %attr(755,root,root) %{_libdir}/libbaccats-mysql-7*.so
747 %ghost %attr(755,root,root) %{_libdir}/libbaccats-7*.so
748 %ghost %{_libexecdir}/%{name}/create_bacula_database
749 %ghost %{_libexecdir}/%{name}/drop_bacula_tables
750 %ghost %{_libexecdir}/%{name}/drop_bacula_database
751 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
752 %ghost %{_libexecdir}/%{name}/make_bacula_tables
753 %ghost %{_libexecdir}/%{name}/update_bacula_tables
754 %ghost %{_libexecdir}/%{name}/make_catalog_backup
757 %defattr(644,root,root,755)
758 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database
759 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_database
760 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_tables
761 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
762 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
763 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
764 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_catalog_backup
765 %attr(755,root,root) %{_libdir}/libbaccats-sqlite3-7*.so
767 %ghost %attr(755,root,root) %{_libdir}/libbaccats-7*.so
768 %ghost %{_libexecdir}/%{name}/create_bacula_database
769 %ghost %{_libexecdir}/%{name}/drop_bacula_tables
770 %ghost %{_libexecdir}/%{name}/drop_bacula_database
771 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
772 %ghost %{_libexecdir}/%{name}/make_bacula_tables
773 %ghost %{_libexecdir}/%{name}/update_bacula_tables
774 %ghost %{_libexecdir}/%{name}/make_catalog_backup
777 %defattr(644,root,root,755)
779 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
780 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
781 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
782 %attr(755,root,root) %{_sbindir}/bacula-fd
783 %attr(755,root,root) %{_libdir}/bpipe-fd.so
784 %{_mandir}/man8/bacula-fd.8*
787 %defattr(644,root,root,755)
789 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
790 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mtx-changer.conf
791 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
792 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
793 %attr(755,root,root) %{_sbindir}/bacula-sd
794 %attr(755,root,root) %{_sbindir}/bcopy
795 %attr(755,root,root) %{_sbindir}/bextract
796 %attr(755,root,root) %{_sbindir}/bls
797 %attr(755,root,root) %{_sbindir}/bscan
798 %attr(755,root,root) %{_sbindir}/btape
799 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
800 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
801 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
802 %{_mandir}/man8/bacula-sd.8*
803 %{_mandir}/man8/bcopy.8*
804 %{_mandir}/man8/bextract.8*
805 %{_mandir}/man8/bls.8*
806 %{_mandir}/man8/bscan.8*
807 %{_mandir}/man8/btape.8*
810 %defattr(644,root,root,755)
812 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
813 %attr(755,root,root) %{_sbindir}/bconsole
814 %{_mandir}/man8/bconsole.8*
818 %defattr(644,root,root,755)
820 %{_pixmapsdir}/%{name}.png
821 %{_desktopdir}/bat.desktop
822 # Do not make this file world-readable or any user will get full access to the
824 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bat.conf
825 %attr(755,root,root) %{_bindir}/bat
826 %{_mandir}/man1/bat.1*
831 %files -n nagios-plugin-check_bacula
832 %defattr(644,root,root,755)
833 %attr(755,root,root) %{nagiosplugindir}/check_bacula