]> git.pld-linux.org Git - packages/bacula.git/blob - bacula.spec
- Version: 1.36.1
[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.1
8 Release:        0.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:  d09ecce1bc9e3a421f7eaf5ad2de5850
14 Source1:        %{name}-manpages.tar.bz2
15 # Source1-md5:  e4dae86d6574b360e831efd3913e7f4c
16 Source10:       %{name}-dir.init
17 Source11:       %{name}-fd.init
18 Source12:       %{name}-sd.init
19 Source13:       %{name}.logrotate
20 Source14:       %{name}-dir.sysconfig
21 Source15:       %{name}-fd.sysconfig
22 Source16:       %{name}-sd.sysconfig
23 URL:            http://www.bacula.org/
24 BuildRequires:  acl-static
25 BuildRequires:  automake
26 BuildRequires:  glibc-static
27 BuildRequires:  libgnome-devel >= 2.0
28 BuildRequires:  libgnomeui-devel >= 2.0
29 BuildRequires:  libstdc++-static
30 BuildRequires:  libwrap-static
31 BuildRequires:  mtx
32 BuildRequires:  ncurses-devel
33 BuildRequires:  openssl-devel
34 BuildRequires:  pkgconfig
35 BuildRequires:  readline-devel
36 BuildRequires:  sed >= 4.0
37 BuildRequires:  sqlite-devel
38 BuildRequires:  wxGTK2-devel
39 BuildRequires:  zlib-devel
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %define         _sysconfdir     /etc/%{name}
43 %define         _localstatedir  /var/lib/%{name}
44
45 %description
46 Bacula - It comes by night and sucks the vital essence from your
47 computers.
48
49 Bacula is a set of computer programs that permit you (or the system
50 administrator) to manage backup, recovery, and verification of
51 computer data across a network of computers of different kinds. In
52 technical terms, it is a network client/server based backup program.
53 Bacula is relatively easy to use and efficient, while offering many
54 advanced storage management features that make it easy to find and
55 recover lost or damaged files.
56
57 %description -l pl
58 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
59
60 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
61 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
62 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
63 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
64 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
65 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
66 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
67 plików.
68
69 %package common
70 Summary:        Common files for bacula package
71 Summary(pl):    Pliki wspólne dla pakietu bacula
72 Group:          Networking/Utilities
73 Conflicts:      bacula-dir < 0:1.34.6
74 Conflicts:      bacula-fd < 0:1.34.6
75 Conflicts:      bacula-sd < 0:1.34.6
76 Conflicts:      bacula-console < 0:1.34.6
77 Requires(post): openssl-tools
78 Requires(post): sed >= 4.0
79
80 %description common
81 Bacula - It comes by night and sucks the vital essence from your
82 computers.
83
84 Bacula is a set of computer programs that permit you (or the system
85 administrator) to manage backup, recovery, and verification of
86 computer data across a network of computers of different kinds. In
87 technical terms, it is a network client/server based backup program.
88 Bacula is relatively easy to use and efficient, while offering many
89 advanced storage management features that make it easy to find and
90 recover lost or damaged files.
91
92 %description common -l pl
93 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
94
95 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
96 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
97 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
98 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
99 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
100 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
101 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
102 plików.
103
104 %package dir
105 Summary:        Bacula Director and Catalog services
106 Summary(pl):    Us³ugi Bacula Director i Catalog
107 Group:          Networking/Utilities
108 Obsoletes:      %{name}-updatedb
109 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
110 Requires(post): sed >= 4.0
111
112 %description dir
113 Bacula - It comes by night and sucks the vital essence from your
114 computers.
115
116 Bacula Director is the program that supervises all the backup,
117 restore, verify and archive operations. The system administrator uses
118 the Bacula Director to schedule backups and to recover files. Catalog
119 services are comprised of the software programs responsible for
120 maintaining the file indexes and volume databases for all files backed
121 up. The Catalog services permit the System Administrator or user to
122 quickly locate and restore any desired file, since it maintains a
123 record of all Volumes used, all Jobs run, and all Files saved. This
124 build requires sqlite to be installed separately as the catalog
125 database.
126
127 %description dir -l pl
128 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
129
130 Bacula Director to program nadzoruj±cy wszystkie operacje wykonywania
131 kopii zapasowych, odzyskiwania, weryfikacji i archiwizowania.
132 Administrator u¿ywa Bacula Directora do szeregowania kopii zapasowych
133 oraz odzyskiwania plików. Us³ugi katalogowe (Catalog services) s±
134 u¿ywane przez programy odpowiedzialne za zarz±dzanie indeksami plików
135 i baz± danych wolumenów dla wszystkich kopiowanych plików. Us³ugi
136 katalogowe umo¿liwiaj± administratorowi lub u¿ytkownikowi szybko
137 zlokalizowaæ i odtworzyæ dowolny plik, poniewa¿ utrzymuj± rekord ze
138 wszystkimi u¿ywanymi wolumenami, uruchomionymi zadaniami i zapisanymi
139 plikami. Pakiet wymaga sqlite zainstalowanego oddzielnie jako bazy
140 danych dla katalogu.
141
142 %package console
143 Summary:        Bacula Console
144 Summary(pl):    Konsola Baculi
145 Group:          Networking/Utilities
146 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
147 Requires(post): sed >= 4.0
148
149 %description console
150 Bacula - It comes by night and sucks the vital essence from your
151 computers.
152
153 Bacula Console is the program that allows the administrator or user to
154 communicate with the Bacula Director. This is the text only console
155 interface.
156
157 %description console -l pl
158 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
159
160 Bacula Console to program umo¿liwiaj±cy administratorowi lub
161 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
162 interfejs czysto tekstowy.
163
164 %package console-wx
165 Summary:        Bacula wxWidgets Console
166 Summary(pl):    Konsola Baculi oparta na wxWidgets
167 Group:          Networking/Utilities
168 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
169 Requires(post): sed >= 4.0
170
171 %description console-wx
172 Bacula - It comes by night and sucks the vital essence from your
173 computers.
174
175 Bacula Console is the program that allows the administrator or user to
176 communicate with the Bacula Director. This is the wxWidgets GUI
177 interface.
178
179 %description console-wx -l pl
180 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
181
182 Bacula Console to program umo¿liwiaj±cy administratorowi lub
183 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
184 interfejs graficzny oparty na wxWidgets.
185
186 %package console-gnome
187 Summary:        Bacula GNOME Console
188 Summary(pl):    Konsola Baculi oparta dla GNOME
189 Group:          Networking/Utilities
190 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
191 Requires(post): sed >= 4.0
192
193 %description console-gnome
194 Bacula - It comes by night and sucks the vital essence from your
195 computers.
196
197 Bacula Console is the program that allows the administrator or user to
198 communicate with the Bacula Director. This is the GNOME GUI
199 interface.
200
201 %description console-gnome -l pl
202 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
203
204 Bacula Console to program umo¿liwiaj±cy administratorowi lub
205 u¿ytkownikowi komunikowanie siê z programem Bacula Director. To jest
206 interfejs graficzny oparty na GNOME.
207
208 %package tray-monitor
209 Summary:        Bacula Tray Monitor
210 Group:          Networking/Utilities
211 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
212 Requires(post): sed >= 4.0
213
214 %description tray-monitor
215 Bacula - It comes by night and sucks the vital essence from your
216 computers.
217
218 The Monitor program is typically an icon in the system tray. However, once the
219 icon is expanded into a full window, the administrator or user can obtain
220 status information about the Director or the backup status on the local
221 workstation or any other Bacula daemon that is configured.
222
223 %package fd
224 Summary:        Bacula File services (Client)
225 Summary(pl):    Us³ugi Bacula File (klient)
226 Group:          Networking/Utilities
227 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
228 Requires(post): sed >= 4.0
229
230 %description fd
231 Bacula - It comes by night and sucks the vital essence from your
232 computers.
233
234 Bacula File services (or Client program) is the software program that
235 is installed on the machine to be backed up. It is specific to the
236 operating system on which it runs and is responsible for providing the
237 file attributes and data when requested by the Director. The File
238 services are also responsible for the file system dependent part of
239 restoring the file attributes and data during a recovery operation.
240 This program runs as a daemon on the machine to be backed up, and in
241 some of the documentation, the File daemon is referred to as the
242 Client (for example in Bacula configuration file).
243
244 %description fd -l pl
245 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
246
247 Us³ugi Bacula File (inaczej program kliencki) to oprogramowanie, które
248 instaluje siê na maszynach, z których maj± byæ wykonywane kopie
249 zapasowe. S± one specyficzne dla systemu operacyjnego, pod którym
250 dzia³a dana maszyna i odpowiadaj± za dostarczanie atrybutów i danych
251 plików na ¿±danie Directora. Us³ugi plikowe s± tak¿e odpowiedzialne za
252 zale¿n± od systemu plików czê¶æ odzyskiwania atrybutów i danych plików
253 podczas operacji odzyskiwania danych. Program dzia³a jako demon na
254 maszynie, która ma byæ backupowana i w czê¶ci dokumentacji demon ten
255 (File) jest nazywany klientem (na przyk³ad w pliku konfiguracyjnym
256 Baculi).
257
258 %package sd
259 Summary:        Bacula Storage services
260 Summary(pl):    Us³ugi Bacula Storage
261 Group:          Networking/Utilities
262 PreReq:         bacula-common = %{epoch}:%{version}-%{release}
263 Requires(post): sed >= 4.0
264
265 %description sd
266 Bacula - It comes by night and sucks the vital essence from your
267 computers.
268
269 Bacula Storage services consist of the software programs that perform
270 the storage and recovery of the file attributes and data to the
271 physical backup media or volumes. In other words, the Storage daemon
272 is responsible for reading and writing your tapes (or other storage
273 media, e.g. files). The Storage services runs as a daemon on the
274 machine that has the backup device (usually a tape drive).
275
276 %description sd -l pl
277 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
278
279 Us³ugi Bacula Storage sk³adaj± siê z programów obs³uguj±cych
280 przechowywanie danych oraz odzyskiwanie atrybutów i danych na
281 fizycznych no¶nikach lub wolumenach. Innymi s³owy, demon Storage jest
282 odpowiedzialny za odczyt i zapis ta¶m (lub innych no¶ników do
283 przechowywania danych, np. plików). Us³ugi Storage dzia³aj± jako demon
284 na maszynie, która zawiera urz±dzenie backupowe (zwykle napêd
285 ta¶mowy).
286
287 %package rescue
288 Summary:        Bacula - The Network Backup Solution
289 Summary(pl):    Bacula - rozwi±zanie do wykonywania kopii zapasowych po sieci
290 Group:          Networking/Utilities
291 Requires:       %{name}-fd = %{epoch}:%{version}-%{release}
292 Requires:       coreutils
293 Requires:       util-linux
294
295 %description rescue
296 Bacula - It comes by night and sucks the vital essence from your
297 computers.
298
299 Bacula is a set of computer programs that permit you (or the system
300 administrator) to manage backup, recovery, and verification of
301 computer data across a network of computers of different kinds. In
302 technical terms, it is a network client/server based backup program.
303 Bacula is relatively easy to use and efficient, while offering many
304 advanced storage management features that make it easy to find and
305 recover lost or damaged files.
306
307 This package installs scripts for disaster recovery and builds rescue
308 floppy disk for bare metal recovery. 
309
310 To make the bacula rescue disk run "./make_rescue_disk --copy-static-bacula
311 - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To recreate the
312 rescue information for this system run ./getdiskinfo again.
313
314 %description rescue -l pl
315 Bacula - przychodzi noc± i wysysa ¿ywotny ekstrakt z komputerów.
316
317 Bacula to zbiór programów umo¿liwiaj±cych administratorowi na
318 zarz±dzanie kopiami zapasowymi, odzyskiwaniem i weryfikacj± danych
319 w sieci komputerów ró¿nego rodzaju. W terminologii technicznej jest to
320 program do kopii zapasowych pracuj±cy w architekturze klient-serwer.
321 Bacula jest stosunkowo ³atwa w u¿yciu i wydajna, oferuj±c przy tym
322 wiele zaawansowanych mo¿liwo¶ci przy zarz±dzaniu no¶nikami,
323 u³atwiaj±cych znalezienie i odzyskanie utraconych lub uszkodzonych
324 plików.
325
326 Ten pakiet zawiera skrypty do odtwarzania po awarii i tworzy dyskietkê
327 ratunkowe do odtwarzania systemu od zera. 
328
329 Aby stworzyæ dyskietkê ratunkow± Baculi, nale¿y uruchomiæ "./make_rescue_disk
330 --copy-static-bacula - --copy-etc-files" z katalogu
331 %{_sysconfdir}/rescue . Aby ponownie utworzyæ informacje ratunkowe dla
332 danego systemu, nale¿y ponownie uruchomiæ ./getdiskinfo .
333
334 %prep
335 %setup -q -a 1
336 sed -i -e 's#wx-config#wxgtk2-2.4-config#g' configure*
337 sed -i -e 's#-lreadline -ltermcap#-lreadline#g' configure*
338 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
339         src/cats/create_* src/cats/delete_* src/cats/drop_* \
340         src/cats/grant_* src/cats/make_* src/cats/update_*
341 sed -i -e 's/@hostname@/--hostname--/' src/*/*.conf.in
342
343 %build
344 cp -f %{_datadir}/automake/config.sub autoconf
345 CPPFLAGS="-I%{_includedir}/ncurses -I%{_includedir}/readline"
346 %configure \
347         --with-scriptdir=%{_libexecdir}/%{name} \
348         --enable-gnome \
349         --disable-conio \
350         --enable-smartalloc \
351         --enable-wx-console \
352         --enable-tray-monitor \
353         --with-readline \
354         --with-tcp-wrappers \
355         --with-working-dir=%{_var}/lib/%{name} \
356         --with-dump-email="root@localhost" \
357         --with-job-email="root@localhost" \
358         --with-smtp-host=localhost \
359         --with-pid-dir=/var/run \
360         --with-subsys-dir=/var/lock/subsys \
361         --with-sqlite \
362         --with-dir-password="#FAKE-dir-password#" \
363         --with-fd-password="#FAKE-fd-password#" \
364         --with-sd-password="#FAKE-sd-password#" \
365         --with-mon-dir-password="#FAKE-mon-dir-password#" \
366         --with-mon-fd-password="#FAKE-mon-fd-password#" \
367         --with-mon-sd-password="#FAKE-mon-sd-password#" \
368         --enable-static-fd
369
370 %{__make}
371
372 %install
373 rm -rf $RPM_BUILD_ROOT
374
375 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
376 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
377 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir}}
378
379 %{__make} install \
380         DESTDIR=$RPM_BUILD_ROOT
381
382 # static daemon
383 strip -R.comment -R.note src/filed/static-bacula-fd
384 install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd
385
386 # tray-monitor is for regular users
387 mv $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor $RPM_BUILD_ROOT%{_bindir}
388
389 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
390 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
391 install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
392 install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
393 install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
394 install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
395 install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
396
397 install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
398 install src/tray-monitor/generic.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/bacula-tray-monitor.xpm
399 install scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT%{_desktopdir}/bacula.desktop
400 sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
401         scripts/bacula.desktop.gnome2 > $RPM_BUILD_ROOT%{_desktopdir}/bacula-wx.desktop
402 sed -e 's#%{_sbindir}#%{_bindir}#' \
403         scripts/bacula-tray-monitor.desktop > $RPM_BUILD_ROOT%{_desktopdir}/bacula-tray-monitor.desktop
404
405 # install the rescue stuff, these are the rescue scripts
406 install rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue
407 install rescue/linux/floppy/*_* $RPM_BUILD_ROOT%{_sysconfdir}/rescue
408 install rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
409 install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
410
411 # install the updatedb scripts
412 install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
413
414 # manual
415 cp -a man1 man8 $RPM_BUILD_ROOT%{_mandir}
416
417 install -d html-manual
418 cp -a doc/html-manual/*.{html,jpg,gif,css,png,txt} html-manual
419
420
421 # place for site passwords
422 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
423 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
424
425 # some file changes
426 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
427 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
428 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gnome*
429 touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
430
431 %clean
432 rm -rf $RPM_BUILD_ROOT
433
434 %pre common
435 if [ -n "`getgid bacula`" ]; then
436         if [ "`getgid bacula`" != "136" ]; then
437                 echo "Error: group bacula doesn't have gid=136. Correct this before installing bacula." 1>&2
438                 exit 1
439         fi
440 else
441         /usr/sbin/groupadd -g 136 -r -f bacula
442 fi
443 if [ -n "`id -u bacula 2>/dev/null`" ]; then
444         if [ "`id -u bacula`" != "136" ]; then
445                 echo "Error: user bacula doesn't have uid=136. Correct this before installing bacula." 1>&2
446                 exit 1
447         fi
448 else
449         /usr/sbin/useradd -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula 1>&2
450 fi
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 ; do
461                 [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || :
462         done
463 done
464 for cf in *.conf ; 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
509 done
510 sed -i -e"s:--hostname--:`hostname`:" *.conf
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
533 done
534 sed -i -e"s:--hostname--:`hostname`:" *.conf
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
557 done
558 sed -i -e"s:--hostname--:`hostname`:" *.conf
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
586 done
587 sed -i -e"s:--hostname--:`hostname`:" *.conf
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
595 done
596 sed -i -e"s:--hostname--:`hostname`:" *.conf
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
604 done
605 sed -i -e"s:--hostname--:`hostname`:" *.conf
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
613 done
614 sed -i -e"s:--hostname--:`hostname`:" *.conf
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.gdb
646 %attr(770,root,bacula) %dir %{_localstatedir}
647
648 %files dir
649 %defattr(644,root,root,755)
650 %doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
651 %doc doc/*.pdf html-manual examples
652 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-dir.conf
653 %ghost %{_sysconfdir}/.pw.sed
654 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
655 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
656 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/bacula-dir
657 %attr(755,root,root) %{_sbindir}/bacula-dir
658 %attr(755,root,root) %{_sbindir}/dbcheck
659 %{_mandir}/man8/bacula-dir.8*
660 %{_mandir}/man1/dbcheck.1*
661 %{_libexecdir}/%{name}/query.sql
662 %defattr(755,root,root)
663 %{_libexecdir}/%{name}/create_sqlite_database
664 %{_libexecdir}/%{name}/drop_sqlite_database
665 %{_libexecdir}/%{name}/drop_sqlite_tables
666 %{_libexecdir}/%{name}/grant_sqlite_privileges
667 %{_libexecdir}/%{name}/make_sqlite_tables
668 %{_libexecdir}/%{name}/update_sqlite_tables*
669 %{_libexecdir}/%{name}/create_bacula_database
670 %{_libexecdir}/%{name}/drop_bacula_database
671 %{_libexecdir}/%{name}/drop_bacula_tables
672 %{_libexecdir}/%{name}/grant_bacula_privileges
673 %{_libexecdir}/%{name}/make_bacula_tables
674 %{_libexecdir}/%{name}/update_bacula_tables
675 %{_libexecdir}/%{name}/make_catalog_backup
676 %{_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
743 %files rescue
744 %doc LICENSE
745 %defattr(644,root,root,755)
746 %dir %{_sysconfdir}/rescue
747 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/backup.etc.list
748 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/bacula-fd
749 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/format_floppy
750 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/getdiskinfo
751 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/make_rescue_disk
752 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/restore_bacula
753 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/restore_etc
754 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/run_grub
755 %attr(755,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/run_lilo
756 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rescue/sfdisk.bz2
This page took 0.096821 seconds and 4 git commands to generate.