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