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: c290c505b51699201cc5e0adea01f2e0
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.
247 %package tray-monitor
248 Summary: Bacula Tray Monitor
249 Group: Networking/Utilities
250 Requires(post): sed >= 4.0
251 Requires: %{name}-common = %{version}-%{release}
253 %description tray-monitor
254 Bacula - It comes by night and sucks the vital essence from your
257 The Monitor program is typically an icon in the system tray. However,
258 once the icon is expanded into a full window, the administrator or
259 user can obtain status information about the Director or the backup
260 status on the local workstation or any other Bacula daemon that is
264 Summary: Bacula File services (Client)
265 Summary(pl.UTF-8): Usługi Bacula File (klient)
266 Group: Networking/Utilities
267 Requires(post): sed >= 4.0
268 Requires: %{name}-common = %{version}-%{release}
271 Bacula - It comes by night and sucks the vital essence from your
274 Bacula File services (or Client program) is the software program that
275 is installed on the machine to be backed up. It is specific to the
276 operating system on which it runs and is responsible for providing the
277 file attributes and data when requested by the Director. The File
278 services are also responsible for the file system dependent part of
279 restoring the file attributes and data during a recovery operation.
280 This program runs as a daemon on the machine to be backed up, and in
281 some of the documentation, the File daemon is referred to as the
282 Client (for example in Bacula configuration file).
284 %description fd -l pl.UTF-8
285 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
287 Usługi Bacula File (inaczej program kliencki) to oprogramowanie, które
288 instaluje się na maszynach, z których mają być wykonywane kopie
289 zapasowe. Są one specyficzne dla systemu operacyjnego, pod którym
290 działa dana maszyna i odpowiadają za dostarczanie atrybutów i danych
291 plików na żądanie Directora. Usługi plikowe są także odpowiedzialne za
292 zależną od systemu plików część odzyskiwania atrybutów i danych plików
293 podczas operacji odzyskiwania danych. Program działa jako demon na
294 maszynie, która ma być backupowana i w części dokumentacji demon ten
295 (File) jest nazywany klientem (na przykład w pliku konfiguracyjnym
299 Summary: Bacula Storage services
300 Summary(pl.UTF-8): Usługi Bacula Storage
301 Group: Networking/Utilities
302 Requires(post): sed >= 4.0
303 Requires: %{name}-common = %{version}-%{release}
304 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
307 Bacula - It comes by night and sucks the vital essence from your
310 Bacula Storage services consist of the software programs that perform
311 the storage and recovery of the file attributes and data to the
312 physical backup media or volumes. In other words, the Storage daemon
313 is responsible for reading and writing your tapes (or other storage
314 media, e.g. files). The Storage services runs as a daemon on the
315 machine that has the backup device (usually a tape drive).
317 %description sd -l pl.UTF-8
318 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
320 Usługi Bacula Storage składają się z programów obsługujących
321 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
322 fizycznych nośnikach lub wolumenach. Innymi słowy, demon Storage jest
323 odpowiedzialny za odczyt i zapis taśm (lub innych nośników do
324 przechowywania danych, np. plików). Usługi Storage działają jako demon
325 na maszynie, która zawiera urządzenie backupowe (zwykle napęd
328 %package db-postgresql
329 Summary: PostgreSQL database driver for Bacula
330 Summary(pl.UTF-8): Sterownik bazy PostgreSQL dla Baculi
331 Group: Networking/Utilities
332 Requires(post): /sbin/ldconfig
333 Requires: %{name}-common = %{version}-%{release}
334 Provides: bacula(db) = %{version}-%{release}
335 Obsoletes: bacula(db)
337 %description db-postgresql
338 PostgreSQL database driver for Bacula.
340 %description db-postgresql -l pl.UTF-8
341 Sterownik bazy PostgreSQL dla Baculi.
344 Summary: MySQL database driver for Bacula
345 Summary(pl.UTF-8): Sterownik bazy MySQL dla Baculi
346 Group: Networking/Utilities
347 Requires(post): /sbin/ldconfig
348 Requires: %{name}-common = %{version}-%{release}
349 Provides: bacula(db) = %{version}-%{release}
350 Obsoletes: bacula(db)
352 %description db-mysql
353 MySQL database driver for Bacula.
355 %description db-mysql -l pl.UTF-8
356 Sterownik bazy MySQL dla Baculi.
359 Summary: SQLite database driver for Bacula
360 Summary(pl.UTF-8): Sterownik bazy SQLite dla Baculi
361 Group: Networking/Utilities
362 Requires(post): /sbin/ldconfig
363 Requires: %{name}-common = %{version}-%{release}
364 Provides: bacula(db) = %{version}-%{release}
365 Obsoletes: bacula(db)
367 %description db-sqlite3
368 SQLite database driver for Bacula.
370 %description db-sqlite3 -l pl.UTF-8
371 Sterownik bazy SQLite dla Baculi.
373 %package -n nagios-plugin-check_bacula
374 Summary: Nagios plugin to check bacula
376 Requires: nagios-common
378 %description -n nagios-plugin-check_bacula
379 Nagios plugin to check bacula.
381 # provided by various db libraries as a symlink
382 %define _noautoreq libbaccats-%{version}.so
393 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
394 src/cats/create_* src/cats/delete_* src/cats/drop_* \
395 src/cats/grant_* src/cats/make_* src/cats/update_*
396 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
397 sed -i -e 's/@basename@/--hostname--/' src/*/*.conf.in
401 %{__aclocal} -I bacula-macros -I gettext-macros
406 %{__autoconf} --prepend-include=$(pwd)/autoconf autoconf/configure.in > configure
408 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
410 WXCONFIG=%{_bindir}/wx-gtk2-unicode-config \
411 QMAKE=%{_bindir}/qt4-qmake \
413 --with-scriptdir=%{_libexecdir}/%{name} \
414 %{?with_bat:--enable-bat} \
416 --enable-smartalloc \
418 --with-tcp-wrappers \
419 --with-working-dir=%{_var}/lib/%{name} \
420 --with-dump-email="root@localhost" \
421 --with-job-email="root@localhost" \
422 --with-smtp-host=localhost \
423 --with-logdir=/var/log/bacula \
424 --with-pid-dir=/var/run \
425 --with-subsys-dir=/var/lock/subsys \
426 --with-systemd=/lib/systemd/system \
427 --enable-batch-insert \
428 %{?with_pgsql:--with-postgresql} \
429 %{?with_mysql:--with-mysql} \
430 %{?with_sqlite3:--with-sqlite3} \
431 %{?with_sqlite3_sync_off:--enable-extra-sqlite3-init="pragma synchronous=0;"} \
432 --with-dir-password="#FAKE-dir-password#" \
433 --with-fd-password="#FAKE-fd-password#" \
434 --with-sd-password="#FAKE-sd-password#" \
435 --with-mon-dir-password="#FAKE-mon-dir-password#" \
436 --with-mon-fd-password="#FAKE-mon-fd-password#" \
437 --with-mon-sd-password="#FAKE-mon-sd-password#" \
446 %{__make} 2>&1 | tee log
447 # check for build errors
448 grep "Error in" log && exit 1
452 %{__make} -C examples/nagios/check_bacula
456 rm -rf $RPM_BUILD_ROOT
457 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
458 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir},/var/log/bacula}
461 DESTDIR=$RPM_BUILD_ROOT
463 # create copies of make_catalog_backup for specific databases; zeore default one (will be ghost)
464 for database in %{databases}; do
465 sed -e "s#default_db_type=.*#default_db_type=${database}#g" \
466 $RPM_BUILD_ROOT%{_libdir}/%{name}/make_catalog_backup \
467 > $RPM_BUILD_ROOT%{_libdir}/%{name}/make_${database}_catalog_backup
468 chmod 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/make_${database}_catalog_backup
470 :> $RPM_BUILD_ROOT%{_libdir}/%{name}/make_catalog_backup
472 # we use db dependant (at compile time) shell script only
473 rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/make_catalog_backup.pl
475 ## replace with empty file, replaced by ldconfig from each db-* package on intsall
476 rm $RPM_BUILD_ROOT%{_libdir}/libbaccats-%{version}.so
477 touch $RPM_BUILD_ROOT%{_libdir}/libbaccats-%{version}.so
479 install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
480 install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
481 install -p %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
482 cp -a %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
483 cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
484 cp -a %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
485 cp -a %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
488 # qmake somewhy does not always create install_bins target. install our own the bin
489 rm -f $RPM_BUILD_ROOT%{_sbindir}/bat
490 libtool --silent --mode=install install src/qt-console/bat $RPM_BUILD_ROOT%{_bindir}
491 cp -a scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
492 cp -a scripts/bat.desktop $RPM_BUILD_ROOT%{_desktopdir}
495 touch $RPM_BUILD_ROOT/var/log/bacula/log
497 # install the updatedb scripts for older versions that last full release
498 # 2.0 -> 3.0 : 10_to_11
499 # 5.0 -> 5.2 : 12_to_14
500 install -p updatedb/update_*_tables_10_to_11 $RPM_BUILD_ROOT%{_libexecdir}/%{name}
501 install -p updatedb/update_*_tables_11_to_12 $RPM_BUILD_ROOT%{_libexecdir}/%{name}
502 install -p updatedb/update_*_tables_12_to_13 $RPM_BUILD_ROOT%{_libexecdir}/%{name}
503 install -p updatedb/update_*_tables_13_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
522 # startup scripts, those in /etc/rc.d/init.d are better
523 rm $RPM_BUILD_ROOT%{_sbindir}/bacula
524 rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/bacula-ctl-*
527 rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/btraceback.mdb
529 # rename to avoid possible conflicts
530 mv $RPM_BUILD_ROOT%{_sbindir}/{,bacula-}dbcheck
531 mv $RPM_BUILD_ROOT%{_mandir}/man8/{,bacula-}dbcheck.8.gz
533 # no -devel files packaged, so this is also useless
534 rm $RPM_BUILD_ROOT%{_libdir}/libbac{,cfg,find,sql}.{so,la}
537 install -d $RPM_BUILD_ROOT%{nagiosplugindir}
538 %{__make} -C examples/nagios/check_bacula install \
539 sbindir=%{nagiosplugindir} \
540 DESTDIR=$RPM_BUILD_ROOT
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
550 %define update_configs \
551 echo "Updating bacula passwords and names..." | %banner -a %{name} \
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" || : \
572 if [ "$1" = "0" ]; then
577 %triggerpostun dir -- %{name}-dir < %{version}-0
578 %banner bacula-dir -t3 <<EOF
579 You have upgraded from an older version of Bacula director.
581 You will probably need to call %{_libexecdir}/%{name}/update_bacula_tables
582 script to upgrade the database.
584 Ensure you database partition has enough free space before you run the upgrade,
585 i.e check that there is enough room to rebuild 'File' table (it is the largest
592 /sbin/chkconfig --add bacula-dir
593 %service bacula-dir restart "Bacula Director daemon"
596 if [ "$1" = "0" ]; then
597 %service bacula-dir stop
598 /sbin/chkconfig --del bacula-dir
603 /sbin/chkconfig --add bacula-fd
604 %service bacula-fd restart "Bacula File daemon"
607 if [ "$1" = "0" ]; then
608 %service bacula-fd stop
609 /sbin/chkconfig --del bacula-fd
614 /sbin/chkconfig --add bacula-sd
615 %service bacula-sd restart "Bacula Storage daemon"
618 if [ "$1" = "0" ]; then
619 %service bacula-sd stop
620 /sbin/chkconfig --del bacula-sd
624 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
625 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
634 %triggerpostun common -- %{name}-common < 5.0.1-2
635 find %{_sysconfdir}/bat.conf* -perm /007 -print0 2>/dev/null | xargs -0 -r chmod 600 || :
645 for name in "create database" "drop tables" "drop database" "grant privileges" "make tables" "update tables"; do \
646 prefix="${name%% *}" \
647 suffix="${name#* }" \
648 ln -sf "${prefix}_%{1}_${suffix}" %{_libexecdir}/%{name}/"${prefix}_bacula_${suffix}" || : \
650 ln -sf "make_%{1}_catalog_backup" %{_libexecdir}/%{name}/make_catalog_backup || : \
651 ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
652 %service bacula-dir restart "Bacula Director daemon"
657 %postun db-postgresql -p /sbin/ldconfig
662 %postun db-mysql -p /sbin/ldconfig
667 %postun db-sqlite3 -p /sbin/ldconfig
670 %defattr(644,root,root,755)
673 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
674 # do not remove bsmtp from files. Fix build if it is not installed.
675 %attr(755,root,root) %{_sbindir}/bsmtp
676 %attr(755,root,root) %{_sbindir}/btraceback
677 %attr(755,root,root) %{_libdir}/libbac-7*.so
678 %attr(755,root,root) %{_libdir}/libbaccfg-7*.so
679 %attr(755,root,root) %{_libdir}/libbacfind-7*.so
680 %attr(755,root,root) %{_libdir}/libbacsql-7*.so
681 %{_mandir}/man8/bacula.8*
682 %{_mandir}/man1/bsmtp.1*
683 %{_mandir}/man8/btraceback.8*
684 %dir %{_libexecdir}/%{name}
685 %{_libexecdir}/%{name}/btraceback.dbx
686 %{_libexecdir}/%{name}/btraceback.gdb
687 %{_libexecdir}/%{name}/bacula_config
688 %attr(770,root,bacula) %dir %{_localstatedir}
689 %attr(750,bacula,logs) %dir /var/log/bacula
690 %attr(640,bacula,logs) %ghost /var/log/bacula/log
693 %defattr(644,root,root,755)
694 %doc ChangeLog ReleaseNotes LICENSE
695 #%doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
696 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
697 %ghost %{_sysconfdir}/.pw.sed
698 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
699 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
700 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
701 %attr(755,root,root) %{_sbindir}/bacula-dir
702 %attr(755,root,root) %{_sbindir}/bregex
703 %attr(755,root,root) %{_sbindir}/bwild
704 %attr(755,root,root) %{_sbindir}/bacula-dbcheck
705 %{_mandir}/man8/bacula-dir.8*
706 %{_mandir}/man8/bacula-dbcheck.8*
707 %{_mandir}/man8/bregex.8*
708 %{_mandir}/man8/bwild.8*
709 %{_libexecdir}/%{name}/query.sql
710 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
713 %defattr(644,root,root,755)
714 %attr(755,root,root) %{_libexecdir}/%{name}/create_postgresql_database
715 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_database
716 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_tables
717 %attr(755,root,root) %{_libexecdir}/%{name}/grant_postgresql_privileges
718 %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_tables
719 %attr(755,root,root) %{_libexecdir}/%{name}/update_postgresql_*
720 %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_catalog_backup
721 %attr(755,root,root) %{_libdir}/libbaccats-postgresql-7*.so
723 %ghost %attr(755,root,root) %{_libdir}/libbaccats-7*.so
724 %ghost %{_libexecdir}/%{name}/create_bacula_database
725 %ghost %{_libexecdir}/%{name}/drop_bacula_tables
726 %ghost %{_libexecdir}/%{name}/drop_bacula_database
727 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
728 %ghost %{_libexecdir}/%{name}/make_bacula_tables
729 %ghost %{_libexecdir}/%{name}/update_bacula_tables
730 %ghost %{_libexecdir}/%{name}/make_catalog_backup
733 %defattr(644,root,root,755)
734 %attr(755,root,root) %{_libexecdir}/%{name}/create_mysql_database
735 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_database
736 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_tables
737 %attr(755,root,root) %{_libexecdir}/%{name}/grant_mysql_privileges
738 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_tables
739 %attr(755,root,root) %{_libexecdir}/%{name}/update_mysql_*
740 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_catalog_backup
741 %attr(755,root,root) %{_libdir}/libbaccats-mysql-7*.so
743 %ghost %attr(755,root,root) %{_libdir}/libbaccats-7*.so
744 %ghost %{_libexecdir}/%{name}/create_bacula_database
745 %ghost %{_libexecdir}/%{name}/drop_bacula_tables
746 %ghost %{_libexecdir}/%{name}/drop_bacula_database
747 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
748 %ghost %{_libexecdir}/%{name}/make_bacula_tables
749 %ghost %{_libexecdir}/%{name}/update_bacula_tables
750 %ghost %{_libexecdir}/%{name}/make_catalog_backup
753 %defattr(644,root,root,755)
754 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database
755 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_database
756 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_tables
757 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
758 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
759 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
760 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_catalog_backup
761 %attr(755,root,root) %{_libdir}/libbaccats-sqlite3-7*.so
763 %ghost %attr(755,root,root) %{_libdir}/libbaccats-7*.so
764 %ghost %{_libexecdir}/%{name}/create_bacula_database
765 %ghost %{_libexecdir}/%{name}/drop_bacula_tables
766 %ghost %{_libexecdir}/%{name}/drop_bacula_database
767 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
768 %ghost %{_libexecdir}/%{name}/make_bacula_tables
769 %ghost %{_libexecdir}/%{name}/update_bacula_tables
770 %ghost %{_libexecdir}/%{name}/make_catalog_backup
773 %defattr(644,root,root,755)
775 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
776 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
777 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
778 %attr(755,root,root) %{_sbindir}/bacula-fd
779 %attr(755,root,root) %{_libdir}/bpipe-fd.so
780 %{_mandir}/man8/bacula-fd.8*
783 %defattr(644,root,root,755)
785 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
786 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mtx-changer.conf
787 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
788 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
789 %attr(755,root,root) %{_sbindir}/bacula-sd
790 %attr(755,root,root) %{_sbindir}/bcopy
791 %attr(755,root,root) %{_sbindir}/bextract
792 %attr(755,root,root) %{_sbindir}/bls
793 %attr(755,root,root) %{_sbindir}/bscan
794 %attr(755,root,root) %{_sbindir}/btape
795 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
796 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
797 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
798 %{_mandir}/man8/bacula-sd.8*
799 %{_mandir}/man8/bcopy.8*
800 %{_mandir}/man8/bextract.8*
801 %{_mandir}/man8/bls.8*
802 %{_mandir}/man8/bscan.8*
803 %{_mandir}/man8/btape.8*
806 %defattr(644,root,root,755)
808 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
809 %attr(755,root,root) %{_sbindir}/bconsole
810 %{_mandir}/man8/bconsole.8*
814 %defattr(644,root,root,755)
816 %{_pixmapsdir}/%{name}.png
817 %{_desktopdir}/bat.desktop
818 # Do not make this file world-readable or any user will get full access to the
820 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bat.conf
821 %attr(755,root,root) %{_bindir}/bat
822 %{_mandir}/man1/bat.1*
827 %files -n nagios-plugin-check_bacula
828 %defattr(644,root,root,755)
829 %attr(755,root,root) %{nagiosplugindir}/check_bacula