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