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