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