]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - update desktop files, think about su-wrappers for console (with .desktop files) | |
3 | # - package web admin | |
4 | # - fix log file permissions | |
5 | # - check on upgrade (5.0 and 5.2 databases are NOT compatible) | |
6 | # | |
7 | # Conditional build: | |
8 | %bcond_without console_wx # wx-console program | |
9 | %bcond_without bat # bat Qt4 GUI | |
10 | %bcond_without mysql # use MySQL | |
11 | %bcond_without pgsql # use PostgreSQL | |
12 | %bcond_without sqlite3 # use SQLite3 | |
13 | %bcond_without python # Python Scripting support, http://www.bacula.org/3.0.x-manuals/en/concepts/concepts/Python_Scripting.html | |
14 | %bcond_without nagios # build nagios plugin | |
15 | %bcond_with rescue | |
16 | %bcond_with sqlite3_sync_off # makes SQLite3 backend much faster, but less reliable | |
17 | ||
18 | %if %{without sqlite3} | |
19 | %undefine with_sqlite3_sync_off | |
20 | %endif | |
21 | ||
22 | Summary: Bacula - The Network Backup Solution | |
23 | Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci | |
24 | Name: bacula | |
25 | Version: 5.2.2 | |
26 | Release: 1 | |
27 | License: AGPL v3 | |
28 | Group: Networking/Utilities | |
29 | Source0: http://downloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz | |
30 | # Source0-md5: 227b88f56ae085da8f48823b220d4c87 | |
31 | Source1: http://downloads.sourceforge.net/bacula/%{name}-docs-%{version}.tar.bz2 | |
32 | # Source1-md5: 478273c0229f24d6690fdbedbeb50fa4 | |
33 | Source2: http://downloads.sourceforge.net/bacula/%{name}-rescue-5.0.1.tar.gz | |
34 | # Source2-md5: bb194aed8e204f54bf2f61d7e721f257 | |
35 | Source10: %{name}-dir.init | |
36 | Source11: %{name}-fd.init | |
37 | Source12: %{name}-sd.init | |
38 | Source13: %{name}.logrotate | |
39 | Source14: %{name}-dir.sysconfig | |
40 | Source15: %{name}-fd.sysconfig | |
41 | Source16: %{name}-sd.sysconfig | |
42 | Patch0: %{name}-mtx-changer.patch | |
43 | Patch1: %{name}-branding.patch | |
44 | Patch2: %{name}-conf.patch | |
45 | Patch3: %{name}-desktop.patch | |
46 | Patch4: make_catalog_backup-setup-home.patch | |
47 | Patch5: %{name}-mysql_thread.patch | |
48 | URL: http://www.bacula.org/ | |
49 | BuildRequires: acl-devel | |
50 | BuildRequires: autoconf | |
51 | BuildRequires: automake | |
52 | BuildRequires: gettext-devel | |
53 | %{?with_console_wx:BuildRequires: gtk+2-devel} | |
54 | BuildRequires: libcap-devel | |
55 | BuildRequires: libtool >= 2:2.2 | |
56 | %if %{with rescue} | |
57 | BuildRequires: fakeroot | |
58 | %endif | |
59 | BuildRequires: libwrap-devel | |
60 | BuildRequires: ncurses-devel | |
61 | BuildRequires: openssl-devel | |
62 | BuildRequires: pkgconfig | |
63 | %if %{with python} | |
64 | BuildRequires: python-devel | |
65 | BuildRequires: python-modules | |
66 | %endif | |
67 | %if %{with bat} | |
68 | BuildRequires: QtCore-devel | |
69 | BuildRequires: QtGui-devel | |
70 | BuildRequires: qt4-build >= 4.6.2 | |
71 | BuildRequires: qt4-qmake >= 4.6.2 | |
72 | %endif | |
73 | %{?with_mysql:BuildRequires: mysql-devel} | |
74 | %{?with_pgsql:BuildRequires: postgresql-devel} | |
75 | BuildRequires: readline-devel | |
76 | BuildRequires: rpm-pythonprov | |
77 | BuildRequires: rpmbuild(macros) >= 1.268 | |
78 | BuildRequires: sed >= 4.0 | |
79 | %{?with_sqlite3:BuildRequires: sqlite3-devel} | |
80 | BuildRequires: which | |
81 | %if %{with console_wx} | |
82 | BuildRequires: wxGTK2-unicode-devel >= 2.4.0 | |
83 | %endif | |
84 | BuildRequires: zlib-devel | |
85 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
86 | ||
87 | %define _sysconfdir /etc/%{name} | |
88 | %define _localstatedir /var/lib/%{name} | |
89 | %define nagiosplugindir %{_libdir}/nagios/plugins | |
90 | ||
91 | # from 'the worst' to 'the best' | |
92 | %define databases %{?with_sqlite3:sqlite3} %{?with_mysql:mysql} %{?with_pgsql:postgresql} | |
93 | ||
94 | # dependency section is broken. ccache usage is instead to makefiles | |
95 | %undefine with_ccache | |
96 | ||
97 | %description | |
98 | Bacula - It comes by night and sucks the vital essence from your | |
99 | computers. | |
100 | ||
101 | Bacula is a set of computer programs that permit you (or the system | |
102 | administrator) to manage backup, recovery, and verification of | |
103 | computer data across a network of computers of different kinds. In | |
104 | technical terms, it is a network client/server based backup program. | |
105 | Bacula is relatively easy to use and efficient, while offering many | |
106 | advanced storage management features that make it easy to find and | |
107 | recover lost or damaged files. | |
108 | ||
109 | %description -l pl.UTF-8 | |
110 | Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów. | |
111 | ||
112 | Bacula to zbiór programów umożliwiających administratorowi na | |
113 | zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w | |
114 | sieci komputerów różnego rodzaju. W terminologii technicznej jest to | |
115 | program do kopii zapasowych pracujący w architekturze klient-serwer. | |
116 | Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym | |
117 | wiele zaawansowanych możliwości przy zarządzaniu nośnikami, | |
118 | ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych | |
119 | plików. | |
120 | ||
121 | %package common | |
122 | Summary: Common files for bacula package | |
123 | Summary(pl.UTF-8): Pliki wspólne dla pakietu bacula | |
124 | Group: Networking/Utilities | |
125 | Requires(post): openssl-tools | |
126 | Requires(post): sed >= 4.0 | |
127 | Requires(post,preun): /sbin/chkconfig | |
128 | Requires(postun): /usr/sbin/groupdel | |
129 | Requires(postun): /usr/sbin/userdel | |
130 | Requires(pre): /usr/sbin/groupadd | |
131 | Requires(pre): /usr/sbin/useradd | |
132 | Conflicts: bacula-console < 0:1.34.6 | |
133 | Conflicts: bacula-dir < 0:1.34.6 | |
134 | Conflicts: bacula-fd < 0:1.34.6 | |
135 | Conflicts: bacula-sd < 0:1.34.6 | |
136 | ||
137 | %description common | |
138 | Bacula - It comes by night and sucks the vital essence from your | |
139 | computers. | |
140 | ||
141 | Bacula is a set of computer programs that permit you (or the system | |
142 | administrator) to manage backup, recovery, and verification of | |
143 | computer data across a network of computers of different kinds. In | |
144 | technical terms, it is a network client/server based backup program. | |
145 | Bacula is relatively easy to use and efficient, while offering many | |
146 | advanced storage management features that make it easy to find and | |
147 | recover lost or damaged files. | |
148 | ||
149 | %description common -l pl.UTF-8 | |
150 | Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów. | |
151 | ||
152 | Bacula to zbiór programów umożliwiających administratorowi na | |
153 | zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w | |
154 | sieci komputerów różnego rodzaju. W terminologii technicznej jest to | |
155 | program do kopii zapasowych pracujący w architekturze klient-serwer. | |
156 | Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym | |
157 | wiele zaawansowanych możliwości przy zarządzaniu nośnikami, | |
158 | ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych | |
159 | plików. | |
160 | ||
161 | %package dir | |
162 | Summary: Bacula Director and Catalog services | |
163 | Summary(pl.UTF-8): Usługi Bacula Director i Catalog | |
164 | Group: Networking/Utilities | |
165 | Requires(post): sed >= 4.0 | |
166 | Requires: %{name}-common = %{version}-%{release} | |
167 | Requires: bacula(db) = %{version}-%{release} | |
168 | Obsoletes: bacula-updatedb | |
169 | ||
170 | %description dir | |
171 | Bacula - It comes by night and sucks the vital essence from your | |
172 | computers. | |
173 | ||
174 | Bacula Director is the program that supervises all the backup, | |
175 | restore, verify and archive operations. The system administrator uses | |
176 | the Bacula Director to schedule backups and to recover files. Catalog | |
177 | services are comprised of the software programs responsible for | |
178 | maintaining the file indexes and volume databases for all files backed | |
179 | up. The Catalog services permit the System Administrator or user to | |
180 | quickly locate and restore any desired file, since it maintains a | |
181 | record of all Volumes used, all Jobs run, and all Files saved. | |
182 | ||
183 | %description dir -l pl.UTF-8 | |
184 | Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów. | |
185 | ||
186 | Bacula Director to program nadzorujący wszystkie operacje wykonywania | |
187 | kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania. | |
188 | Administrator używa Bacula Directora do szeregowania kopii zapasowych | |
189 | oraz odzyskiwania plików. Usługi katalogowe (Catalog services) są | |
190 | używane przez programy odpowiedzialne za zarządzanie indeksami plików | |
191 | i bazą danych wolumenów dla wszystkich kopiowanych plików. Usługi | |
192 | katalogowe umożliwiają administratorowi lub użytkownikowi szybko | |
193 | zlokalizować i odtworzyć dowolny plik, ponieważ utrzymują rekord ze | |
194 | wszystkimi używanymi wolumenami, uruchomionymi zadaniami i zapisanymi | |
195 | plikami. | |
196 | ||
197 | %package console | |
198 | Summary: Bacula Console | |
199 | Summary(pl.UTF-8): Konsola Baculi | |
200 | Group: Networking/Utilities | |
201 | Requires(post): sed >= 4.0 | |
202 | Requires: %{name}-common = %{version}-%{release} | |
203 | ||
204 | %description console | |
205 | Bacula - It comes by night and sucks the vital essence from your | |
206 | computers. | |
207 | ||
208 | Bacula Console is the program that allows the administrator or user to | |
209 | communicate with the Bacula Director. This is the text only console | |
210 | interface. | |
211 | ||
212 | %description console -l pl.UTF-8 | |
213 | Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów. | |
214 | ||
215 | Bacula Console to program umożliwiający administratorowi lub | |
216 | użytkownikowi komunikowanie się z programem Bacula Director. To jest | |
217 | interfejs czysto tekstowy. | |
218 | ||
219 | %package console-wx | |
220 | Summary: Bacula wxWidgets Console | |
221 | Summary(pl.UTF-8): Konsola Baculi oparta na wxWidgets | |
222 | Group: Networking/Utilities | |
223 | Requires(post): sed >= 4.0 | |
224 | Requires: %{name}-common = %{version}-%{release} | |
225 | ||
226 | %description console-wx | |
227 | Bacula - It comes by night and sucks the vital essence from your | |
228 | computers. | |
229 | ||
230 | Bacula Console is the program that allows the administrator or user to | |
231 | communicate with the Bacula Director. This is the wxWidgets GUI | |
232 | interface. | |
233 | ||
234 | %description console-wx -l pl.UTF-8 | |
235 | Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów. | |
236 | ||
237 | Bacula Console to program umożliwiający administratorowi lub | |
238 | użytkownikowi komunikowanie się z programem Bacula Director. To jest | |
239 | interfejs graficzny oparty na wxWidgets. | |
240 | ||
241 | %package console-qt4 | |
242 | Summary: Bacula Qt4 Console | |
243 | Summary(pl.UTF-8): Konsola Baculi oparta na Qt4 | |
244 | Group: Networking/Utilities | |
245 | Requires(post): sed >= 4.0 | |
246 | Requires: QtCore >= 4.6.2 | |
247 | Requires: %{name}-common = %{version}-%{release} | |
248 | ||
249 | %description console-qt4 | |
250 | Bacula - It comes by night and sucks the vital essence from your | |
251 | computers. | |
252 | ||
253 | Bacula Console is the program that allows the administrator or user to | |
254 | communicate with the Bacula Director. This is the Qt4 GUI interface. | |
255 | ||
256 | %description console-qt4 -l pl.UTF-8 | |
257 | Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów. | |
258 | ||
259 | Bacula Console to program umożliwiający administratorowi lub | |
260 | użytkownikowi komunikowanie się z programem Bacula Director. To jest | |
261 | interfejs graficzny oparty na Qt4. | |
262 | ||
263 | %package tray-monitor | |
264 | Summary: Bacula Tray Monitor | |
265 | Group: Networking/Utilities | |
266 | Requires(post): sed >= 4.0 | |
267 | Requires: %{name}-common = %{version}-%{release} | |
268 | ||
269 | %description tray-monitor | |
270 | Bacula - It comes by night and sucks the vital essence from your | |
271 | computers. | |
272 | ||
273 | The Monitor program is typically an icon in the system tray. However, | |
274 | once the icon is expanded into a full window, the administrator or | |
275 | user can obtain status information about the Director or the backup | |
276 | status on the local workstation or any other Bacula daemon that is | |
277 | configured. | |
278 | ||
279 | %package fd | |
280 | Summary: Bacula File services (Client) | |
281 | Summary(pl.UTF-8): Usługi Bacula File (klient) | |
282 | Group: Networking/Utilities | |
283 | Requires(post): sed >= 4.0 | |
284 | Requires: %{name}-common = %{version}-%{release} | |
285 | ||
286 | %description fd | |
287 | Bacula - It comes by night and sucks the vital essence from your | |
288 | computers. | |
289 | ||
290 | Bacula File services (or Client program) is the software program that | |
291 | is installed on the machine to be backed up. It is specific to the | |
292 | operating system on which it runs and is responsible for providing the | |
293 | file attributes and data when requested by the Director. The File | |
294 | services are also responsible for the file system dependent part of | |
295 | restoring the file attributes and data during a recovery operation. | |
296 | This program runs as a daemon on the machine to be backed up, and in | |
297 | some of the documentation, the File daemon is referred to as the | |
298 | Client (for example in Bacula configuration file). | |
299 | ||
300 | %description fd -l pl.UTF-8 | |
301 | Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów. | |
302 | ||
303 | Usługi Bacula File (inaczej program kliencki) to oprogramowanie, które | |
304 | instaluje się na maszynach, z których mają być wykonywane kopie | |
305 | zapasowe. Są one specyficzne dla systemu operacyjnego, pod którym | |
306 | działa dana maszyna i odpowiadają za dostarczanie atrybutów i danych | |
307 | plików na żądanie Directora. Usługi plikowe są także odpowiedzialne za | |
308 | zależną od systemu plików część odzyskiwania atrybutów i danych plików | |
309 | podczas operacji odzyskiwania danych. Program działa jako demon na | |
310 | maszynie, która ma być backupowana i w części dokumentacji demon ten | |
311 | (File) jest nazywany klientem (na przykład w pliku konfiguracyjnym | |
312 | Baculi). | |
313 | ||
314 | %package sd | |
315 | Summary: Bacula Storage services | |
316 | Summary(pl.UTF-8): Usługi Bacula Storage | |
317 | Group: Networking/Utilities | |
318 | Requires(post): sed >= 4.0 | |
319 | Requires: %{name}-common = %{version}-%{release} | |
320 | Conflicts: dvd+rw-tools <= 5.21.4.10.8-1 | |
321 | ||
322 | %description sd | |
323 | Bacula - It comes by night and sucks the vital essence from your | |
324 | computers. | |
325 | ||
326 | Bacula Storage services consist of the software programs that perform | |
327 | the storage and recovery of the file attributes and data to the | |
328 | physical backup media or volumes. In other words, the Storage daemon | |
329 | is responsible for reading and writing your tapes (or other storage | |
330 | media, e.g. files). The Storage services runs as a daemon on the | |
331 | machine that has the backup device (usually a tape drive). | |
332 | ||
333 | %description sd -l pl.UTF-8 | |
334 | Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów. | |
335 | ||
336 | Usługi Bacula Storage składają się z programów obsługujących | |
337 | przechowywanie danych oraz odzyskiwanie atrybutów i danych na | |
338 | fizycznych nośnikach lub wolumenach. Innymi słowy, demon Storage jest | |
339 | odpowiedzialny za odczyt i zapis taśm (lub innych nośników do | |
340 | przechowywania danych, np. plików). Usługi Storage działają jako demon | |
341 | na maszynie, która zawiera urządzenie backupowe (zwykle napęd | |
342 | taśmowy). | |
343 | ||
344 | %package db-postgresql | |
345 | Summary: PostgreSQL database driver for Bacula | |
346 | Summary(pl.UTF-8): Sterownik bazy PostgreSQL dla Baculi | |
347 | Group: Networking/Utilities | |
348 | Requires(post): /sbin/ldconfig | |
349 | Requires: %{name}-common = %{version}-%{release} | |
350 | Provides: bacula(db) = %{version}-%{release} | |
351 | Obsoletes: bacula(db) | |
352 | ||
353 | %description db-postgresql | |
354 | PostgreSQL database driver for Bacula. | |
355 | ||
356 | %description db-postgresql -l pl.UTF-8 | |
357 | Sterownik bazy PostgreSQL dla Baculi. | |
358 | ||
359 | %package db-mysql | |
360 | Summary: MySQL database driver for Bacula | |
361 | Summary(pl.UTF-8): Sterownik bazy MySQL dla Baculi | |
362 | Group: Networking/Utilities | |
363 | Requires(post): /sbin/ldconfig | |
364 | Requires: %{name}-common = %{version}-%{release} | |
365 | Provides: bacula(db) = %{version}-%{release} | |
366 | Obsoletes: bacula(db) | |
367 | ||
368 | %description db-mysql | |
369 | MySQL database driver for Bacula. | |
370 | ||
371 | %description db-mysql -l pl.UTF-8 | |
372 | Sterownik bazy MySQL dla Baculi. | |
373 | ||
374 | %package db-sqlite3 | |
375 | Summary: SQLite database driver for Bacula | |
376 | Summary(pl.UTF-8): Sterownik bazy SQLite dla Baculi | |
377 | Group: Networking/Utilities | |
378 | Requires(post): /sbin/ldconfig | |
379 | Requires: %{name}-common = %{version}-%{release} | |
380 | Provides: bacula(db) = %{version}-%{release} | |
381 | Obsoletes: bacula(db) | |
382 | ||
383 | %description db-sqlite3 | |
384 | SQLite database driver for Bacula. | |
385 | ||
386 | %description db-sqlite3 -l pl.UTF-8 | |
387 | Sterownik bazy SQLite dla Baculi. | |
388 | ||
389 | %package rescue | |
390 | Summary: Bacula - The Network Backup Solution | |
391 | Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci | |
392 | Group: Networking/Utilities | |
393 | Requires: %{name}-fd = %{version}-%{release} | |
394 | Requires: coreutils | |
395 | Requires: util-linux | |
396 | ||
397 | %description rescue | |
398 | Bacula - It comes by night and sucks the vital essence from your | |
399 | computers. | |
400 | ||
401 | Bacula is a set of computer programs that permit you (or the system | |
402 | administrator) to manage backup, recovery, and verification of | |
403 | computer data across a network of computers of different kinds. In | |
404 | technical terms, it is a network client/server based backup program. | |
405 | Bacula is relatively easy to use and efficient, while offering many | |
406 | advanced storage management features that make it easy to find and | |
407 | recover lost or damaged files. | |
408 | ||
409 | This package installs scripts for disaster recovery and builds rescue | |
410 | floppy disk for bare metal recovery. | |
411 | ||
412 | %description rescue -l pl.UTF-8 | |
413 | Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów. | |
414 | ||
415 | Bacula to zbiór programów umożliwiających administratorowi na | |
416 | zarządzanie kopiami zapasowymi, odzyskiwaniem i weryfikacją danych w | |
417 | sieci komputerów różnego rodzaju. W terminologii technicznej jest to | |
418 | program do kopii zapasowych pracujący w architekturze klient-serwer. | |
419 | Bacula jest stosunkowo łatwa w użyciu i wydajna, oferując przy tym | |
420 | wiele zaawansowanych możliwości przy zarządzaniu nośnikami, | |
421 | ułatwiających znalezienie i odzyskanie utraconych lub uszkodzonych | |
422 | plików. | |
423 | ||
424 | Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkę | |
425 | ratunkowe do odtwarzania systemu od zera. | |
426 | ||
427 | %package -n nagios-plugin-check_bacula | |
428 | Summary: Nagios plugin to check bacula | |
429 | Group: Networking | |
430 | Requires: nagios-common | |
431 | ||
432 | %description -n nagios-plugin-check_bacula | |
433 | Nagios plugin to check bacula. | |
434 | ||
435 | # provided by various db libraries as a symlink | |
436 | %define _noautoreq libbaccats-%{version}.so | |
437 | ||
438 | %prep | |
439 | %setup -q -a 1 | |
440 | %patch0 -p1 | |
441 | %patch1 -p1 | |
442 | %patch2 -p1 | |
443 | %patch3 -p1 | |
444 | %patch4 -p1 | |
445 | %patch5 -p1 | |
446 | ||
447 | tar -xf %{SOURCE2} && ln -s bacula-rescue-* rescue | |
448 | ||
449 | sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \ | |
450 | src/cats/create_* src/cats/delete_* src/cats/drop_* \ | |
451 | src/cats/grant_* src/cats/make_* src/cats/update_* | |
452 | sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in | |
453 | sed -i -e 's/@basename@/--hostname--/' src/*/*.conf.in | |
454 | ||
455 | %build | |
456 | cd autoconf | |
457 | %{__aclocal} -I bacula-macros -I gettext-macros | |
458 | # $BUILD_DIR not seen by libtoolize, export it | |
459 | BUILD_DIR=.. %{__libtoolize} | |
460 | cd .. | |
461 | %{__autoconf} --prepend-include=$(pwd)/autoconf autoconf/configure.in > configure | |
462 | ||
463 | CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline" | |
464 | ||
465 | WXCONFIG=%{_bindir}/wx-gtk2-unicode-config \ | |
466 | QMAKE=%{_bindir}/qt4-qmake \ | |
467 | %configure \ | |
468 | --with-scriptdir=%{_libexecdir}/%{name} \ | |
469 | %{?with_bat:--enable-bat} \ | |
470 | --disable-conio \ | |
471 | --enable-smartalloc \ | |
472 | %{?with_console_wx:--enable-bwx-console} \ | |
473 | --enable-tray-monitor \ | |
474 | %{?with_python:--with-python} \ | |
475 | --with-readline \ | |
476 | --with-tcp-wrappers \ | |
477 | --with-working-dir=%{_var}/lib/%{name} \ | |
478 | --with-dump-email="root@localhost" \ | |
479 | --with-job-email="root@localhost" \ | |
480 | --with-smtp-host=localhost \ | |
481 | --with-pid-dir=/var/run \ | |
482 | --with-subsys-dir=/var/lock/subsys \ | |
483 | --with-systemd=/lib/systemd/system \ | |
484 | --enable-batch-insert \ | |
485 | %{?with_pgsql:--with-postgresql} \ | |
486 | %{?with_mysql:--with-mysql} \ | |
487 | %{?with_sqlite3:--with-sqlite3} \ | |
488 | %{?with_sqlite3_sync_off:--enable-extra-sqlite3-init="pragma synchronous=0;"} \ | |
489 | --with-dir-password="#FAKE-dir-password#" \ | |
490 | --with-fd-password="#FAKE-fd-password#" \ | |
491 | --with-sd-password="#FAKE-sd-password#" \ | |
492 | --with-mon-dir-password="#FAKE-mon-dir-password#" \ | |
493 | --with-mon-fd-password="#FAKE-mon-fd-password#" \ | |
494 | --with-mon-sd-password="#FAKE-mon-sd-password#" \ | |
495 | --with-openssl | |
496 | ||
497 | %if %{with bat} | |
498 | cd src/qt-console | |
499 | qmake-qt4 bat.pro | |
500 | cd ../.. | |
501 | %endif | |
502 | ||
503 | %{__make} 2>&1 | tee log | |
504 | # check for build errors | |
505 | grep "Error in" log && exit 1 | |
506 | ||
507 | %if %{with nagios} | |
508 | # nagios plugin | |
509 | %{__make} -C examples/nagios/check_bacula | |
510 | %endif | |
511 | ||
512 | %if %{with rescue} | |
513 | cd rescue | |
514 | %configure \ | |
515 | --with-bacula=../ | |
516 | cd linux/cdrom | |
517 | fakeroot %{__make} | |
518 | %endif | |
519 | ||
520 | %install | |
521 | rm -rf $RPM_BUILD_ROOT | |
522 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig} | |
523 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue | |
524 | install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir},/var/log/bacula} | |
525 | ||
526 | %{__make} install \ | |
527 | DESTDIR=$RPM_BUILD_ROOT | |
528 | ||
529 | # create copies of make_catalog_backup for specific databases; zeore default one (will be ghost) | |
530 | for database in %{databases}; do | |
531 | sed -e "s#default_db_type=.*#default_db_type=${database}#g" \ | |
532 | $RPM_BUILD_ROOT%{_libdir}/%{name}/make_catalog_backup \ | |
533 | > $RPM_BUILD_ROOT%{_libdir}/%{name}/make_${database}_catalog_backup | |
534 | chmod 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/make_${database}_catalog_backup | |
535 | done | |
536 | :> $RPM_BUILD_ROOT%{_libdir}/%{name}/make_catalog_backup | |
537 | ||
538 | # we use db dependant (at compile time) shell script only | |
539 | rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/make_catalog_backup.pl | |
540 | ||
541 | ## replace with empty file, replaced by ldconfig from each db-* package on intsall | |
542 | rm $RPM_BUILD_ROOT%{_libdir}/libbaccats-%{version}.so | |
543 | touch $RPM_BUILD_ROOT%{_libdir}/libbaccats-%{version}.so | |
544 | ||
545 | install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir | |
546 | install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd | |
547 | install -p %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd | |
548 | cp -a %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir | |
549 | cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir | |
550 | cp -a %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd | |
551 | cp -a %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd | |
552 | ||
553 | %if %{with console_wx} | |
554 | # tray-monitor is for regular users | |
555 | #mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir} | |
556 | ||
557 | cp -a scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png | |
558 | #install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm | |
559 | sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \ | |
560 | scripts/wxconsole.desktop.consolehelper > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop | |
561 | #sed -e 's#%{_sbindir}#%{_bindir}#' \ | |
562 | # scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop | |
563 | %endif | |
564 | ||
565 | %if %{with bat} | |
566 | # qmake somewhy does not always create install_bins target. install our own the bin | |
567 | rm -f $RPM_BUILD_ROOT%{_sbindir}/bat | |
568 | libtool --silent --mode=install install src/qt-console/bat $RPM_BUILD_ROOT%{_bindir} | |
569 | cp -a scripts/bat.desktop $RPM_BUILD_ROOT%{_desktopdir} | |
570 | %endif | |
571 | ||
572 | %if %{with rescue} | |
573 | # install the rescue stuff, these are the rescue scripts | |
574 | cp -a rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue | |
575 | cp -a rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue | |
576 | install -p rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue | |
577 | install -p rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue | |
578 | %endif | |
579 | ||
580 | touch $RPM_BUILD_ROOT/var/log/bacula/log | |
581 | ||
582 | # install the updatedb scripts for older versions that last full release | |
583 | # 2.0 -> 3.0 : 10_to_11 | |
584 | # 5.0 -> 5.2 : 12_to_14 | |
585 | install -p updatedb/update_*_tables_10_to_11 $RPM_BUILD_ROOT%{_libexecdir}/%{name} | |
586 | install -p updatedb/update_*_tables_11_to_12 $RPM_BUILD_ROOT%{_libexecdir}/%{name} | |
587 | install -p updatedb/update_*_tables_12_to_14 $RPM_BUILD_ROOT%{_libexecdir}/%{name} | |
588 | ||
589 | # place for site passwords | |
590 | touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password} | |
591 | touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password} | |
592 | ||
593 | mv $RPM_BUILD_ROOT%{_libexecdir}/%{name}/mtx-changer.conf $RPM_BUILD_ROOT%{_sysconfdir}/mtx-changer.conf | |
594 | ||
595 | # some file changes | |
596 | rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd} | |
597 | %if %{without console_wx} | |
598 | rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop | |
599 | %endif | |
600 | touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed | |
601 | ||
602 | rm $RPM_BUILD_ROOT%{_docdir}/bacula/ChangeLog | |
603 | rm $RPM_BUILD_ROOT%{_docdir}/bacula/INSTALL | |
604 | rm $RPM_BUILD_ROOT%{_docdir}/bacula/LICENSE | |
605 | rm $RPM_BUILD_ROOT%{_docdir}/bacula/README | |
606 | rm $RPM_BUILD_ROOT%{_docdir}/bacula/ReleaseNotes | |
607 | rm $RPM_BUILD_ROOT%{_docdir}/bacula/VERIFYING | |
608 | rm $RPM_BUILD_ROOT%{_docdir}/bacula/technotes | |
609 | ||
610 | # startup scripts, those in /etc/rc.d/init.d are better | |
611 | rm $RPM_BUILD_ROOT%{_sbindir}/bacula | |
612 | rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/bacula-ctl-* | |
613 | ||
614 | # unsupported | |
615 | rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/btraceback.mdb | |
616 | ||
617 | # rename to avoid possible conflicts | |
618 | mv $RPM_BUILD_ROOT%{_sbindir}/{,bacula-}dbcheck | |
619 | mv $RPM_BUILD_ROOT%{_mandir}/man8/{,bacula-}dbcheck.8.gz | |
620 | ||
621 | # no -devel files packaged, so this is also useless | |
622 | rm $RPM_BUILD_ROOT%{_libdir}/libbac{,cfg,find,py,sql}.{so,la} | |
623 | ||
624 | %if %{with nagios} | |
625 | install -d $RPM_BUILD_ROOT%{nagiosplugindir} | |
626 | %{__make} -C examples/nagios/check_bacula install \ | |
627 | sbindir=%{nagiosplugindir} \ | |
628 | INSTALL_PROGRAM="libtool --mode=install install -p" \ | |
629 | DESTDIR=$RPM_BUILD_ROOT | |
630 | %endif | |
631 | ||
632 | %clean | |
633 | rm -rf $RPM_BUILD_ROOT | |
634 | ||
635 | %pre common | |
636 | %groupadd -P %{name}-common -g 136 -r -f bacula | |
637 | %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula | |
638 | ||
639 | %define update_configs \ | |
640 | echo "Updating bacula passwords and names..." | %banner -a %{name} \ | |
641 | cd %{_sysconfdir} \ | |
642 | for f in *-password; do \ | |
643 | if [ ! -s $f ]; then \ | |
644 | openssl rand -base64 33 > $f \ | |
645 | fi \ | |
646 | p=$(cat $f) \ | |
647 | for cf in *.conf *.conf.rpmnew; do \ | |
648 | [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || : \ | |
649 | done \ | |
650 | done \ | |
651 | for cf in *.conf *.conf.rpmnew; do \ | |
652 | [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || : \ | |
653 | done | |
654 | ||
655 | %post common | |
656 | /sbin/ldconfig | |
657 | %update_configs | |
658 | ||
659 | %postun common | |
660 | /sbin/ldconfig | |
661 | if [ "$1" = "0" ]; then | |
662 | %userremove bacula | |
663 | %groupremove bacula | |
664 | fi | |
665 | ||
666 | %triggerpostun dir -- %{name}-dir < 5.0 | |
667 | %banner bacula-dir -t3 <<EOF | |
668 | You have upgraded from an older version of Bacula director. | |
669 | ||
670 | You will probably need to call %{_libexecdir}/%{name}/update_bacula_tables | |
671 | script to upgrade the database. | |
672 | EOF | |
673 | ||
674 | %post dir | |
675 | %update_configs | |
676 | /sbin/chkconfig --add bacula-dir | |
677 | %service bacula-dir restart "Bacula Director daemon" | |
678 | ||
679 | %preun dir | |
680 | if [ "$1" = "0" ]; then | |
681 | %service bacula-dir stop | |
682 | /sbin/chkconfig --del bacula-dir | |
683 | fi | |
684 | ||
685 | %post fd | |
686 | %update_configs | |
687 | /sbin/chkconfig --add bacula-fd | |
688 | %service bacula-fd restart "Bacula File daemon" | |
689 | ||
690 | %preun fd | |
691 | if [ "$1" = "0" ]; then | |
692 | %service bacula-fd stop | |
693 | /sbin/chkconfig --del bacula-fd | |
694 | fi | |
695 | ||
696 | %post sd | |
697 | %update_configs | |
698 | /sbin/chkconfig --add bacula-sd | |
699 | %service bacula-sd restart "Bacula Storage daemon" | |
700 | ||
701 | %preun sd | |
702 | if [ "$1" = "0" ]; then | |
703 | %service bacula-sd stop | |
704 | /sbin/chkconfig --del bacula-sd | |
705 | fi | |
706 | ||
707 | %pre console | |
708 | if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then | |
709 | mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf | |
710 | fi | |
711 | ||
712 | %post console | |
713 | %update_configs | |
714 | ||
715 | %post console-wx | |
716 | %update_configs | |
717 | ||
718 | %triggerpostun common -- %{name}-common < 5.0.1-2 | |
719 | find %{_sysconfdir}/bat.conf* -perm /007 -print0 2>/dev/null | xargs -0 -r chmod 600 || : | |
720 | ||
721 | %post console-qt4 | |
722 | %update_configs | |
723 | ||
724 | %post tray-monitor | |
725 | %update_configs | |
726 | ||
727 | %post rescue | |
728 | # link our current installed conf file to the rescue directory | |
729 | ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf | |
730 | ||
731 | # run getdiskinfo | |
732 | echo "Creating rescue files for this system..." | |
733 | cd %{_sysconfdir}/rescue | |
734 | ./getdiskinfo | |
735 | ||
736 | %preun rescue | |
737 | # remove the files created after the initial rpm installation | |
738 | if [ "$1" = "0" ]; then | |
739 | rm -f %{_sysconfdir}/rescue/bacula-fd.conf | |
740 | rm -f %{_sysconfdir}/rescue/partition.* | |
741 | rm -f %{_sysconfdir}/rescue/format.* | |
742 | rm -f %{_sysconfdir}/rescue/mount_drives | |
743 | rm -f %{_sysconfdir}/rescue/start_network | |
744 | rm -f %{_sysconfdir}/rescue/sfdisk | |
745 | rm -rf %{_sysconfdir}/rescue/diskinfo/* | |
746 | fi | |
747 | ||
748 | %define db_post() \ | |
749 | /sbin/ldconfig \ | |
750 | for name in "create database" "drop tables" "drop database" "grant privileges" "make tables" "update tables"; do \ | |
751 | prefix="${name%% *}" \ | |
752 | suffix="${name#* }" \ | |
753 | ln -sf "${prefix}_%{1}_${suffix}" %{_libexecdir}/%{name}/"${prefix}_bacula_${suffix}" || : \ | |
754 | done \ | |
755 | ln -sf "make_%{1}_catalog_backup" %{_libexecdir}/%{name}/make_catalog_backup || : \ | |
756 | ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \ | |
757 | %service bacula-dir restart "Bacula Director daemon" | |
758 | ||
759 | %post db-postgresql | |
760 | %db_post postgresql | |
761 | ||
762 | %postun db-postgresql -p /sbin/ldconfig | |
763 | ||
764 | %post db-mysql | |
765 | %db_post mysql | |
766 | ||
767 | %postun db-mysql -p /sbin/ldconfig | |
768 | ||
769 | %post db-sqlite3 | |
770 | %db_post sqlite3 | |
771 | ||
772 | %postun db-sqlite3 -p /sbin/ldconfig | |
773 | ||
774 | %files common | |
775 | %defattr(644,root,root,755) | |
776 | %doc LICENSE | |
777 | %{?with_python:%doc examples/python} | |
778 | %dir %{_sysconfdir} | |
779 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password | |
780 | # do not remove bsmtp from files. Fix build if it is not installed. | |
781 | %attr(755,root,root) %{_sbindir}/bsmtp | |
782 | %attr(755,root,root) %{_sbindir}/btraceback | |
783 | %attr(755,root,root) %{_libdir}/libbac-5*.so | |
784 | %attr(755,root,root) %{_libdir}/libbaccfg-5*.so | |
785 | %attr(755,root,root) %{_libdir}/libbacfind-5*.so | |
786 | %attr(755,root,root) %{_libdir}/libbacpy-5*.so | |
787 | %attr(755,root,root) %{_libdir}/libbacsql-5*.so | |
788 | %{_mandir}/man8/bacula.8* | |
789 | %{_mandir}/man1/bsmtp.1* | |
790 | %{_mandir}/man8/btraceback.8* | |
791 | %dir %{_libexecdir}/%{name} | |
792 | %{_libexecdir}/%{name}/btraceback.dbx | |
793 | %{_libexecdir}/%{name}/btraceback.gdb | |
794 | %{_libexecdir}/%{name}/bacula_config | |
795 | %attr(770,root,bacula) %dir %{_localstatedir} | |
796 | %attr(750,bacula,logs) %dir /var/log/bacula | |
797 | %attr(640,bacula,logs) %ghost /var/log/bacula/log | |
798 | ||
799 | %files dir | |
800 | %defattr(644,root,root,755) | |
801 | %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE | |
802 | #%doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula} | |
803 | %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf | |
804 | %ghost %{_sysconfdir}/.pw.sed | |
805 | %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir | |
806 | %attr(754,root,root) /etc/rc.d/init.d/bacula-dir | |
807 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir | |
808 | %attr(755,root,root) %{_sbindir}/bacula-dir | |
809 | %attr(755,root,root) %{_sbindir}/bregex | |
810 | %attr(755,root,root) %{_sbindir}/bwild | |
811 | %attr(755,root,root) %{_sbindir}/bacula-dbcheck | |
812 | %{_mandir}/man8/bacula-dir.8* | |
813 | %{_mandir}/man8/bacula-dbcheck.8* | |
814 | %{_mandir}/man8/bregex.8* | |
815 | %{_mandir}/man8/bwild.8* | |
816 | %{_libexecdir}/%{name}/query.sql | |
817 | %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup | |
818 | ||
819 | %files db-postgresql | |
820 | %defattr(644,root,root,755) | |
821 | %attr(755,root,root) %{_libexecdir}/%{name}/create_postgresql_database | |
822 | %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_database | |
823 | %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_tables | |
824 | %attr(755,root,root) %{_libexecdir}/%{name}/grant_postgresql_privileges | |
825 | %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_tables | |
826 | %attr(755,root,root) %{_libexecdir}/%{name}/update_postgresql_* | |
827 | %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_catalog_backup | |
828 | %attr(755,root,root) %{_libdir}/libbaccats-postgresql-5*.so | |
829 | ||
830 | %ghost %attr(755,root,root) %{_libdir}/libbaccats-5*.so | |
831 | %ghost %{_libexecdir}/%{name}/create_bacula_database | |
832 | %ghost %{_libexecdir}/%{name}/drop_bacula_tables | |
833 | %ghost %{_libexecdir}/%{name}/drop_bacula_database | |
834 | %ghost %{_libexecdir}/%{name}/grant_bacula_privileges | |
835 | %ghost %{_libexecdir}/%{name}/make_bacula_tables | |
836 | %ghost %{_libexecdir}/%{name}/update_bacula_tables | |
837 | %ghost %{_libexecdir}/%{name}/make_catalog_backup | |
838 | ||
839 | %files db-mysql | |
840 | %defattr(644,root,root,755) | |
841 | %attr(755,root,root) %{_libexecdir}/%{name}/create_mysql_database | |
842 | %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_database | |
843 | %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_tables | |
844 | %attr(755,root,root) %{_libexecdir}/%{name}/grant_mysql_privileges | |
845 | %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_tables | |
846 | %attr(755,root,root) %{_libexecdir}/%{name}/update_mysql_* | |
847 | %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_catalog_backup | |
848 | %attr(755,root,root) %{_libdir}/libbaccats-mysql-5*.so | |
849 | ||
850 | %ghost %attr(755,root,root) %{_libdir}/libbaccats-5*.so | |
851 | %ghost %{_libexecdir}/%{name}/create_bacula_database | |
852 | %ghost %{_libexecdir}/%{name}/drop_bacula_tables | |
853 | %ghost %{_libexecdir}/%{name}/drop_bacula_database | |
854 | %ghost %{_libexecdir}/%{name}/grant_bacula_privileges | |
855 | %ghost %{_libexecdir}/%{name}/make_bacula_tables | |
856 | %ghost %{_libexecdir}/%{name}/update_bacula_tables | |
857 | %ghost %{_libexecdir}/%{name}/make_catalog_backup | |
858 | ||
859 | %files db-sqlite3 | |
860 | %defattr(644,root,root,755) | |
861 | %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database | |
862 | %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_database | |
863 | %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_tables | |
864 | %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges | |
865 | %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables | |
866 | %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_* | |
867 | %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_catalog_backup | |
868 | %attr(755,root,root) %{_libdir}/libbaccats-sqlite3-5*.so | |
869 | ||
870 | %ghost %attr(755,root,root) %{_libdir}/libbaccats-5*.so | |
871 | %ghost %{_libexecdir}/%{name}/create_bacula_database | |
872 | %ghost %{_libexecdir}/%{name}/drop_bacula_tables | |
873 | %ghost %{_libexecdir}/%{name}/drop_bacula_database | |
874 | %ghost %{_libexecdir}/%{name}/grant_bacula_privileges | |
875 | %ghost %{_libexecdir}/%{name}/make_bacula_tables | |
876 | %ghost %{_libexecdir}/%{name}/update_bacula_tables | |
877 | %ghost %{_libexecdir}/%{name}/make_catalog_backup | |
878 | ||
879 | %files fd | |
880 | %defattr(644,root,root,755) | |
881 | %doc LICENSE | |
882 | %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf | |
883 | %attr(754,root,root) /etc/rc.d/init.d/bacula-fd | |
884 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd | |
885 | %attr(755,root,root) %{_sbindir}/bacula-fd | |
886 | %attr(755,root,root) %{_libdir}/bpipe-fd.so | |
887 | %{_mandir}/man8/bacula-fd.8* | |
888 | ||
889 | %files sd | |
890 | %defattr(644,root,root,755) | |
891 | %doc LICENSE | |
892 | %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf | |
893 | %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mtx-changer.conf | |
894 | %attr(754,root,root) /etc/rc.d/init.d/bacula-sd | |
895 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd | |
896 | %attr(755,root,root) %{_sbindir}/bacula-sd | |
897 | %attr(755,root,root) %{_sbindir}/bcopy | |
898 | %attr(755,root,root) %{_sbindir}/bextract | |
899 | %attr(755,root,root) %{_sbindir}/bls | |
900 | %attr(755,root,root) %{_sbindir}/bscan | |
901 | %attr(755,root,root) %{_sbindir}/btape | |
902 | %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer | |
903 | %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer | |
904 | %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler | |
905 | %{_mandir}/man8/bacula-sd.8* | |
906 | %{_mandir}/man8/bcopy.8* | |
907 | %{_mandir}/man8/bextract.8* | |
908 | %{_mandir}/man8/bls.8* | |
909 | %{_mandir}/man8/bscan.8* | |
910 | %{_mandir}/man8/btape.8* | |
911 | ||
912 | %files console | |
913 | %defattr(644,root,root,755) | |
914 | %doc LICENSE | |
915 | %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf | |
916 | %attr(755,root,root) %{_sbindir}/bconsole | |
917 | %{_mandir}/man8/bconsole.8* | |
918 | ||
919 | %if %{with console_wx} | |
920 | %files console-wx | |
921 | %defattr(644,root,root,755) | |
922 | %doc LICENSE | |
923 | %{_pixmapsdir}/%{name}.png | |
924 | %{_desktopdir}/bacula-wx.desktop | |
925 | %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bwx-console.conf | |
926 | %attr(755,root,root) %{_sbindir}/bwx-console | |
927 | %{_mandir}/man1/bacula-bwxconsole.1* | |
928 | %endif | |
929 | ||
930 | %if %{with bat} | |
931 | %files console-qt4 | |
932 | %defattr(644,root,root,755) | |
933 | %doc LICENSE | |
934 | %{_pixmapsdir}/%{name}.png | |
935 | %{_desktopdir}/bat.desktop | |
936 | # Do not make this file world-readable or any user will get full access to the | |
937 | # backup system | |
938 | %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bat.conf | |
939 | %attr(755,root,root) %{_bindir}/bat | |
940 | %{_mandir}/man1/bat.1* | |
941 | %{_docdir}/%{name} | |
942 | %endif | |
943 | ||
944 | %if %{with console_wx} | |
945 | %files tray-monitor | |
946 | %defattr(644,root,root,755) | |
947 | %doc LICENSE | |
948 | %attr(755,root,root) %{_sbindir}/bacula-tray-monitor | |
949 | #%{_pixmapsdir}/%{name}-tray-monitor.xpm | |
950 | #%{_desktopdir}/%{name}-tray-monitor.desktop | |
951 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf | |
952 | %{_mandir}/man1/bacula-tray-monitor.1* | |
953 | %endif | |
954 | ||
955 | %if %{with rescue} | |
956 | %files rescue | |
957 | %defattr(644,root,root,755) | |
958 | %doc LICENSE | |
959 | %dir %{_sysconfdir}/rescue | |
960 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list | |
961 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd | |
962 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy | |
963 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo | |
964 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk | |
965 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula | |
966 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc | |
967 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub | |
968 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo | |
969 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2 | |
970 | %endif | |
971 | ||
972 | %if %{with nagios} | |
973 | %files -n nagios-plugin-check_bacula | |
974 | %defattr(644,root,root,755) | |
975 | %attr(755,root,root) %{nagiosplugindir}/check_bacula | |
976 | %endif |