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