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