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