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