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