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