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