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