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