2 # - update desktop files, think about su-wrappers for console
4 # - fix log file permissions
7 %bcond_without console_wx # wx-console program
8 %bcond_without gnome # gnome-console program
12 Summary: Bacula - The Network Backup Solution
13 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
18 License: extended GPL v2
19 Group: Networking/Utilities
20 Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
21 # Source0-md5: 6273f45bfbcddd66e179bc6cb7e28ad1
22 Source1: %{name}-manpages.tar.bz2
23 # Source1-md5: e4dae86d6574b360e831efd3913e7f4c
24 Source2: http://dl.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
25 # Source2-md5: da29daa9027c402f5d6b55a4c7982fdb
26 #Source3: http://dl.sourceforge.net/bacula/%{name}-gui-%{version}.tar.gz
27 ## Source3-md5: 5fb575ceed9dee0cdf8bc7f81ef60f54
28 Source4: http://dl.sourceforge.net/bacula/%{name}-rescue-1.8.3.tar.gz
29 # Source4-md5: 61e97e011e8d939bb15e47b6c8f0797d
30 Source10: %{name}-dir.init
31 Source11: %{name}-fd.init
32 Source12: %{name}-sd.init
33 Source13: %{name}.logrotate
34 Source14: %{name}-dir.sysconfig
35 Source15: %{name}-fd.sysconfig
36 Source16: %{name}-sd.sysconfig
37 Patch0: %{name}-dvd-handler_path.patch
38 Patch1: %{name}-dvd_append.patch
39 URL: http://www.bacula.org/
40 BuildRequires: acl-static
41 BuildRequires: automake
42 %{?with_rescue:BuildRequires: fakeroot}
43 BuildRequires: glibc-static
45 BuildRequires: libgnome-devel >= 2.0
46 BuildRequires: libgnomeui-devel >= 2.0
48 BuildRequires: libstdc++-static
49 BuildRequires: libwrap-static
51 BuildRequires: ncurses-devel
52 BuildRequires: openssl-devel
53 BuildRequires: openssl-static
54 BuildRequires: pkgconfig
55 %{?with_python:BuildRequires: python-static}
56 BuildRequires: readline-devel
57 BuildRequires: rpmbuild(macros) >= 1.268
58 BuildRequires: sed >= 4.0
59 BuildRequires: sqlite-devel
60 %if %{with console_wx}
61 BuildRequires: wxGTK2-devel >= 2.4.0
63 BuildRequires: zlib-devel
64 BuildRequires: zlib-static
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 %define _sysconfdir /etc/%{name}
68 %define _localstatedir /var/lib/%{name}
71 Bacula - It comes by night and sucks the vital essence from your
74 Bacula is a set of computer programs that permit you (or the system
75 administrator) to manage backup, recovery, and verification of
76 computer data across a network of computers of different kinds. In
77 technical terms, it is a network client/server based backup program.
78 Bacula is relatively easy to use and efficient, while offering many
79 advanced storage management features that make it easy to find and
80 recover lost or damaged files.
83 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
85 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
86 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
87 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
88 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
89 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
90 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
91 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
95 Summary: Common files for bacula package
96 Summary(pl): Pliki wspólne dla pakietu bacula
97 Group: Networking/Utilities
98 Requires(post): openssl-tools
99 Requires(post): sed >= 4.0
100 Requires(post,preun): /sbin/chkconfig
101 Requires(pre): /usr/sbin/groupadd
102 Requires(pre): /usr/sbin/useradd
103 Conflicts: bacula-console < 0:1.34.6
104 Conflicts: bacula-dir < 0:1.34.6
105 Conflicts: bacula-fd < 0:1.34.6
106 Conflicts: bacula-sd < 0:1.34.6
109 Bacula - It comes by night and sucks the vital essence from your
112 Bacula is a set of computer programs that permit you (or the system
113 administrator) to manage backup, recovery, and verification of
114 computer data across a network of computers of different kinds. In
115 technical terms, it is a network client/server based backup program.
116 Bacula is relatively easy to use and efficient, while offering many
117 advanced storage management features that make it easy to find and
118 recover lost or damaged files.
120 %description common -l pl
121 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
123 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
124 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych w
125 sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
126 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
127 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
128 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
129 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
133 Summary: Bacula Director and Catalog services
134 Summary(pl): Us³ugi Bacula Director i Catalog
135 Group: Networking/Utilities
136 Requires(post): sed >= 4.0
137 Requires: %{name}-common = %{epoch}:%{version}-%{release}
138 Obsoletes: bacula-updatedb
141 Bacula - It comes by night and sucks the vital essence from your
144 Bacula Director is the program that supervises all the backup,
145 restore, verify and archive operations. The system administrator uses
146 the Bacula Director to schedule backups and to recover files. Catalog
147 services are comprised of the software programs responsible for
148 maintaining the file indexes and volume databases for all files backed
149 up. The Catalog services permit the System Administrator or user to
150 quickly locate and restore any desired file, since it maintains a
151 record of all Volumes used, all Jobs run, and all Files saved. This
152 build requires sqlite to be installed separately as the catalog
155 %description dir -l pl
156 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
158 Bacula Director to program nadzoruj±cy wszystkie operacje wykonywania
159 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
160 Administrator u¿ywa Bacula Directora do szeregowania kopii zapasowych
161 oraz odzyskiwania plików. Us³ugi katalogowe (Catalog services) s±
162 u¿ywane przez programy odpowiedzialne za zarz±dzanie indeksami plików
163 i baz± danych wolumenów dla wszystkich kopiowanych plików. Us³ugi
164 katalogowe umo¿liwiaj± administratorowi lub u¿ytkownikowi szybko
165 zlokalizowaæ i odtworzyæ dowolny plik, poniewa¿ utrzymuj± rekord ze
166 wszystkimi u¿ywanymi wolumenami, uruchomionymi zadaniami i zapisanymi
167 plikami. Pakiet wymaga sqlite zainstalowanego oddzielnie jako bazy
171 Summary: Bacula Console
172 Summary(pl): Konsola Baculi
173 Group: Networking/Utilities
174 Requires(post): sed >= 4.0
175 Requires: %{name}-common = %{epoch}:%{version}-%{release}
178 Bacula - It comes by night and sucks the vital essence from your
181 Bacula Console is the program that allows the administrator or user to
182 communicate with the Bacula Director. This is the text only console
185 %description console -l pl
186 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
188 Bacula Console to program umo¿liwiaj±cy administratorowi lub
189 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
190 interfejs czysto tekstowy.
193 Summary: Bacula wxWidgets Console
194 Summary(pl): Konsola Baculi oparta na wxWidgets
195 Group: Networking/Utilities
196 Requires(post): sed >= 4.0
197 Requires: %{name}-common = %{epoch}:%{version}-%{release}
199 %description console-wx
200 Bacula - It comes by night and sucks the vital essence from your
203 Bacula Console is the program that allows the administrator or user to
204 communicate with the Bacula Director. This is the wxWidgets GUI
207 %description console-wx -l pl
208 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
210 Bacula Console to program umo¿liwiaj±cy administratorowi lub
211 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
212 interfejs graficzny oparty na wxWidgets.
214 %package console-gnome
215 Summary: Bacula GNOME Console
216 Summary(pl): Konsola Baculi oparta dla GNOME
217 Group: Networking/Utilities
218 Requires(post): sed >= 4.0
219 Requires: %{name}-common = %{epoch}:%{version}-%{release}
221 %description console-gnome
222 Bacula - It comes by night and sucks the vital essence from your
225 Bacula Console is the program that allows the administrator or user to
226 communicate with the Bacula Director. This is the GNOME GUI interface.
228 %description console-gnome -l pl
229 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
231 Bacula Console to program umo¿liwiaj±cy administratorowi lub
232 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
233 interfejs graficzny oparty na GNOME.
235 %package tray-monitor
236 Summary: Bacula Tray Monitor
237 Group: Networking/Utilities
238 Requires(post): sed >= 4.0
239 Requires: %{name}-common = %{epoch}:%{version}-%{release}
241 %description tray-monitor
242 Bacula - It comes by night and sucks the vital essence from your
245 The Monitor program is typically an icon in the system tray. However,
246 once the icon is expanded into a full window, the administrator or
247 user can obtain status information about the Director or the backup
248 status on the local workstation or any other Bacula daemon that is
252 Summary: Bacula File services (Client)
253 Summary(pl): Us³ugi Bacula File (klient)
254 Group: Networking/Utilities
255 Requires(post): sed >= 4.0
256 Requires: %{name}-common = %{epoch}:%{version}-%{release}
259 Bacula - It comes by night and sucks the vital essence from your
262 Bacula File services (or Client program) is the software program that
263 is installed on the machine to be backed up. It is specific to the
264 operating system on which it runs and is responsible for providing the
265 file attributes and data when requested by the Director. The File
266 services are also responsible for the file system dependent part of
267 restoring the file attributes and data during a recovery operation.
268 This program runs as a daemon on the machine to be backed up, and in
269 some of the documentation, the File daemon is referred to as the
270 Client (for example in Bacula configuration file).
272 %description fd -l pl
273 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
275 Us³ugi Bacula File (inaczej program kliencki) to oprogramowanie, które
276 instaluje siê na maszynach, z których maj± byæ wykonywane kopie
277 zapasowe. S± one specyficzne dla systemu operacyjnego, pod którym
278 dzia³a dana maszyna i odpowiadaj± za dostarczanie atrybutów i danych
279 plików na ¿±danie Directora. Us³ugi plikowe s± tak¿e odpowiedzialne za
280 zale¿n± od systemu plików czê¶æ odzyskiwania atrybutów i danych plików
281 podczas operacji odzyskiwania danych. Program dzia³a jako demon na
282 maszynie, która ma byæ backupowana i w czê¶ci dokumentacji demon ten
283 (File) jest nazywany klientem (na przyk³ad w pliku konfiguracyjnym
287 Summary: Bacula Storage services
288 Summary(pl): Us³ugi Bacula Storage
289 Group: Networking/Utilities
290 Requires(post): sed >= 4.0
291 Requires: %{name}-common = %{epoch}:%{version}-%{release}
292 Conflicts: dvd+rw-tools <= 5.21.4.10.8-1
295 Bacula - It comes by night and sucks the vital essence from your
298 Bacula Storage services consist of the software programs that perform
299 the storage and recovery of the file attributes and data to the
300 physical backup media or volumes. In other words, the Storage daemon
301 is responsible for reading and writing your tapes (or other storage
302 media, e.g. files). The Storage services runs as a daemon on the
303 machine that has the backup device (usually a tape drive).
305 %description sd -l pl
306 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
308 Us³ugi Bacula Storage sk³adaj± siê z programów obs³uguj±cych
309 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
310 fizycznych no¶nikach lub wolumenach. Innymi s³owy, demon Storage jest
311 odpowiedzialny za odczyt i zapis ta¶m (lub innych no¶ników do
312 przechowywania danych, np. plików). Us³ugi Storage dzia³aj± jako demon
313 na maszynie, która zawiera urz±dzenie backupowe (zwykle napêd
317 Summary: Bacula - The Network Backup Solution
318 Summary(pl): Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
319 Group: Networking/Utilities
320 Requires: %{name}-fd = %{epoch}:%{version}-%{release}
325 Bacula - It comes by night and sucks the vital essence from your
328 Bacula is a set of computer programs that permit you (or the system
329 administrator) to manage backup, recovery, and verification of
330 computer data across a network of computers of different kinds. In
331 technical terms, it is a network client/server based backup program.
332 Bacula is relatively easy to use and efficient, while offering many
333 advanced storage management features that make it easy to find and
334 recover lost or damaged files.
336 This package installs scripts for disaster recovery and builds rescue
337 floppy disk for bare metal recovery.
339 To make the bacula rescue disk run "./make_rescue_disk --copy-static-bacula
340 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To recreate the
341 rescue information for this system run ./getdiskinfo again.
343 %description rescue -l pl
344 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
346 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
347 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
348 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
349 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
350 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
351 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
352 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
355 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkê
356 ratunkowe do odtwarzania systemu od zera.
358 Aby stworzyæ dyskietkê ratunkow± Baculi, nale¿y uruchomiæ "./make_rescue_disk
359 --copy-static-bacula - --copy-etc-files" z katalogu
360 %{_sysconfdir}/rescue . Aby ponownie utworzyæ informacje ratunkowe dla
361 danego systemu, nale¿y ponownie uruchomiæ ./getdiskinfo .
368 tar -xf %{SOURCE4} && ln -s bacula-rescue-* rescue
369 sed -i -e 's#wx-config#wx-gtk2-ansi-config#g' configure*
370 sed -i -e 's#-lreadline -lhistory -ltermcap#-lreadline -lhistory#g' configure*
371 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
372 src/cats/create_* src/cats/delete_* src/cats/drop_* \
373 src/cats/grant_* src/cats/make_* src/cats/update_*
374 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
377 cp -f %{_datadir}/automake/config.sub autoconf
378 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
380 --with-scriptdir=%{_libexecdir}/%{name} \
381 --%{!?with_gnome:dis}%{?with_gnome:en}able-gnome \
383 --enable-smartalloc \
384 %{?with_console_wx:--enable-wx-console} \
385 --enable-tray-monitor \
386 %{?with_python:--with-python} \
388 --with-tcp-wrappers \
389 --with-working-dir=%{_var}/lib/%{name} \
390 --with-dump-email="root@localhost" \
391 --with-job-email="root@localhost" \
392 --with-smtp-host=localhost \
393 --with-pid-dir=/var/run \
394 --with-subsys-dir=/var/lock/subsys \
396 --with-dir-password="#FAKE-dir-password#" \
397 --with-fd-password="#FAKE-fd-password#" \
398 --with-sd-password="#FAKE-sd-password#" \
399 --with-mon-dir-password="#FAKE-mon-dir-password#" \
400 --with-mon-fd-password="#FAKE-mon-fd-password#" \
401 --with-mon-sd-password="#FAKE-mon-sd-password#" \
416 rm -rf $RPM_BUILD_ROOT
418 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
419 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
420 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
423 DESTDIR=$RPM_BUILD_ROOT
426 strip -R.comment -R.note src/filed/static-bacula-fd
427 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
429 # tray-monitor is for regular users
430 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
432 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
433 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
434 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
435 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
436 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
437 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
438 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
440 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
441 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
442 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
443 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
444 scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
445 sed -e 's#%{_sbindir}#%{_bindir}#' \
446 scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
449 # install the rescue stuff, these are the rescue scripts
450 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
451 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
452 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
453 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
456 # install the updatedb scripts
457 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
460 cp -a man1 man8 $RPM_BUILD_ROOT%{_mandir}
462 # place for site passwords
463 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
464 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
467 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
468 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
469 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gnome*
470 %if %{without console_wx}
471 rm -f $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
472 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/wx-console*
474 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
477 rm -rf $RPM_BUILD_ROOT
480 %groupadd -P %{name}-common -g 136 -r -f bacula
481 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
484 echo "Updating bacula passwords and names..."
486 for f in *-password ; do
487 if [ ! -s $f ] ; then
488 openssl rand -base64 33 > $f
491 for cf in *.conf *.conf.rpmnew ; do
492 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
495 for cf in *.conf *.conf.rpmnew ; do
496 [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || :
500 if [ "$1" = "0" ]; then
507 [ -s %{_localstatedir}/bacula.db ] && \
508 DB_VER=`echo "select * from Version;" | \
509 %{_bindir}/sqlite %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
510 if [ -z "$DB_VER" ]; then
511 # grant privileges and create tables
512 %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null
513 %{_libexecdir}/%{name}/create_bacula_database > dev/null
514 %{_libexecdir}/%{name}/make_bacula_tables > dev/null
515 elif [ "$DB_VER" -lt "9" ]; then
516 echo "Backing up bacula tables"
517 echo ".dump" | sqlite %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
519 echo "Upgrading bacula tables"
520 if [ "$DB_VER" -lt "9" ]; then
521 if [ "$DB_VER" -lt "8" ]; then
522 if [ "$DB_VER" -lt "7" ]; then
523 if [ "$DB_VER" -lt "6" ]; then
524 if [ "$DB_VER" -lt "5" ]; then
525 %{_libexecdir}/%{name}/update_${type}_tables_4_to_5
527 %{_libexecdir}/%{name}/update_${type}_tables_5_to_6
529 %{_libexecdir}/%{name}/update_${type}_tables_6_to_7
531 %{_libexecdir}/%{name}/update_${type}_tables_7_to_8
533 %{_libexecdir}/%{name}/update_${type}_tables_8_to_9
535 %{_libexecdir}/%{name}/update_bacula_tables
536 echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2"
538 chown -R bacula:bacula %{_localstatedir}
539 chmod -R u+rX,go-rwx %{_localstatedir}/*
541 echo "Updating Bacula passwords and names..."
543 for f in *-password ; do
545 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
547 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
549 /sbin/chkconfig --add bacula-dir
550 %service bacula-dir restart "Bacula Director daemon"
553 if [ "$1" = "0" ]; then
554 %service bacula-dir stop
555 /sbin/chkconfig --del bacula-dir
559 echo "Updating Bacula passwords and names..."
561 for f in *-password ; do
563 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
565 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
567 /sbin/chkconfig --add bacula-fd
568 %service bacula-fd restart "Bacula File daemon"
571 if [ "$1" = "0" ]; then
572 %service bacula-fd stop
573 /sbin/chkconfig --del bacula-fd
577 echo "Updating Bacula passwords and names..."
579 for f in *-password ; do
581 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
583 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
585 /sbin/chkconfig --add bacula-sd
586 %service bacula-sd restart "Bacula Storage daemon"
589 if [ "$1" = "0" ]; then
590 %service bacula-sd stop
591 /sbin/chkconfig --del bacula-sd
595 if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then
596 mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf
600 echo "Updating Bacula passwords and names..."
602 for f in *-password ; do
604 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
606 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
609 echo "Updating Bacula passwords and names..."
611 for f in *-password ; do
613 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
615 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
618 echo "Updating Bacula passwords and names..."
620 for f in *-password ; do
622 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
624 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
627 echo "Updating Bacula passwords and names..."
629 for f in *-password ; do
631 sed -i -e"s:#FAKE-$f#:$p:" *.conf *.conf.rpmnew 2>/dev/null || :
633 sed -i -e"s:--hostname--:`hostname`:" *.conf *.conf.rpmnew 2>/dev/null || :
636 # link our current installed conf file to the rescue directory
637 ln -sf %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf
640 echo "Creating rescue files for this system..."
641 cd %{_sysconfdir}/rescue
645 # remove the files created after the initial rpm installation
646 if [ "$1" = "0" ]; then
647 rm -f %{_sysconfdir}/rescue/bacula-fd.conf
648 rm -f %{_sysconfdir}/rescue/partition.*
649 rm -f %{_sysconfdir}/rescue/format.*
650 rm -f %{_sysconfdir}/rescue/mount_drives
651 rm -f %{_sysconfdir}/rescue/start_network
652 rm -f %{_sysconfdir}/rescue/sfdisk
653 rm -rf %{_sysconfdir}/rescue/diskinfo/*
657 %defattr(644,root,root,755)
660 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*-password
661 %attr(755,root,root) %{_sbindir}/btraceback
662 %attr(755,root,root) %{_sbindir}/bsmtp
663 %{_mandir}/man8/bacula.8*
664 %dir %{_libexecdir}/%{name}
665 %{_libexecdir}/%{name}/btraceback.dbx
666 %{_libexecdir}/%{name}/btraceback.gdb
667 %attr(770,root,bacula) %dir %{_localstatedir}
670 %defattr(644,root,root,755)
671 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
672 %doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
673 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
674 %ghost %{_sysconfdir}/.pw.sed
675 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
676 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
677 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
678 %attr(755,root,root) %{_sbindir}/bacula-dir
679 %attr(755,root,root) %{_sbindir}/dbcheck
680 %{_mandir}/man8/bacula-dir.8*
681 %{_mandir}/man1/dbcheck.1*
682 %{_libexecdir}/%{name}/query.sql
683 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite_database
684 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_database
685 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite_tables
686 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite_privileges
687 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite_tables
688 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite*
689 %attr(755,root,root) %{_libexecdir}/%{name}/create_bacula_database
690 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_database
691 %attr(755,root,root) %{_libexecdir}/%{name}/drop_bacula_tables
692 %attr(755,root,root) %{_libexecdir}/%{name}/grant_bacula_privileges
693 %attr(755,root,root) %{_libexecdir}/%{name}/make_bacula_tables
694 %attr(755,root,root) %{_libexecdir}/%{name}/update_bacula_tables
695 %attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
696 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
699 %defattr(644,root,root,755)
701 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-fd.conf
702 %attr(754,root,root) /etc/rc.d/init.d/bacula-fd
703 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-fd
704 %attr(755,root,root) %{_sbindir}/bacula-fd
705 %{_mandir}/man8/bacula-fd.8*
708 %defattr(644,root,root,755)
711 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
712 %attr(754,root,root) /etc/rc.d/init.d/bacula-sd
713 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd
714 %attr(755,root,root) %{_sbindir}/bacula-sd
715 %attr(755,root,root) %{_sbindir}/bcopy
716 %attr(755,root,root) %{_sbindir}/bextract
717 %attr(755,root,root) %{_sbindir}/bls
718 %attr(755,root,root) %{_sbindir}/bscan
719 %attr(755,root,root) %{_sbindir}/btape
720 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
721 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
722 %attr(755,root,root) %{_libexecdir}/%{name}/dvd-handler
723 %{_mandir}/man8/bacula-sd.8*
724 %{_mandir}/man1/bcopy.1*
725 %{_mandir}/man1/bextract.1*
726 %{_mandir}/man1/bls.1*
727 %{_mandir}/man1/bscan.1*
728 %{_mandir}/man1/btape.1*
731 %defattr(644,root,root,755)
733 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bconsole.conf
734 %attr(755,root,root) %{_sbindir}/bconsole
735 %{_mandir}/man1/bconsole.1*
737 %if %{with console_wx}
739 %defattr(644,root,root,755)
741 %{_pixmapsdir}/%{name}.png
742 %{_desktopdir}/bacula-wx.desktop
743 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wx-console.conf
744 %attr(755,root,root) %{_sbindir}/wx-console
745 %{_mandir}/man1/wx-console.1*
750 %defattr(644,root,root,755)
752 %{_pixmapsdir}/%{name}.png
753 %{_desktopdir}/bacula.desktop
754 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gnome-console.conf
755 %attr(755,root,root) %{_sbindir}/gnome-console
756 #%{_mandir}/man1/gnome-console.1*
760 %defattr(644,root,root,755)
762 %{_pixmapsdir}/%{name}-tray-monitor.xpm
763 %{_desktopdir}/%{name}-tray-monitor.desktop
764 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tray-monitor.conf
765 %attr(755,root,root) %{_bindir}/bacula-tray-monitor
766 #%{_mandir}/man1/bacula-tray-monitor.1*
770 %defattr(644,root,root,755)
772 %dir %{_sysconfdir}/rescue
773 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/backup.etc.list
774 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/bacula-fd
775 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/format_floppy
776 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/getdiskinfo
777 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/make_rescue_disk
778 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_bacula
779 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/restore_etc
780 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_grub
781 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/run_lilo
782 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rescue/sfdisk.bz2