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