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