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