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