]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/redhat/bacula.spec.in
Bug 183 fixes.
[bacula/bacula] / bacula / platforms / redhat / bacula.spec.in
1 # Platform Build Configuration
2
3 # basic defines for every build
4 %define depkgs ../depkgs
5 %define depkgs_version 29Oct04
6 %define tomsrtbt tomsrtbt-2.0.103
7 %define sqlite_bindir /usr/lib/sqlite
8 %define working_dir /var/bacula
9 %define daemon_user root
10 %define daemon_group bacula
11 %define group_file /etc/group
12 %define groupadd /usr/sbin/groupadd
13
14 # platform defines - set one below or define the build_xxx on the command line
15 # RedHat builds
16 %define rh7 0
17 %{?build_rh7:%define rh7 1}
18 %define rh8 0
19 %{?build_rh8:%define rh8 1}
20 %define rh9 0
21 %{?build_rh9:%define rh9 1}
22 # Fedora Core 1 build
23 %define fc1 0
24 %{?build_fc1:%define fc1 1}
25 # Whitebox Enterprise build
26 # this should also work for RHEL
27 %define wb3 0
28 %{?build_wb3:%define wb3 1}
29 # SuSE build
30 # this is known to build on SuSE 8.2 and 9.0
31 %define su9 0
32 %{?build_su9:%define su9 1}
33 # Mandrake build
34 %define mdk 0
35 %{?build_mdk:%define mdk 1}
36
37 # test for a platform definition
38 %if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{wb3} && ! %{su9} && ! %{mdk}
39 %{error: You must specify a platform. Please examine the spec file.}
40 exit 1
41 %endif
42
43 # database defines
44 # set for database support desired or define the build_xxx on the command line
45 %define mysql 0
46 %{?build_mysql:%define mysql 1}
47 %define sqlite 0
48 %{?build_sqlite:%define sqlite 1}
49 %define postgresql 0
50 %{?build_postgresql:%define postgresql 1}
51
52 # test for a database definition
53 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql}
54 %{error: You must specify database support. Please examine the spec file.}
55 exit 1
56 %endif
57
58 Summary: Bacula - The Network Backup Solution
59 Name: bacula
60 Version: @VERSION@
61 Release: 1
62 Group: System Environment/Daemons
63 Copyright: GPL v2
64 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
65 Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
66 Source2:http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/%{tomsrtbt}.tar.gz
67 Source3: Release_Notes-%{version}-%{release}.tar.gz
68 BuildRoot: %{_tmppath}/%{name}-root
69 URL: http://www.bacula.org/
70 Vendor: The Bacula Team
71 Distribution: The Bacula Team
72 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
73 BuildRequires: readline-devel, atk-devel, ncurses-devel, pango-devel
74 BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel, pkgconfig
75 %if %{rh7}
76 BuildRequires: libtermcap-devel
77 BuildRequires: gtk+-devel >= 1.2
78 BuildRequires: gnome-libs-devel >= 1.4
79 BuildRequires: glibc-devel >= 2.2
80 BuildRequires: ORBit-devel
81 BuildRequires: bonobo-devel
82 BuildRequires: GConf-devel
83 BuildRequires: freetype-devel
84 %endif
85 %if %{su9}
86 BuildRequires: termcap
87 BuildRequires: libgnome >= 2.0
88 BuildRequires: gtk2-devel >= 2.0
89 BuildRequires: libgnomeui-devel >= 2.0
90 BuildRequires: glibc-devel >= 2.3
91 BuildRequires: ORBit2-devel
92 BuildRequires: libart_lgpl-devel >= 2.0
93 BuildRequires: libbonobo-devel >= 2.0
94 BuildRequires: libbonoboui-devel >= 2.0
95 BuildRequires: bonobo-activation-devel
96 BuildRequires: gconf2-devel
97 BuildRequires: linc-devel
98 BuildRequires: freetype2-devel
99 %endif
100 %if %{mdk}
101 BuildRequires: libtermcap-devel
102 BuildRequires: gtk2-devel >= 2.0
103 BuildRequires: libgnomeui2-devel >= 2.0
104 BuildRequires: glibc-devel >= 2.3
105 BuildRequires: libORBit2-devel
106 BuildRequires: libart_lgpl-devel >= 2.0
107 BuildRequires: libbonobo2_0-devel
108 BuildRequires: libbonoboui2_0-devel
109 BuildRequires: libbonobo-activation-devel
110 BuildRequires: libGConf2-devel
111 BuildRequires: libstdc++-static-devel
112 BuildRequires: glibc-static-devel
113 BuildRequires: freetype2-devel
114 %endif
115 %if ! %{rh7} && ! %{su9} && ! %{mdk}
116 BuildRequires: libtermcap-devel
117 BuildRequires: gtk2-devel >= 2.0
118 BuildRequires: libgnomeui-devel >= 2.0
119 BuildRequires: glibc-devel >= 2.3
120 BuildRequires: ORBit2-devel
121 BuildRequires: libart_lgpl-devel >= 2.0
122 BuildRequires: libbonobo-devel >= 2.0
123 BuildRequires: libbonoboui-devel >= 2.0
124 BuildRequires: bonobo-activation-devel
125 BuildRequires: GConf2-devel
126 BuildRequires: linc-devel
127 BuildRequires: freetype-devel
128 %endif
129
130 %if %{mysql}
131 BuildRequires: mysql-devel >= 3.23
132 %endif
133
134 %if %{postgresql} && %{wb3}
135 BuildRequires: rh-postgresql-devel >= 7
136 %endif
137
138 %if %{postgresql} && ! %{wb3}
139 BuildRequires: postgresql-devel >= 7
140 %endif
141
142 %description
143 Bacula - It comes by night and sucks the vital essence from your computers.
144
145 Bacula is a set of computer programs that permit you (or the system 
146 administrator) to manage backup, recovery, and verification of computer 
147 data across a network of computers of different kinds. In technical terms, 
148 it is a network client/server based backup program. Bacula is relatively 
149 easy to use and efficient, while offering many advanced storage management 
150 features that make it easy to find and recover lost or damaged files. 
151 Bacula source code has been released under the GPL version 2 license.
152
153 %if %{mysql}
154 %package mysql
155 %endif
156 %if %{sqlite}
157 %package sqlite
158 %endif
159 %if %{postgresql}
160 %package postgresql
161 %endif
162
163 Summary: Bacula - The Network Backup Solution
164 Group: System Environment/Daemons
165 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
166 Conflicts: bacula-client
167 Requires: readline, ncurses, libstdc++, zlib
168 %if %{sqlite}
169 Conflicts: sqlite, sqlite-tools
170 %endif
171 %if %{rh7}
172 Requires: glibc >= 2.2
173 Requires: libtermcap
174 %endif
175 %if %{su9}
176 Requires: glibc >= 2.3
177 Requires: termcap
178 %endif
179 %if ! %{rh7} && ! %{su9}
180 Requires: glibc >= 2.3
181 Requires: libtermcap
182 %endif
183 %if %{mysql} && ! %{su9} && ! %{mdk}
184 Requires: mysql >= 3.23
185 Requires: mysql-server >= 3.23
186 %endif
187 %if %{mysql} && %{su9}
188 Requires: mysql >= 3.23
189 Requires: mysql-client >= 3.23
190 %endif
191 %if %{mysql} && %{mdk}
192 Requires: mysql >= 3.23
193 Requires: mysql-client >= 3.23
194 %endif
195 %if %{postgresql} && %{wb3}
196 Requires: rh-postgresql >= 7
197 Requires: rh-postgresql-server >= 7
198 %endif
199 %if %{postgresql} && ! %{wb3}
200 Requires: postgresql >= 7
201 Requires: postgresql-server >= 7
202 %endif
203
204 %if %{mysql}
205 %description mysql
206 %endif
207 %if %{sqlite}
208 %description sqlite
209 %endif
210 %if %{postgresql}
211 %description postgresql
212 %endif
213
214 Bacula - It comes by night and sucks the vital essence from your computers.
215
216 Bacula is a set of computer programs that permit you (or the system 
217 administrator) to manage backup, recovery, and verification of computer 
218 data across a network of computers of different kinds. In technical terms, 
219 it is a network client/server based backup program. Bacula is relatively 
220 easy to use and efficient, while offering many advanced storage management 
221 features that make it easy to find and recover lost or damaged files. 
222 Bacula source code has been released under the GPL version 2 license.
223
224 %if %{mysql}
225 This build requires MySQL to be installed separately as the catalog database.
226 %endif
227 %if %{postgresql}
228 This build requires PostgreSQL to be installed separately as the catalog database.
229 %endif
230 %if %{sqlite}
231 This build incorporates sqlite as the catalog database, statically compiled.
232 %endif
233
234 %package client
235 Summary: Bacula - The Network Backup Solution
236 Group: System Environment/Daemons
237 Provides: bacula-fd
238 Requires: readline, libstdc++, zlib
239
240 %if %{rh7}
241 Requires: glibc >= 2.2
242 Requires: libtermcap
243 %endif
244 %if %{su9}
245 Requires: glibc >= 2.3
246 Requires: termcap
247 %endif
248 %if ! %{rh7} && ! %{su9}
249 Requires: glibc >= 2.3
250 Requires: libtermcap
251 %endif
252
253 %description client
254 Bacula - It comes by night and sucks the vital essence from your computers.
255
256 Bacula is a set of computer programs that permit you (or the system 
257 administrator) to manage backup, recovery, and verification of computer 
258 data across a network of computers of different kinds. In technical terms, 
259 it is a network client/server based backup program. Bacula is relatively 
260 easy to use and efficient, while offering many advanced storage management 
261 features that make it easy to find and recover lost or damaged files. 
262 Bacula source code has been released under the GPL version 2 license.
263
264 This is the File daemon (Client) only package. It includes the command line 
265 console program.
266
267 %package rescue
268
269 Summary: Bacula - The Network Backup Solution
270 Group: System Environment/Daemons
271 Requires: coreutils, util-linux, bacula-fd, cdrecord, mkisofs, make
272
273 %description rescue
274 Bacula - It comes by night and sucks the vital essence from your computers.
275
276 Bacula is a set of computer programs that permit you (or the system 
277 administrator) to manage backup, recovery, and verification of computer 
278 data across a network of computers of different kinds. In technical terms, 
279 it is a network client/server based backup program. Bacula is relatively 
280 easy to use and efficient, while offering many advanced storage management 
281 features that make it easy to find and recover lost or damaged files. 
282 Bacula source code has been released under the GPL version 2 license.
283
284 This package installs scripts for disaster recovery and builds rescue 
285 floppy disks and cdroms for bare metal recovery. This package includes tomsrtbt
286 (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool
287 to build a boot floppy disk.
288
289 You need to have the bacula-sqlite, bacula-mysql, bacula-postgresql or 
290 bacula-client package for your platform installed and configured before 
291 installing this package.
292
293 To create a floppy boot disk run "./getdiskinfo" from the /etc/bacula/rescue/floppy
294 directory (this is done when the package is first installed), 
295 then run "./install.s" from the /etc/bacula/rescue/floppy/tomsrtbt/
296 directory. To make the bacula rescue disk run
297 "./make_rescue_disk --copy-static-bacula --copy-etc-files"
298 from the /etc/bacula/rescue/floppy directory. To recreate the rescue
299 information for this system run ./getdiskinfo again.
300
301 To create a rescue cdrom run "make all" from the /etc/bacula/rescue/cdrom
302 directory which will create an iso image file. You can burn that image with your
303 favorite cd burning utility or run "make burn" after examining and possibly
304 adjusting /etc/bacula/rescue/cdrom/Makefile.  To recreate the rescue
305 information for this system run /etc/bacula/rescue/cdrom/bacula/getdiskinfo again.
306
307 %package updatedb
308
309 Summary: Bacula - The Network Backup Solution
310 Group: System Environment/Daemons
311
312 %description updatedb
313 Bacula - It comes by night and sucks the vital essence from your computers.
314
315 Bacula is a set of computer programs that permit you (or the system 
316 administrator) to manage backup, recovery, and verification of computer 
317 data across a network of computers of different kinds. In technical terms, 
318 it is a network client/server based backup program. Bacula is relatively 
319 easy to use and efficient, while offering many advanced storage management 
320 features that make it easy to find and recover lost or damaged files. 
321 Bacula source code has been released under the GPL version 2 license.
322
323 This package installs scripts for updating older versions of the bacula
324 database.
325
326 %package gconsole
327 Summary: Bacula - The Network Backup Solution
328 Group: System Environment/Daemons
329 Requires: readline, atk, libstdc++, zlib, pango, libxml2, bacula-fd
330
331 %if %{rh7}
332 Requires: gtk+ >= 1.2
333 Requires: gnome-libs >= 1.4
334 Requires: glibc >= 2.2
335 Requires: ORBit
336 Requires: bonobo
337 Requires: GConf
338 Requires: freetype
339 %endif
340 %if %{su9}
341 Requires: gtk2 >= 2.0
342 Requires: libgnome >= 2.0
343 Requires: libgnomeui >= 2.0
344 Requires: glibc >= 2.3
345 Requires: ORBit2
346 Requires: libart_lgpl >= 2.0
347 Requires: libbonobo >= 2.0
348 Requires: libbonoboui >= 2.0
349 Requires: bonobo-activation
350 Requires: gconf2
351 Requires: linc
352 Requires: freetype2
353 %endif
354 %if %{mdk}
355 Requires: gtk2 >= 2.0
356 Requires: libgnomeui2
357 Requires: glibc >= 2.3
358 Requires: ORBit2
359 Requires: libart_lgpl >= 2.0
360 Requires: libbonobo >= 2.0
361 Requires: libbonoboui >= 2.0
362 Requires: GConf2
363 Requires: freetype2
364 %endif
365 %if ! %{rh7} && ! %{su9} && ! %{mdk}
366 Requires: gtk2 >= 2.0
367 Requires: libgnomeui >= 2.0
368 Requires: glibc >= 2.3
369 Requires: ORBit2
370 Requires: libart_lgpl >= 2.0
371 Requires: libbonobo >= 2.0
372 Requires: libbonoboui >= 2.0
373 Requires: bonobo-activation
374 Requires: GConf2
375 Requires: linc
376 Requires: freetype
377 %endif
378 %if %{su9}
379 Requires: xsu
380 %else
381 Requires: usermode
382 %endif
383
384 %description gconsole
385 Bacula - It comes by night and sucks the vital essence from your computers.
386
387 Bacula is a set of computer programs that permit you (or the system 
388 administrator) to manage backup, recovery, and verification of computer 
389 data across a network of computers of different kinds. In technical terms, 
390 it is a network client/server based backup program. Bacula is relatively 
391 easy to use and efficient, while offering many advanced storage management 
392 features that make it easy to find and recover lost or damaged files. 
393 Bacula source code has been released under the GPL version 2 license.
394
395 This is the Gnome Console package. It is an add-on to the client or
396 server packages.
397
398 %prep
399
400 %setup
401 %setup -T -D -b 1
402 %setup -T -D -b 2
403 %setup -T -D -b 3
404
405 %build
406
407 %if %{su9}
408 export LDFLAGS="-L/usr/lib/termcap"
409 %endif
410
411 cwd=${PWD}
412 cd %{depkgs}
413 %if %{sqlite}
414 make sqlite
415 %endif
416 make mtx
417 cd ${cwd}
418
419 # patches for the bundled sqlite scripts
420
421 # patch the make_sqlite_tables script for installation bindir
422 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
423
424 # patch the create_sqlite_database script for installation bindir
425 patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
426
427 # patch the make_catalog_backup script for installation bindir
428 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
429
430 # patch the update_sqlite_tables script for installation bindir
431 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
432
433 # patch the bacula-dir init script to remove sqlite service
434 %if %{sqlite} && %{su9}
435 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
436 %endif
437
438 %configure \
439         --prefix=/usr \
440         --sbindir=/usr/sbin \
441         --sysconfdir=/etc/bacula \
442         --with-scriptdir=/etc/bacula \
443         --enable-smartalloc \
444         --enable-gnome \
445         --enable-static-fd \
446 %if ! %{rh7} && ! %{rh8}
447         --enable-tray-monitor \
448 %endif
449 %if %{mysql}
450         --with-mysql \
451 %endif
452 %if %{sqlite}
453         --with-sqlite=${cwd}/%{depkgs}/sqlite \
454 %endif
455 %if %{postgresql}
456         --with-postgresql \
457 %endif
458         --with-working-dir=%{working_dir} \
459         --with-pid-dir=/var/run \
460         --with-subsys-dir=/var/lock/subsys \
461         --with-dir-user=%{daemon_user} \
462         --with-dir-group=%{daemon_group} \
463         --with-sd-user=%{daemon_user} \
464         --with-sd-group=%{daemon_group} \
465         --with-fd-user=%{daemon_user} \
466         --with-fd-group=%{daemon_group}
467 make
468
469 cd src/filed
470 strip static-bacula-fd
471 cd ../../
472
473 %install
474  
475 cwd=${PWD}
476 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
477 mkdir -p $RPM_BUILD_ROOT/etc/init.d
478 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
479 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
480 %if %{rh7}
481 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
482 %else
483 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
484 %endif
485 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/floppy
486 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/tomsrtbt
487 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/cdrom
488 mkdir -p $RPM_BUILD_ROOT/etc/bacula/updatedb
489 %if ! %{su9}
490 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
491 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
492 mkdir -p $RPM_BUILD_ROOT/usr/bin
493 %endif
494
495 %if %{sqlite}
496 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
497 %endif
498
499 make \
500         prefix=$RPM_BUILD_ROOT/usr \
501         sbindir=$RPM_BUILD_ROOT/usr/sbin \
502         sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
503         scriptdir=$RPM_BUILD_ROOT/etc/bacula \
504         working_dir=$RPM_BUILD_ROOT%{working_dir} \
505         install
506
507 cd %{depkgs}
508 make \
509         prefix=$RPM_BUILD_ROOT/usr \
510         sbindir=$RPM_BUILD_ROOT/usr/sbin \
511         sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
512         working_dir=$RPM_BUILD_ROOT%{working_dir} \
513         mandir=$RPM_BUILD_ROOT/usr/man \
514         mtx-install
515 cd ${cwd}
516
517 # setup the manual for the doc dir and correct some broken CVS permissions
518 mkdir html-manual
519 cp -p doc/html-manual/*.html html-manual/
520 cp -p doc/html-manual/*.jpg html-manual/
521 cp -p doc/html-manual/*.gif html-manual/
522 cp -p doc/html-manual/*.css html-manual/
523 chmod 644 html-manual/*
524 chmod 644 doc/bacula.pdf
525
526 # fixme - make installs the mysql scripts for sqlite build
527 %if %{sqlite}
528 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
529 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
530 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
531 %endif
532
533 # fixme - make installs the mysql scripts for postgresql build
534 %if %{postgresql}
535 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
536 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
537 %endif
538
539 # install the init scripts
540 %if %{su9}
541 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
542 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
543 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
544 %endif
545 %if %{mdk}
546 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
547 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
548 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
549 %endif
550 %if ! %{su9} && ! %{mdk}
551 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
552 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
553 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
554 %endif
555 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
556
557 # install the menu stuff
558 %if %{su9}
559 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
560 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
561 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
562 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
563 %endif
564 %if %{rh7}
565 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
566 cp -p scripts/bacula.desktop.gnome1.consolehelper $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
567 cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console
568 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console
569 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console
570 %endif
571 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{mdk}
572 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
573 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
574 cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console
575 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console
576 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console
577 %endif
578 %if ! %{rh7} && ! %{rh8}
579 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
580 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
581 %endif
582
583 # install sqlite
584 %if %{sqlite}
585 cp -p %{depkgs}/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
586 cp -p %{depkgs}/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
587 cp -p %{depkgs}/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
588 %endif
589
590 # install the logrotate file
591 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
592
593 # install the rescue stuff
594 # these are the floppy rescue scripts
595 cp -p rescue/linux/floppy/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/
596 cp -p rescue/linux/floppy/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/
597 cp -p rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/
598 cp -p rescue/linux/floppy/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/
599 cp -p rescue/linux/floppy/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/
600 cp -p rescue/linux/floppy/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/
601 cp -p rescue/linux/floppy/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/
602 cp -p rescue/linux/floppy/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/
603 cp -p rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/
604
605 # this is the cdrom rescue stuff
606 cp -r -p rescue/linux/cdrom/* $RPM_BUILD_ROOT/etc/bacula/rescue/cdrom/
607 mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/cdrom/bin/
608 rm -f $RPM_BUILD_ROOT/etc/bacula/rescue/cdrom/Makefile.in
609 rm -f $RPM_BUILD_ROOT/etc/bacula/rescue/cdrom/bacula/Makefile.in
610 touch $RPM_BUILD_ROOT/etc/bacula/rescue/cdrom/rpm_release
611
612 # this is the static file daemon
613 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/bacula-fd
614 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/cdrom/bin/bacula-fd
615
616 # this is the tom's root boot disk
617 cp -p ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/floppy/tomsrtbt/
618
619 # install the updatedb scripts
620 cp -p updatedb/* $RPM_BUILD_ROOT/etc/bacula/updatedb/
621
622 # now clean up permissions that are left broken by the install
623 chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
624 chmod o-rwx $RPM_BUILD_ROOT/var/bacula
625 %if ! %{rh7} && ! %{rh8}
626 chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
627 chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf
628 %endif
629
630 %clean
631 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
632
633 %if %{mysql}
634
635 %files mysql
636 %defattr(-,root,root)
637
638 /etc/bacula/bacula
639 /etc/bacula/bconsole
640 /etc/bacula/create_mysql_database
641 /etc/bacula/drop_mysql_database
642 /etc/bacula/make_mysql_tables
643 /etc/bacula/drop_mysql_tables
644 /etc/bacula/update_mysql_tables
645 /etc/bacula/grant_mysql_privileges
646 /etc/bacula/create_bacula_database
647 /etc/bacula/drop_bacula_database
648 /etc/bacula/grant_bacula_privileges
649 /etc/bacula/make_bacula_tables
650 /etc/bacula/drop_bacula_tables
651 /etc/bacula/update_bacula_tables
652 /etc/bacula/make_catalog_backup
653 /etc/bacula/delete_catalog_backup
654 /etc/bacula/startmysql
655 /etc/bacula/stopmysql
656 /etc/bacula/mtx-changer
657 /etc/bacula/btraceback.dbx
658 /etc/bacula/btraceback.gdb
659 /etc/init.d/bacula-dir
660 /etc/init.d/bacula-fd
661 /etc/init.d/bacula-sd
662
663 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
664 /usr/man/man1/*
665
666 /etc/logrotate.d/bacula
667
668 %config(noreplace) /etc/bacula/bacula-dir.conf
669 %config(noreplace) /etc/bacula/bacula-fd.conf
670 %config(noreplace) /etc/bacula/bacula-sd.conf
671 %config(noreplace) /etc/bacula/bconsole.conf
672 /etc/bacula/query.sql
673 %dir %{working_dir}
674
675 /usr/sbin/bacula-dir
676 /usr/sbin/bacula-fd
677 /usr/sbin/bacula-sd
678 /usr/sbin/bcopy
679 /usr/sbin/bextract
680 /usr/sbin/bls
681 /usr/sbin/bscan
682 /usr/sbin/btape
683 /usr/sbin/btraceback
684 /usr/sbin/bconsole
685 /usr/sbin/dbcheck
686 /usr/sbin/loaderinfo
687 /usr/sbin/mtx
688 /usr/sbin/scsitape
689 /usr/sbin/bsmtp
690 /usr/sbin/tapeinfo
691 /usr/sbin/static-bacula-fd
692
693 %pre mysql
694 # test for bacula database older than version 7
695 # note: this ASSUMES no password has been set for bacula database
696 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
697
698 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then
699         echo "This bacula upgrade will update a bacula database from version 7 to 8."
700         echo "You appear to be running database version $DB_VER. You must first update"
701         echo "your database to version 7 and then install this upgrade. The alternative"
702         echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current"
703         echo "catalog information, then do the upgrade. Information on updating a"
704         echo "database older than version 7 can be found in the release notes."
705         exit 1
706 fi
707 # check for and copy /etc/bacula/console.conf to bconsole.conf
708 if [ -s /etc/bacula/console.conf ];then
709         cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
710 fi
711
712 %post mysql
713
714 # add our links
715 if [ "$1" -ge 1 ] ; then
716 /sbin/chkconfig --add bacula-dir
717 /sbin/chkconfig --add bacula-fd
718 /sbin/chkconfig --add bacula-sd
719 fi
720
721 # test for an existing database
722 # note: this ASSUMES no password has been set for bacula database
723 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
724
725 # grant privileges and create tables if they do not exist
726 if [ -z "$DB_VER" ]; then
727         echo "Hmm, doesn't look like you have an existing database."
728         echo "Granting privileges for MySQL user bacula..."
729         /etc/bacula/grant_mysql_privileges
730         echo "Creating MySQL bacula database..."
731         /etc/bacula/create_mysql_database
732         echo "Creating bacula tables..."
733         /etc/bacula/make_mysql_tables
734
735 # check to see if we need to upgrade a 1.34 or lower database
736 elif [ "$DB_VER" -lt "8" ]; then
737         echo "This release requires an upgrade to your bacula database."
738         echo "Backing up your current database..."
739         mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
740         echo "Upgrading bacula database ..."
741         /etc/bacula/update_mysql_tables
742         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
743
744 fi
745
746 # create the daemon group
747 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
748 if [ -z $HAVE_BACULA ]; then
749         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
750         echo "The group %{daemon_group} has been added to %{groupfile}."
751         echo "See the manual chapter Running Bacula for details."
752 fi
753
754 %preun mysql
755 # delete our links
756 if [ $1 = 0 ]; then
757 /sbin/chkconfig --del bacula-dir
758 /sbin/chkconfig --del bacula-fd
759 /sbin/chkconfig --del bacula-sd
760 fi
761
762 %endif
763
764 %if %{sqlite}
765
766 %files sqlite
767 %defattr(-,root,root)
768
769 /etc/bacula/bacula
770 /etc/bacula/bconsole
771 /etc/bacula/create_bacula_database
772 /etc/bacula/drop_bacula_database
773 /etc/bacula/grant_bacula_privileges
774 /etc/bacula/make_bacula_tables
775 /etc/bacula/drop_bacula_tables
776 /etc/bacula/update_bacula_tables
777 /etc/bacula/create_sqlite_database
778 /etc/bacula/drop_sqlite_database
779 /etc/bacula/grant_sqlite_privileges
780 /etc/bacula/make_sqlite_tables
781 /etc/bacula/drop_sqlite_tables
782 /etc/bacula/update_sqlite_tables
783 /etc/bacula/make_catalog_backup
784 /etc/bacula/delete_catalog_backup
785 /etc/bacula/mtx-changer
786 /etc/bacula/btraceback.dbx
787 /etc/bacula/btraceback.gdb
788 /etc/init.d/bacula-dir
789 /etc/init.d/bacula-fd
790 /etc/init.d/bacula-sd
791
792 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
793 /usr/man/man1/*
794
795 /etc/logrotate.d/bacula
796
797 %config(noreplace) /etc/bacula/bacula-dir.conf
798 %config(noreplace) /etc/bacula/bacula-fd.conf
799 %config(noreplace) /etc/bacula/bacula-sd.conf
800 %config(noreplace) /etc/bacula/bconsole.conf
801 /etc/bacula/query.sql
802 %{sqlite_bindir}/libsqlite.a
803 %{sqlite_bindir}/sqlite.h
804 %dir %{working_dir}
805
806 /usr/sbin/bacula-dir
807 /usr/sbin/bacula-fd
808 /usr/sbin/bacula-sd
809 /usr/sbin/bcopy
810 /usr/sbin/bextract
811 /usr/sbin/bls
812 /usr/sbin/bscan
813 /usr/sbin/btape
814 /usr/sbin/btraceback
815 /usr/sbin/bconsole
816 /usr/sbin/dbcheck
817 /usr/sbin/loaderinfo
818 /usr/sbin/mtx
819 /usr/sbin/scsitape
820 /usr/sbin/bsmtp
821 /usr/sbin/tapeinfo
822 /usr/sbin/static-bacula-fd
823 %{sqlite_bindir}/sqlite
824
825
826 %pre sqlite
827 # test for bacula database older than version 7
828 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
829         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
830         if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then
831                 echo "This bacula upgrade will update a bacula database from version 7 to 8."
832                 echo "You appear to be running database version $DB_VER. You must first update"
833                 echo "your database to version 7 and then install this upgrade. The alternative"
834                 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
835                 echo "catalog information, then do the upgrade. Information on updating a"
836                 echo "database older than version 7 can be found in the release notes."
837                 exit 1
838         fi
839 fi
840 # check for and copy /etc/bacula/console.conf to bconsole.conf
841 if [ -s /etc/bacula/console.conf ];then
842         cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
843 fi
844
845 %post sqlite
846 # add our links
847 if [ "$1" -ge 1 ] ; then
848 /sbin/chkconfig --add bacula-dir
849 /sbin/chkconfig --add bacula-fd
850 /sbin/chkconfig --add bacula-sd
851 fi
852
853 # test for an existing database
854 if [ -s %{working_dir}/bacula.db ]; then
855         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
856         # check to see if we need to upgrade a 1.34 or lower database
857         if [ "$DB_VER" -lt "7" ]; then
858                 echo "This bacula upgrade requires a database update to version 8. You appear to"
859                 echo "be running database version $DB_VER. You must update your database using the"
860                 echo "upgrade scripts in the bacula-updatedb package. The alternative"
861                 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
862                 echo "catalog information, then /etc/bacula/make_sqlite_tables. Information on updating a"
863                 echo "database older than version 7 can be found in the release notes."
864         fi      
865         
866         if [ "$DB_VER" -lt "8" ] && [ "$DB_VER" -ge "7" ]; then
867                 echo "This release requires an upgrade to your bacula database."
868                 echo "Backing up your current database..."
869                 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
870                 echo "Upgrading bacula database ..."
871                 /etc/bacula/update_sqlite_tables
872                 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
873         fi
874 else
875         # create the database and tables
876         echo "Hmm, doesn't look like you have an existing database."
877         echo "Creating SQLite database..."
878         /etc/bacula/create_sqlite_database
879         echo "Creating the SQLite tables..."
880         /etc/bacula/make_sqlite_tables
881 fi
882
883 # create the daemon group
884 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
885 if [ -z $HAVE_BACULA ]; then
886         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
887         echo "The group %{daemon_group} has been added to %{groupfile}."
888         echo "See the manual chapter Running Bacula for details."
889 fi
890
891 %preun sqlite
892 # delete our links
893 if [ $1 = 0 ]; then
894 /sbin/chkconfig --del bacula-dir
895 /sbin/chkconfig --del bacula-fd
896 /sbin/chkconfig --del bacula-sd
897 fi
898
899 %endif
900
901 %if %{postgresql}
902
903 %files postgresql
904 %defattr(-,root,root)
905
906 /etc/bacula/bacula
907 /etc/bacula/bconsole
908 /etc/bacula/create_postgresql_database
909 /etc/bacula/drop_postgresql_database
910 /etc/bacula/make_postgresql_tables
911 /etc/bacula/drop_postgresql_tables
912 /etc/bacula/update_postgresql_tables
913 /etc/bacula/grant_postgresql_privileges
914 /etc/bacula/create_bacula_database
915 /etc/bacula/drop_bacula_database
916 /etc/bacula/grant_bacula_privileges
917 /etc/bacula/make_bacula_tables
918 /etc/bacula/drop_bacula_tables
919 /etc/bacula/update_bacula_tables
920 /etc/bacula/make_catalog_backup
921 /etc/bacula/delete_catalog_backup
922 /etc/bacula/mtx-changer
923 /etc/bacula/btraceback.dbx
924 /etc/bacula/btraceback.gdb
925 /etc/init.d/bacula-dir
926 /etc/init.d/bacula-fd
927 /etc/init.d/bacula-sd
928
929 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
930 /usr/man/man1/*
931
932 /etc/logrotate.d/bacula
933
934 %config(noreplace) /etc/bacula/bacula-dir.conf
935 %config(noreplace) /etc/bacula/bacula-fd.conf
936 %config(noreplace) /etc/bacula/bacula-sd.conf
937 %config(noreplace) /etc/bacula/bconsole.conf
938 /etc/bacula/query.sql
939 %dir %{working_dir}
940
941 /usr/sbin/bacula-dir
942 /usr/sbin/bacula-fd
943 /usr/sbin/bacula-sd
944 /usr/sbin/bcopy
945 /usr/sbin/bextract
946 /usr/sbin/bls
947 /usr/sbin/bscan
948 /usr/sbin/btape
949 /usr/sbin/btraceback
950 /usr/sbin/bconsole
951 /usr/sbin/dbcheck
952 /usr/sbin/loaderinfo
953 /usr/sbin/mtx
954 /usr/sbin/scsitape
955 /usr/sbin/bsmtp
956 /usr/sbin/tapeinfo
957 /usr/sbin/static-bacula-fd
958
959 %pre postgresql
960 # test for bacula database older than version 7
961 # note: this ASSUMES no password has been set for bacula database
962 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
963
964 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "7" ]; then
965         echo "This bacula upgrade will update a bacula database from version 7 to 8."
966         echo "You appear to be running database version $DB_VER. You must first update"
967         echo "your database to version 7 and then install this upgrade. The alternative"
968         echo "is to use /etc/bacula/drop_postgresql_tables to delete all your your current"
969         echo "catalog information, then do the upgrade. Information on updating a"
970         echo "database older than version 7 can be found in the release notes."
971         exit 1
972 fi
973
974 %post postgresql
975 # add our links
976 if [ "$1" -ge 1 ] ; then
977 /sbin/chkconfig --add bacula-dir
978 /sbin/chkconfig --add bacula-fd
979 /sbin/chkconfig --add bacula-sd
980 fi
981
982 # test for an existing database
983 # note: this ASSUMES no password has been set for bacula database
984 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
985
986 # grant privileges and create tables if they do not exist
987 if [ -z "$DB_VER" ]; then
988         echo "Hmm, doesn't look like you have an existing database."
989         echo "Creating PostgreSQL bacula database..."
990         /etc/bacula/create_postgresql_database
991         echo "Creating bacula tables..."
992         /etc/bacula/make_postgresql_tables
993         echo "Granting privileges for PostgreSQL user bacula..."
994         /etc/bacula/grant_postgresql_privileges
995
996 # check to see if we need to upgrade a 1.34 or lower database
997 elif [ "$DB_VER" -lt "8" ]; then
998         echo "This release requires an upgrade to your bacula database."
999         echo "Backing up your current database..."
1000         pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1001         echo "Upgrading bacula database ..."
1002         /etc/bacula/update_postgresql_tables
1003         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1004         
1005 fi
1006
1007 # create the daemon group
1008 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1009 if [ -z $HAVE_BACULA ]; then
1010         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1011         echo "The group %{daemon_group} has been added to %{groupfile}."
1012         echo "See the manual chapter Running Bacula for details."
1013 fi
1014         
1015
1016 %preun postgresql
1017 # delete our links
1018 if [ $1 = 0 ]; then
1019 /sbin/chkconfig --del bacula-dir
1020 /sbin/chkconfig --del bacula-fd
1021 /sbin/chkconfig --del bacula-sd
1022 fi
1023
1024 %endif
1025
1026 %files client
1027 %defattr(-,root,root)
1028
1029 /etc/bacula/bconsole
1030 /etc/init.d/bacula-fd
1031
1032 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo doc/bacula.pdf html-manual ../Release_Notes-%{version}-%{release}.txt
1033 /etc/logrotate.d/bacula
1034
1035 %config(noreplace) /etc/bacula/bacula-fd.conf
1036 %config(noreplace) /etc/bacula/bconsole.conf
1037 %dir %{working_dir}
1038
1039 /usr/sbin/bacula-fd
1040 /usr/sbin/btraceback
1041 /etc/bacula/btraceback.gdb
1042 /etc/bacula/btraceback.dbx
1043 /usr/sbin/bsmtp
1044 /usr/sbin/bconsole
1045
1046
1047 %post client
1048 # add our link
1049 if [ "$1" -ge 1 ] ; then
1050 /sbin/chkconfig --add bacula-fd
1051 fi
1052
1053 # create the daemon group
1054 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
1055 if [ -z $HAVE_BACULA ]; then
1056         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1057         echo "The group %{daemon_group} has been added to %{groupfile}."
1058         echo "See the manual chapter Running Bacula for details."
1059 fi
1060
1061 %preun client
1062 # delete our link
1063 if [ $1 = 0 ]; then
1064 /sbin/chkconfig --del bacula-fd
1065 fi
1066
1067 %files rescue
1068 %defattr(-,root,root)
1069 /etc/bacula/rescue/floppy/*
1070 /etc/bacula/rescue/cdrom/*
1071
1072 %post rescue
1073 # link our current installed conf file to the rescue directory
1074 ln -s /etc/bacula/bacula-fd.conf /etc/bacula/rescue/floppy/bacula-fd.conf
1075 ln -s /etc/bacula/bacula-fd.conf /etc/bacula/rescue/cdrom/bin/bacula-fd.conf
1076
1077 # run getdiskinfo
1078 echo "Creating rescue files for this system..."
1079 cd /etc/bacula/rescue/floppy
1080 ./getdiskinfo
1081 cd /etc/bacula/rescue/cdrom/bacula
1082 ./getdiskinfo
1083
1084 %preun rescue
1085 # remove the files created after the initial rpm installation
1086 rm -f /etc/bacula/rescue/floppy/bacula-fd.conf
1087 rm -f /etc/bacula/rescue/floppy/partition.*
1088 rm -f /etc/bacula/rescue/floppy/format.*
1089 rm -f /etc/bacula/rescue/floppy/mount_drives
1090 rm -f /etc/bacula/rescue/floppy/start_network
1091 rm -f /etc/bacula/rescue/floppy/sfdisk
1092 rm -rf /etc/bacula/rescue/floppy/diskinfo/*
1093
1094 rm -f /etc/bacula/rescue/cdrom/bacula/bacula-fd.conf
1095 rm -f /etc/bacula/rescue/cdrom/bacula/partition.*
1096 rm -f /etc/bacula/rescue/cdrom/bacula/format.*
1097 rm -f /etc/bacula/rescue/cdrom/bacula/mount_drives
1098 rm -f /etc/bacula/rescue/cdrom/bacula/start_network
1099 rm -rf /etc/bacula/rescue/cdrom/bacula/diskinfo/*
1100
1101 %files updatedb
1102 %defattr(-,root,root)
1103 /etc/bacula/updatedb/*
1104
1105 %post updatedb
1106 echo "The database update scripts were installed to /etc/bacula/updatedb"
1107
1108 %files gconsole
1109 %defattr(-,root,root)
1110 /usr/sbin/gnome-console
1111 /etc/bacula/gconsole
1112 %config(noreplace) /etc/bacula/gnome-console.conf
1113 /usr/share/pixmaps/bacula.png
1114
1115 %if %{rh7}
1116 /usr/share/gnome/apps/System/bacula.desktop
1117 %else
1118 /usr/share/applications/bacula.desktop
1119 %endif
1120
1121 %if ! %{rh7} && ! %{rh8}
1122 /usr/sbin/bacula-tray-monitor
1123 /etc/bacula/tray-monitor.conf
1124 /usr/share/pixmaps/bacula-tray-monitor.xpm
1125 /usr/share/applications/bacula-tray-monitor.desktop
1126 %endif
1127
1128 %if ! %{su9} 
1129 # add the console helper files
1130 %config(noreplace,missingok) /etc/pam.d/gnome-console
1131 %config(noreplace,missingok) /etc/security/console.apps/gnome-console
1132 /usr/bin/gnome-console
1133 %endif
1134
1135
1136 %changelog
1137 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1138 - bug 183 fixes
1139 - thanks to Daniel Widyono
1140 - update description for rescue package to describe cdrom creation
1141 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1142 - update depkgs to 29Oct04
1143 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1144 - add cdrom rescue to bacula-rescue package
1145 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1146 - misc fixes from 1.36.0 suse feedback
1147 - fix situation where sqlite database exists but sqlite has been removed.
1148 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1149 - remove tray-monitor from RH8 build
1150 - fix permissions on tray-monitor files
1151 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1152 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
1153 - change database update to 7 to 8 upgrade,
1154 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
1155 - build in 30Jul04, add freetype dependancy to gnome package.
1156 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1157 - add documentation to console for groupadd
1158 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1159 - add support for running daemons as root.bacula
1160 - correct for change in location of floppy rescue files in 1.35.2
1161 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
1162 - updated depgkgs to 30Jul04
1163 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1164 - really, really fix symlink creation for gconsole
1165 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1166 - fix symlink creation in gconsole post install
1167 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1168 - fixed error in gconsole post script
1169 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1170 - add check for gconsole symlink before trying to create it
1171 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1172 - fix some minor permissions issues on doc files that CVS won't let us fix
1173 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1174 - add pkgconfig to BuildRequires
1175 - clean up gnome1/2 menu entries for appropriate packages
1176 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1177 - tightened up doc distribution
1178 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1179 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
1180 - rpm's horrible bug that prevents nested conditional macros prevents me
1181 - from implementing these 2 separate approaches within the conditionals which
1182 - create the separate server packages.
1183 - the solution adopted is to remove the gnome-console files from the server packages
1184 - so bacula-gconsole is now an add on for both client and server packages.
1185 - this also now allows the server packages to be install on machines without
1186 - an X-server and we can still maintain a single spec file.
1187 - added tests to make sure we have defined platform and database macros.
1188 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1189 - corrected mysql prerequisites for suse
1190 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1191 - replaced all cp commands with cp -p
1192 - removed addition of a+x permissions on gnome-console
1193 - corrected permissions on init scripts
1194 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1195 - corrected creation of sqlite_bindir in install from !mysql to sqlite
1196 -
1197 - various cleanup patches from Michael K. Johnson:
1198 - corrected post install routines for nicer chkconfig
1199 - removed chmod changes in post routines and moved to install section
1200 - removed interactive nature of post routine for rescue package
1201 - added description of building rescue disks to the description of rescue package
1202 - added clean of build root to beginning of install
1203 - removed specifying attr in all file lists
1204 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1205 - added bconsole to client package
1206 - added gconsole package as add-on to client
1207 - removed spurious dependancies on updatedb package (!cut/paste)
1208 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1209 - added updatedb package
1210 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1211 - added postgresql package
1212 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1213 - corrected the if else logic in the dependancy sections
1214 - changes for 1.34 release
1215 - /etc/bacula/console is now /etc/bacula/bconsole
1216 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
1217 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
1218 - /usr/sbin/smtp is now /usr/sbin/bsmtp
1219 - added new /etc/bacula/drop_mysql_database
1220 - added new /etc/bacula/drop_sqlite_database
1221 - added new /etc/bacula/grant_sqlite_privileges
1222 - added new generic bacula database scripts in /etc/bacula
1223 - added pre-install sections to check for database versions older than 6
1224 - added check for /etc/bacula/console.conf and copy to bconsole.conf
1225 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1226 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
1227 - added testing for existing databases before executing any of the database creation scripts
1228 - added defines working_dir and sqlite_bindir in place of hard coded paths
1229 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1230 - added build configuration for SuSE.
1231 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
1232 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1233 - added patch for create_sqlite_database to fix the installed bindir
1234 - added execute of create_sqlite_database to post of sqlite package
1235 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1236 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
1237 - added bacula-fd as Requires for rescue package
1238 - added build tag for Fedora Core 1
1239 - cleaned up dependancies for all builds
1240 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1241 - removed rh_version from package names
1242 - added platform build configuration section to beginning of file
1243 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1244 - removed make_static_bacula script from rescue package install
1245 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1246 - Added define at top of file for depkgs version
1247 - Added rescue sub-package
1248 - Moved requires statements into proper sub-package locations
1249 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1250 - Corrected Requires for Gnome 1.4/2.0 builds
1251 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1252 - Added separate source declaration for depkgs
1253 - added patch for make_catalog_backup script
1254 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1255 - Misc changes to mysql/sqlite build and rh7/8 menu differences
1256 - Added rh_version to sub-package names
1257 - Added installed but missing file /etc/bacula/gconsole
1258 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
1259 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
1260 - Update spec for version 1.31 and combine client
1261 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1262 - Initial spec file