]> git.pld-linux.org Git - packages/bacula.git/blob - bacula.spec
- attr cleanup
[packages/bacula.git] / bacula.spec
1 # TODO:
2 # - files section
3 # - rpm scripts
4 #
5 Summary:        Bacula - The Network Backup Solution
6 Summary(pl):    Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
7 Name:           bacula
8 Version:        1.34.6
9 Release:        0.1
10 Epoch:          0
11 Group:          Networking/Utilities
12 License:        GPL v2
13 Source0:        http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
14 # Source0-md5:  9de593cb206df126a8e27774281c5bf6
15 Source1:        http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/tomsrtbt-2.0.103.tar.gz
16 # Source1-md5:  d5ee50efb28986d564547d5da5de2483
17 Source2:        %{name}-manpages.tar.bz2
18 # Source2-md5:  e4dae86d6574b360e831efd3913e7f4c
19 Source10:       %{name}-dir.init
20 Source11:       %{name}-fd.init
21 Source12:       %{name}-sd.init
22 Source13:       %{name}.logrotate
23 Patch0:         %{name}-pidfile.patch
24 URL:            http://www.bacula.org/
25 BuildRequires:  acl-static
26 BuildRequires:  glibc-static
27 BuildRequires:  libstdc++-static
28 BuildRequires:  libwrap-static
29 BuildRequires:  mtx
30 BuildRequires:  ncurses-devel
31 BuildRequires:  openssl-devel
32 BuildRequires:  pkgconfig
33 BuildRequires:  readline-devel
34 BuildRequires:  sed >= 4.0
35 BuildRequires:  sqlite2-devel
36 BuildRequires:  wxGTK2-devel
37 BuildRequires:  zlib-devel
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         _sysconfdir     /etc/%{name}
41 %define         _localstatedir  /var/lib/%{name}
42
43 %description
44 Bacula - It comes by night and sucks the vital essence from your
45 computers.
46
47 Bacula is a set of computer programs that permit you (or the system
48 administrator) to manage backup, recovery, and verification of
49 computer data across a network of computers of different kinds. In
50 technical terms, it is a network client/server based backup program.
51 Bacula is relatively easy to use and efficient, while offering many
52 advanced storage management features that make it easy to find and
53 recover lost or damaged files.
54
55 %description -l pl
56 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
57
58 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
59 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
60 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
61 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
62 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
63 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
64 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
65 plików.
66
67 %package common
68 Summary:        Common files for bacula package
69 Summary(pl):    Pliki wspólne dla pakietu bacula
70 Group:          Networking/Utilities
71 Conflicts:      bacula-dir < 0:1.34.6
72 Conflicts:      bacula-fd < 0:1.34.6
73 Conflicts:      bacula-sd < 0:1.34.6
74 Conflicts:      bacula-console < 0:1.34.6
75
76 %description common
77 Bacula - It comes by night and sucks the vital essence from your
78 computers.
79
80 Bacula is a set of computer programs that permit you (or the system
81 administrator) to manage backup, recovery, and verification of
82 computer data across a network of computers of different kinds. In
83 technical terms, it is a network client/server based backup program.
84 Bacula is relatively easy to use and efficient, while offering many
85 advanced storage management features that make it easy to find and
86 recover lost or damaged files.
87
88 %description common -l pl
89 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
90
91 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
92 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
93 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
94 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
95 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
96 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
97 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
98 plików.
99
100 %package dir
101 Summary:        Bacula Director and Catalog services
102 Summary(pl):    Us³ugi Bacula Director i Catalog
103 Group:          Networking/Utilities
104 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
105
106 %description dir
107 Bacula - It comes by night and sucks the vital essence from your
108 computers.
109
110 Bacula Director is the program that supervises all the backup,
111 restore, verify and archive operations. The system administrator uses
112 the Bacula Director to schedule backups and to recover files. Catalog
113 services are comprised of the software programs responsible for
114 maintaining the file indexes and volume databases for all files backed
115 up. The Catalog services permit the System Administrator or user to
116 quickly locate and restore any desired file, since it maintains a
117 record of all Volumes used, all Jobs run, and all Files saved. This
118 build requires sqlite to be installed separately as the catalog
119 database.
120
121 %description dir -l pl
122 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
123
124 Bacula Director to program nadzoruj±cy wszystkie operacje wykonywania
125 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
126 Administrator u¿ywa Bacula Directora do szeregowania kopii zapasowych
127 oraz odzyskiwania plików. Us³ugi katalogowe (Catalog services) s±
128 u¿ywane przez programy odpowiedzialne za zarz±dzanie indeksami plików
129 i baz± danych wolumenów dla wszystkich kopiowanych plików. Us³ugi
130 katalogowe umo¿liwiaj± administratorowi lub u¿ytkownikowi szybko
131 zlokalizowaæ i odtworzyæ dowolny plik, poniewa¿ utrzymuj± rekord ze
132 wszystkimi u¿ywanymi wolumenami, uruchomionymi zadaniami i zapisanymi
133 plikami. Pakiet wymaga sqlite zainstalowanego oddzielnie jako bazy
134 danych dla katalogu.
135
136 %package console
137 Summary:        Bacula Console
138 Summary(pl):    Konsola Baculi
139 Group:          Networking/Utilities
140 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
141
142 %description console
143 Bacula - It comes by night and sucks the vital essence from your
144 computers.
145
146 Bacula Console is the program that allows the administrator or user to
147 communicate with the Bacula Director. This is the text only console
148 interface.
149
150 %description console -l pl
151 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
152
153 Bacula Console to program umo¿liwiaj±cy administratorowi lub
154 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
155 interfejs czysto tekstowy.
156
157 %package console-wx
158 Summary:        Bacula wxWidgets Console
159 Summary(pl):    Konsola Baculi oparta na wxWidgets
160 Group:          Networking/Utilities
161 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
162
163 %description console-wx
164 Bacula - It comes by night and sucks the vital essence from your
165 computers.
166
167 Bacula Console is the program that allows the administrator or user to
168 communicate with the Bacula Director. This is the wxWidgets GUI
169 interface.
170
171 %description console-wx -l pl
172 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
173
174 Bacula Console to program umo¿liwiaj±cy administratorowi lub
175 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
176 interfejs graficzny oparty na wxWidgets.
177
178 %package fd
179 Summary:        Bacula File services (Client)
180 Summary(pl):    Us³ugi Bacula File (klient)
181 Group:          Networking/Utilities
182 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
183
184 %description fd
185 Bacula - It comes by night and sucks the vital essence from your
186 computers.
187
188 Bacula File services (or Client program) is the software program that
189 is installed on the machine to be backed up. It is specific to the
190 operating system on which it runs and is responsible for providing the
191 file attributes and data when requested by the Director. The File
192 services are also responsible for the file system dependent part of
193 restoring the file attributes and data during a recovery operation.
194 This program runs as a daemon on the machine to be backed up, and in
195 some of the documentation, the File daemon is referred to as the
196 Client (for example in Bacula configuration file).
197
198 %description fd -l pl
199 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
200
201 Us³ugi Bacula File (inaczej program kliencki) to oprogramowanie, które
202 instaluje siê na maszynach, z których maj± byæ wykonywane kopie
203 zapasowe. S± one specyficzne dla systemu operacyjnego, pod którym
204 dzia³a dana maszyna i odpowiadaj± za dostarczanie atrybutów i danych
205 plików na ¿±danie Directora. Us³ugi plikowe s± tak¿e odpowiedzialne za
206 zale¿n± od systemu plików czê¶æ odzyskiwania atrybutów i danych plików
207 podczas operacji odzyskiwania danych. Program dzia³a jako demon na
208 maszynie, która ma byæ backupowana i w czê¶ci dokumentacji demon ten
209 (File) jest nazywany klientem (na przyk³ad w pliku konfiguracyjnym
210 Baculi).
211
212 %package sd
213 Summary:        Bacula Storage services
214 Summary(pl):    Us³ugi Bacula Storage
215 Group:          Networking/Utilities
216 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
217
218 %description sd
219 Bacula - It comes by night and sucks the vital essence from your
220 computers.
221
222 Bacula Storage services consist of the software programs that perform
223 the storage and recovery of the file attributes and data to the
224 physical backup media or volumes. In other words, the Storage daemon
225 is responsible for reading and writing your tapes (or other storage
226 media, e.g. files). The Storage services runs as a daemon on the
227 machine that has the backup device (usually a tape drive).
228
229 %description sd -l pl
230 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
231
232 Us³ugi Bacula Storage sk³adaj± siê z programów obs³uguj±cych
233 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
234 fizycznych no¶nikach lub wolumenach. Innymi s³owy, demon Storage jest
235 odpowiedzialny za odczyt i zapis ta¶m (lub innych no¶ników do
236 przechowywania danych, np. plików). Us³ugi Storage dzia³aj± jako demon
237 na maszynie, która zawiera urz±dzenie backupowe (zwykle napêd
238 ta¶mowy).
239
240 %package rescue
241 Summary:        Bacula - The Network Backup Solution
242 Summary(pl):    Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
243 Group:          Networking/Utilities
244 Requires:       %{name}-fd = %{epoch}:%{version}-%{release}
245 Requires:       coreutils
246 Requires:       util-linux
247
248 %description rescue
249 Bacula - It comes by night and sucks the vital essence from your
250 computers.
251
252 Bacula is a set of computer programs that permit you (or the system
253 administrator) to manage backup, recovery, and verification of
254 computer data across a network of computers of different kinds. In
255 technical terms, it is a network client/server based backup program.
256 Bacula is relatively easy to use and efficient, while offering many
257 advanced storage management features that make it easy to find and
258 recover lost or damaged files.
259
260 This package installs scripts for disaster recovery and builds rescue
261 floppy disks for bare metal recovery. This package includes tomsrtbt
262 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a
263 tool to build a boot floppy disk.
264
265 To create a boot disk run "./getdiskinfo" from the
266 %{_sysconfdir}/rescue directory (this is done when the package is
267 first installed), then run "./install.s" from the
268 %{_sysconfdir}/rescue/tomsrtbt directory. To make the bacula rescue
269 disk run "./make_rescue_disk --copy-static-bacula - --copy-etc-files"
270 from the %{_sysconfdir}/rescue directory. To recreate the rescue
271 information for this system run ./getdiskinfo again.
272
273 %description rescue -l pl
274 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
275
276 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
277 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
278 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
279 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
280 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
281 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
282 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
283 plików.
284
285 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietki
286 ratunkowe do odtwarzania systemu od zera. Ten pakiet zawiera tomsrtbt
287 (http://www.toms.net/rb/ Toma Oehsera, Tom@Toms.NET), aby dostarczyæ
288 narzêdzie do tworzenia bootowalnych dyskietek.
289
290 Aby utworzyæ bootowaln± dyskietkê nale¿y uruchomiæ "./getdiskinfo" z
291 katalogu %{_sysconfdir}/rescue (jest to wykonywane kiedy pakiet jest
292 po raz pierwszy instalowany), a nastêpnie uruchomiæ "./install.s" z
293 katalogu %{_sysconfdir}/rescue/tomsrtbt. Aby stworzyæ dyskietkê
294 ratunkow± Baculi, nale¿y uruchomiæ "./make_rescue_disk
295 --copy-static-bacula - --copy-etc-files" z katalogu
296 %{_sysconfdir}/rescue . Aby ponownie utworzyæ informacje ratunkowe dla
297 danego systemu, nale¿y ponownie uruchomiæ ./getdiskinfo .
298
299 %package updatedb
300 Summary:        Bacula - The Network Backup Solution
301 Summary(pl):    Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
302 Group:          Networking/Utilities
303
304 %description updatedb
305 Bacula - It comes by night and sucks the vital essence from your
306 computers.
307
308 Bacula is a set of computer programs that permit you (or the system
309 administrator) to manage backup, recovery, and verification of
310 computer data across a network of computers of different kinds. In
311 technical terms, it is a network client/server based backup program.
312 Bacula is relatively easy to use and efficient, while offering many
313 advanced storage management features that make it easy to find and
314 recover lost or damaged files.
315
316 This package installs scripts for updating older versions of the
317 bacula database.
318
319 %description updatedb -l pl
320 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
321
322 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
323 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
324 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
325 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
326 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
327 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
328 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
329 plików.
330
331 Ten pakiet instaluje skrypty do uaktualniania starszych wersji bazy
332 danych Baculi.
333
334 %prep
335 %setup -q -a 1 -a 2
336 %patch0 -p1
337 sed -i -e 's#wx-config#wxgtk2-2.4-config#g' configure*
338 sed -i -e 's#-lreadline -ltermcap#-lreadline#g' configure*
339 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
340         src/cats/create_* src/cats/delete_* src/cats/drop_* \
341         src/cats/grant_* src/cats/make_* src/cats/update_*
342
343 %build
344 CPPFLAGS="-I%{_includedir}/ncurses -I%{_includedir}/readline"
345 %configure \
346         --with-scriptdir=%{_libexecdir}/%{name} \
347         --disable-gnome \
348         --disable-conio \
349         --enable-smartalloc \
350         --enable-wx-console \
351         --with-readline \
352         --with-tcp-wrappers \
353         --with-working-dir=%{_var}/lib/%{name} \
354         --with-dump-email="root@localhost" \
355         --with-job-email="root@localhost" \
356         --with-smtp-host=localhost \
357         --with-pid-dir=/var/run \
358         --with-subsys-dir=/var/lock/subsys \
359         --with-sqlite \
360         --enable-static-fd \
361         --with-dir-password="#FAKE#DIR#PASSWORD#PLD#" \
362         --with-fd-password="#FAKE#FD#PASSWORD#PLD#" \
363         --with-sd-password="#FAKE#SD#PASSWORD#PLD#"
364
365 %{__make}
366
367 %install
368 rm -rf $RPM_BUILD_ROOT
369
370 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,security/console.apps}
371 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rescue/tomsrtbt,updatedb}
372 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_mandir},%{_bindir}}
373
374 %{__make} install \
375         DESTDIR=$RPM_BUILD_ROOT
376
377 # static daemon
378 strip src/filed/static-bacula-fd
379 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
380
381 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
382 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
383 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
384 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
385
386 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
387
388 # install the rescue stuff, these are the rescue scripts
389 install rescue/linux/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
390 install rescue/linux/format_floppy $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
391 install rescue/linux/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
392 install rescue/linux/make_rescue_disk $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
393 install rescue/linux/restore_bacula $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
394 install rescue/linux/restore_etc $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
395 install rescue/linux/run_grub $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
396 install rescue/linux/run_lilo $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
397 install rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue/
398
399 # this is the tom's root boot disk
400 install tomsrtbt-*/* $RPM_BUILD_ROOT%{_sysconfdir}/rescue/tomsrtbt/
401
402 # install the updatedb scripts
403 install updatedb/* $RPM_BUILD_ROOT%{_sysconfdir}/updatedb/
404
405 # manual
406 cp -a man1 man8 $RPM_BUILD_ROOT%{_mandir}
407
408 install -d html-manual
409 cp -a doc/html-manual/*.{html,jpg,gif,css} html-manual/
410
411 # some file changes
412 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
413 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
414 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gnome*
415 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
416
417 cat << EOF > $RPM_BUILD_ROOT/etc/security/console.apps/bconsole
418 USER=root
419 PROGRAM=%{_sbindir}/bconsole
420 SESSION=true
421 EOF
422 install scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/bconsole
423 ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/bconsole
424
425 cat << EOF > $RPM_BUILD_ROOT/etc/security/console.apps/wx-console
426 USER=root
427 PROGRAM=%{_sbindir}/wx-console
428 SESSION=true
429 EOF
430 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/wx-console
431 ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/wx-console
432
433 %pre common
434 if [ -n "`getgid bacula`" ]; then
435         if [ "`getgid bacula`" != "136" ]; then
436                 echo "Error: group bacula doesn't have gid=136. Correct this before installing bacula." 1>&2
437                 exit 1
438         fi
439 else
440         /usr/sbin/groupadd -g 136 -r -f bacula
441 fi
442 if [ -n "`id -u bacula 2>/dev/null`" ]; then
443         if [ "`id -u bacula`" != "136" ]; then
444                 echo "Error: user bacula doesn't have uid=136. Correct this before installing bacula." 1>&2
445                 exit 1
446         fi
447 else
448         /usr/sbin/useradd -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula 1>&2
449 fi
450
451 %postun common
452 if [ "$1" = "0" ]; then
453         %userremove bacula
454         %groupremove bacula
455 fi
456
457 %post dir
458 umask 077
459 [ -s %{_localstatedir}/bacula.db ] && \
460         DB_VER=`echo "select * from Version;" | \
461         %{_bindir}/sqlite %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
462 if [ -z "$DB_VER" ]; then
463 # grant privileges and create tables
464         %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
465         %{_libexecdir}/%{name}/create_bacula_database > dev/null
466         %{_libexecdir}/%{name}/make_bacula_tables > dev/null
467 elif [ "$DB_VER" -lt "7" ]; then
468         echo "Backing up bacula tables"
469         echo ".dump" | sqlite %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
470         type=sqlite
471         echo "Upgrading bacula tables"
472         if [ "$DB_VER" -lt "6" ]; then
473                 if [ "$DB_VER" -lt "5" ]; then
474                         %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
475                 fi
476                 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
477         fi
478         %{_libexecdir}/%{name}/update_bacula_tables
479         echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
480 fi
481 chown -R bacula:bacula %{_localstatedir}
482 chmod -R u+rX,go-rwx %{_localstatedir}/*
483
484 /sbin/chkconfig --add bacula-dir
485 if [ -f /var/lock/subsys/bacula-dir ]; then
486         /etc/rc.d/init.d/bacula-dir restart 1>&2
487 else
488         echo "Run \"/etc/rc.d/init.d/bacula-dir start\" to start Bacula Director daemon."
489 fi
490
491 %preun dir
492 if [ "$1" = "0" ]; then
493         if [ -f /var/lock/subsys/bacula-dir ]; then
494                 /etc/rc.d/init.d/bacula-dir stop 1>&2
495         fi
496         /sbin/chkconfig --del bacula-dir
497 fi
498
499 %post fd
500 /sbin/chkconfig --add bacula-fd
501 if [ -f /var/lock/subsys/bacula-fd ]; then
502         /etc/rc.d/init.d/bacula-fd restart 1>&2
503 else
504         echo "Run \"/etc/rc.d/init.d/bacula-fd start\" to start Bacula File daemon."
505 fi
506
507 %preun fd
508 if [ "$1" = "0" ]; then
509         if [ -f /var/lock/subsys/bacula-fd ]; then
510                 /etc/rc.d/init.d/bacula-fd stop 1>&2
511         fi
512         /sbin/chkconfig --del bacula-fd
513 fi
514
515 %post sd
516 /sbin/chkconfig --add bacula-sd
517 if [ -f /var/lock/subsys/bacula-sd ]; then
518         /etc/rc.d/init.d/bacula-sd restart 1>&2
519 else
520         echo "Run \"/etc/rc.d/init.d/bacula-sd start\" to start Bacula Storage daemon."
521 fi
522
523 %preun sd
524 if [ "$1" = "0" ]; then
525         if [ -f /var/lock/subsys/bacula-sd ]; then
526                 /etc/rc.d/init.d/bacula-sd stop 1>&2
527         fi
528         /sbin/chkconfig --del bacula-sd
529 fi
530
531 %pre console
532 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
533         mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
534 fi
535
536 %post updatedb
537 echo "The database update scripts were installed to %{_sysconfdir}/updatedb"
538
539 %clean
540 rm -rf $RPM_BUILD_ROOT
541
542 %post rescue
543 # link our current installed conf file to the rescue directory
544 ln -s %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
545
546 # run getdiskinfo
547 echo "Creating rescue files for this system..."
548 cd %{_sysconfdir}/rescue
549 ./getdiskinfo
550
551 %preun rescue
552 # remove the files created after the initial rpm installation
553 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
554 rm -f %{_sysconfdir}/rescue/partition.*
555 rm -f %{_sysconfdir}/rescue/format.*
556 rm -f %{_sysconfdir}/rescue/mount_drives
557 rm -f %{_sysconfdir}/rescue/start_network
558 rm -f %{_sysconfdir}/rescue/sfdisk
559 rm -rf %{_sysconfdir}/rescue/diskinfo/*
560
561 %files common
562 %defattr(644,root,root,755)
563 %dir %{_sysconfdir}
564 %attr(755,root,root) %{_sbindir}/btraceback
565 %attr(755,root,root) %{_sbindir}/bsmtp
566 %dir %{_libexecdir}/%{name}
567 %{_libexecdir}/%{name}/btraceback.gdb
568 %attr(700,bacula,bacula) %dir %{_localstatedir}
569
570 %files dir
571 %defattr(644,root,root,755)
572 %doc ChangeLog CheckList ReleaseNotes kernstodo
573 %doc doc/*.pdf html-manual examples
574 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-dir.conf
575 %ghost %{_sysconfdir}/.pw.sed
576 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
577 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
578 %attr(755,root,root) %{_sbindir}/bacula-dir
579 %attr(755,root,root) %{_sbindir}/dbcheck
580 %{_mandir}/man8/bacula-dir.8*
581 %{_mandir}/man1/dbcheck.1*
582 %{_libexecdir}/%{name}/query.sql
583 %defattr(755,root,root)
584 %{_libexecdir}/%{name}/create_sqlite_database
585 %{_libexecdir}/%{name}/drop_sqlite_database
586 %{_libexecdir}/%{name}/drop_sqlite_tables
587 %{_libexecdir}/%{name}/grant_sqlite_privileges
588 %{_libexecdir}/%{name}/make_sqlite_tables
589 %{_libexecdir}/%{name}/update_sqlite_tables*
590 %{_libexecdir}/%{name}/create_bacula_database
591 %{_libexecdir}/%{name}/drop_bacula_database
592 %{_libexecdir}/%{name}/drop_bacula_tables
593 %{_libexecdir}/%{name}/grant_bacula_privileges
594 %{_libexecdir}/%{name}/make_bacula_tables
595 %{_libexecdir}/%{name}/update_bacula_tables
596 %{_libexecdir}/%{name}/make_catalog_backup
597 %{_libexecdir}/%{name}/delete_catalog_backup
598
599 %files fd
600 %defattr(644,root,root,755)
601 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-fd.conf
602 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
603 %attr(755,root,root) %{_sbindir}/bacula-fd
604 %{_mandir}/man8/bacula-fd.8*
605
606 %files sd
607 %defattr(644,root,root,755)
608 %dir %{_sysconfdir}
609 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-sd.conf
610 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
611 %attr(755,root,root) %{_sbindir}/bacula-sd
612 %attr(755,root,root) %{_sbindir}/bcopy
613 %attr(755,root,root) %{_sbindir}/bextract
614 %attr(755,root,root) %{_sbindir}/bls
615 %attr(755,root,root) %{_sbindir}/bscan
616 %attr(755,root,root) %{_sbindir}/btape
617 %{_libexecdir}/%{name}/mtx-changer
618 %{_mandir}/man8/bacula-sd.8*
619 %{_mandir}/man1/bcopy.1*
620 %{_mandir}/man1/bextract.1*
621 %{_mandir}/man1/bls.1*
622 %{_mandir}/man1/bscan.1*
623 %{_mandir}/man1/btape.1*
624
625 %files console
626 %defattr(644,root,root,755)
627 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bconsole.conf
628 %attr(755,root,root) %{_sbindir}/bconsole
629 %config(noreplace) /etc/security/console.apps/bconsole
630 %config(noreplace) /etc/pam.d/bconsole
631 %verify(link) %{_bindir}/bconsole
632 %{_mandir}/man1/bconsole.1*
633
634 %files console-wx
635 %defattr(644,root,root,755)
636 %{_pixmapsdir}/%{name}.png
637 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/wx-console.conf
638 %attr(755,root,root) %{_sbindir}/wx-console
639 %config(noreplace) /etc/security/console.apps/wx-console
640 %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/wx-console
641 %verify(link) %{_bindir}/wx-console
642 %{_mandir}/man1/wx-console.1*
643
644 %files rescue
645 %defattr(644,root,root,755)
646 %{_sysconfdir}/rescue
647
648 %files updatedb
649 %defattr(644,root,root,755)
650 %{_sysconfdir}/updatedb
This page took 0.119237 seconds and 3 git commands to generate.