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