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