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