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