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