2 # Copyright (C) 2000-2006 Kern Sibbald
4 # Platform Build Configuration
6 # basic defines for every build
7 %define depkgs ../depkgs
8 %define depkgs_version 28Mar06
9 %define sqlite_bindir /usr/lib/bacula/sqlite
10 %define working_dir /var/bacula
11 %define director_daemon_user bacula
12 %define storage_daemon_user bacula
13 %define file_daemon_user root
14 %define daemon_group bacula
15 # group that has write access to tape devices, usually disk on Linux
16 %define storage_daemon_group disk
17 %define user_file /etc/passwd
18 %define group_file /etc/group
19 %define useradd /usr/sbin/useradd
20 %define groupadd /usr/sbin/groupadd
21 %define usermod /usr/sbin/usermod
22 %define _rescuever 1.8.3
24 # platform defines - set one below or define the build_xxx on the command line
27 %{?build_rh7:%define rh7 1}
29 %{?build_rh8:%define rh8 1}
31 %{?build_rh9:%define rh9 1}
34 %{?build_fc1:%define fc1 1}
36 %{?build_fc3:%define fc3 1}
38 %{?build_fc4:%define fc4 1}
39 # Whitebox Enterprise build
41 %{?build_wb3:%define wb3 1}
42 # RedHat Enterprise builds
44 %{?build_rhel3:%define rhel3 1}
45 %{?build_rhel3:%define wb3 1}
47 %{?build_rhel4:%define rhel4 1}
48 %{?build_rhel4:%define fc3 1}
51 %{?build_centos3:%define centos3 1}
52 %{?build_centos3:%define wb3 1}
54 %{?build_centos4:%define centos4 1}
55 %{?build_centos4:%define fc3 1}
58 %{?build_su9:%define su9 1}
60 %{?build_su10:%define su10 1}
63 %{?build_mdk:%define mdk 1}
65 # test for a platform definition
66 %if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{mdk}
67 %{error: You must specify a platform. Please examine the spec file.}
72 # set for database support desired or define the build_xxx on the command line
74 %{?build_mysql:%define mysql 1}
75 # if using mysql 4.x define this and mysql above
76 # currently: Mandrake 10.1, SuSE 9.2, RHEL4 and Fedora Core 4
78 %{?build_mysql4:%define mysql4 1}
79 %{?build_mysql4:%define mysql 1}
81 %{?build_sqlite:%define sqlite 1}
83 %{?build_postgresql:%define postgresql 1}
85 # test for a database definition
86 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql}
87 %{error: You must specify database support. Please examine the spec file.}
92 %define db_backend mysql
95 %define db_backend sqlite
98 %define db_backend postgresql
103 %{?build_x86_64:%define x86_64 1}
105 # check what distribution we are
106 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4}
107 %define _dist %(grep Red /etc/redhat-release)
110 %define _dist %(grep Fedora /etc/redhat-release)
112 %if %{centos4} || %{centos3}
113 %define _dist %(grep CentOS /etc/redhat-release)
115 %if %{fc3} && ! %{rhel4} && ! %{centos4}
116 %define _dist %(grep Fedora /etc/redhat-release)
118 %if %{wb3} && ! %{rhel3} && ! %{centos3}
119 %define _dist %(grep White /etc/whitebox-release)
121 %if %{su9} || %{su10}
122 %define _dist %(grep -i SuSE /etc/SuSE-release)
125 %define _dist %(grep Mand /etc/mandrake-release)
128 # Should we build gconsole, possible only if gnome >= 2.0 available
134 # specifically disallow gconsole if desired
135 %{?nobuild_gconsole:%define gconsole 0}
137 Summary: Bacula - The Network Backup Solution
141 Group: System Environment/Daemons
143 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
144 Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
145 Source2: Release_Notes-%{version}-%{release}.tar.gz
146 Source3:http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
147 Source4:http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
148 Patch0: bacula-1.38.6-script.patch
149 Patch1: bacula-1.38.6-makefile.patch
150 BuildRoot: %{_tmppath}/%{name}-root
151 URL: http://www.bacula.org/
152 Vendor: The Bacula Team
153 Distribution: %{_dist}
154 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
156 %define _docsrc ../%{name}-docs-%{version}
157 %define _rescuesrc ../%{name}-rescue-%{_rescuever}
159 BuildRequires: atk-devel, ncurses-devel, pango-devel, perl
160 BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel
161 BuildRequires: openssl-devel
163 BuildRequires: pkgconfig
166 BuildRequires: libtermcap-devel
167 BuildRequires: glibc-devel >= 2.2
170 BuildRequires: termcap
171 BuildRequires: glibc-devel >= 2.3
173 %if %{su9} && %{gconsole}
174 BuildRequires: libgnome >= 2.0
175 BuildRequires: gtk2-devel >= 2.0
176 BuildRequires: libgnomeui-devel >= 2.0
177 BuildRequires: ORBit2-devel
178 BuildRequires: libart_lgpl-devel >= 2.0
179 BuildRequires: libbonobo-devel >= 2.0
180 BuildRequires: libbonoboui-devel >= 2.0
181 BuildRequires: bonobo-activation-devel
182 BuildRequires: gconf2-devel
183 BuildRequires: linc-devel
184 BuildRequires: freetype2-devel
187 BuildRequires: termcap
188 BuildRequires: glibc-devel >= 2.3
190 %if %{su10} && %{gconsole}
191 BuildRequires: libgnome >= 2.12
192 BuildRequires: gtk2-devel >= 2.8
193 BuildRequires: libgnomeui-devel >= 2.12
194 BuildRequires: ORBit2-devel
195 BuildRequires: libart_lgpl-devel >= 2.3
196 BuildRequires: libbonobo-devel >= 2.10
197 BuildRequires: libbonoboui-devel >= 2.10
198 BuildRequires: bonobo-activation-devel
199 BuildRequires: gconf2-devel
200 BuildRequires: freetype2-devel
201 BuildRequires: cairo-devel
202 BuildRequires: fontconfig-devel >= 2.3
203 BuildRequires: gnome-vfs2-devel >= 2.12
204 BuildRequires: libpng-devel
207 BuildRequires: libtermcap-devel
208 BuildRequires: libstdc++-static-devel
209 BuildRequires: glibc-static-devel
210 BuildRequires: glibc-devel >= 2.3
212 %if %{mdk} && %{gconsole}
213 BuildRequires: gtk2-devel >= 2.0
214 BuildRequires: libgnomeui2-devel >= 2.0
215 BuildRequires: libORBit2-devel
216 BuildRequires: libart_lgpl-devel >= 2.0
217 BuildRequires: libbonobo2_0-devel
218 BuildRequires: libbonoboui2_0-devel
219 BuildRequires: libbonobo-activation-devel
220 BuildRequires: libGConf2-devel
221 BuildRequires: freetype2-devel
224 BuildRequires: libtermcap-devel
225 BuildRequires: glibc-devel >= 2.3
227 %if %{fc3} && %{gconsole}
228 BuildRequires: gtk2-devel >= 2.4
229 BuildRequires: libgnomeui-devel >= 2.8
230 BuildRequires: ORBit2-devel
231 BuildRequires: libart_lgpl-devel >= 2.3
232 BuildRequires: libbonobo-devel >= 2.8
233 BuildRequires: libbonoboui-devel >= 2.8
234 BuildRequires: bonobo-activation-devel
235 BuildRequires: GConf2-devel
236 BuildRequires: freetype-devel
239 BuildRequires: libtermcap-devel
240 BuildRequires: glibc-devel >= 2.3
242 %if %{fc4} && %{gconsole}
243 BuildRequires: gtk2-devel >= 2.6
244 BuildRequires: libgnomeui-devel >= 2.10
245 BuildRequires: ORBit2-devel
246 BuildRequires: libart_lgpl-devel >= 2.3
247 BuildRequires: libbonobo-devel >= 2.8
248 BuildRequires: libbonoboui-devel >= 2.8
249 BuildRequires: bonobo-activation-devel
250 BuildRequires: GConf2-devel
251 BuildRequires: freetype-devel
253 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
254 BuildRequires: libtermcap-devel
255 BuildRequires: glibc-devel >= 2.3
257 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && %{gconsole}
258 BuildRequires: gtk2-devel >= 2.0
259 BuildRequires: libgnomeui-devel >= 2.0
260 BuildRequires: ORBit2-devel
261 BuildRequires: libart_lgpl-devel >= 2.0
262 BuildRequires: libbonobo-devel >= 2.0
263 BuildRequires: libbonoboui-devel >= 2.0
264 BuildRequires: bonobo-activation-devel
265 BuildRequires: GConf2-devel
266 BuildRequires: linc-devel
267 BuildRequires: freetype-devel
270 %if %{mysql} && ! %{mysql4}
271 BuildRequires: mysql-devel >= 3.23
274 %if %{mysql} && %{mysql4}
275 BuildRequires: mysql-devel >= 4.0
278 %if %{postgresql} && %{wb3}
279 BuildRequires: rh-postgresql-devel >= 7
282 %if %{postgresql} && ! %{wb3}
283 BuildRequires: postgresql-devel >= 7
287 Bacula - It comes by night and sucks the vital essence from your computers.
289 Bacula is a set of computer programs that permit you (or the system
290 administrator) to manage backup, recovery, and verification of computer
291 data across a network of computers of different kinds. In technical terms,
292 it is a network client/server based backup program. Bacula is relatively
293 easy to use and efficient, while offering many advanced storage management
294 features that make it easy to find and recover lost or damaged files.
295 Bacula source code has been released under the GPL version 2 license.
307 Summary: Bacula - The Network Backup Solution
308 Group: System Environment/Daemons
309 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
310 Conflicts: bacula-client
311 Obsoletes: bacula-rescue
312 Requires: ncurses, libstdc++, zlib, openssl, mtx
315 Requires: glibc >= 2.2
318 %if %{su9} || %{su10}
319 Requires: glibc >= 2.3
322 %if ! %{rh7} && ! %{su9} && ! %{su10}
323 Requires: glibc >= 2.3
327 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4}
328 Requires: mysql >= 3.23
329 Requires: mysql-server >= 3.23
331 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{mdk} && %{mysql4}
332 Requires: mysql >= 4.0
333 Requires: mysql-server >= 4.0
336 %if %{mysql} && %{su9} && ! %{mysql4}
337 Requires: mysql >= 3.23
338 Requires: mysql-client >= 3.23
340 %if %{mysql} && %{su9} && %{mysql4}
341 Requires: mysql >= 4.0
342 Requires: mysql-client >= 4.0
344 %if %{mysql} && %{su10} && %{mysql4}
345 Requires: mysql >= 4.0
346 Requires: mysql-client >= 4.0
349 %if %{mysql} && %{mdk} && ! %{mysql4}
350 Requires: mysql >= 3.23
351 Requires: mysql-client >= 3.23
353 %if %{mysql} && %{mdk} && %{mysql4}
354 Requires: mysql >= 4.0
355 Requires: mysql-client >= 4.0
358 %if %{postgresql} && %{wb3}
359 Requires: rh-postgresql >= 7
360 Requires: rh-postgresql-server >= 7
362 %if %{postgresql} && ! %{wb3}
363 Requires: postgresql >= 7
364 Requires: postgresql-server >= 7
374 %description postgresql
377 Bacula - It comes by night and sucks the vital essence from your computers.
379 Bacula is a set of computer programs that permit you (or the system
380 administrator) to manage backup, recovery, and verification of computer
381 data across a network of computers of different kinds. In technical terms,
382 it is a network client/server based backup program. Bacula is relatively
383 easy to use and efficient, while offering many advanced storage management
384 features that make it easy to find and recover lost or damaged files.
385 Bacula source code has been released under the GPL version 2 license.
388 This build requires MySQL to be installed separately as the catalog database.
391 This build requires PostgreSQL to be installed separately as the catalog database.
394 This build incorporates sqlite as the catalog database, statically compiled.
398 Summary: Bacula - The Network Backup Solution
399 Group: System Environment/Daemons
403 This is Bacula's version of mtx tape utilities for Linux distributions that
404 do not provide their own mtx package
407 Summary: Bacula - The Network Backup Solution
408 Group: System Environment/Daemons
410 Conflicts: bacula-mysql
411 Conflicts: bacula-sqlite
412 Conflicts: bacula-postgresql
413 Obsoletes: bacula-rescue
414 Requires: libstdc++, zlib, openssl
417 Requires: glibc >= 2.2
420 %if %{su9} || %{su10}
421 Requires: glibc >= 2.3
424 %if ! %{rh7} && ! %{su9} && ! %{su10}
425 Requires: glibc >= 2.3
430 Bacula - It comes by night and sucks the vital essence from your computers.
432 Bacula is a set of computer programs that permit you (or the system
433 administrator) to manage backup, recovery, and verification of computer
434 data across a network of computers of different kinds. In technical terms,
435 it is a network client/server based backup program. Bacula is relatively
436 easy to use and efficient, while offering many advanced storage management
437 features that make it easy to find and recover lost or damaged files.
438 Bacula source code has been released under the GPL version 2 license.
440 This is the File daemon (Client) only package. It includes the command line
445 Summary: Bacula - The Network Backup Solution
446 Group: System Environment/Daemons
448 %description updatedb
449 Bacula - It comes by night and sucks the vital essence from your computers.
451 Bacula is a set of computer programs that permit you (or the system
452 administrator) to manage backup, recovery, and verification of computer
453 data across a network of computers of different kinds. In technical terms,
454 it is a network client/server based backup program. Bacula is relatively
455 easy to use and efficient, while offering many advanced storage management
456 features that make it easy to find and recover lost or damaged files.
457 Bacula source code has been released under the GPL version 2 license.
459 This package installs scripts for updating older versions of the bacula
464 Summary: Bacula - The Network Backup Solution
465 Group: System Environment/Daemons
466 Requires: atk, libstdc++, zlib, pango, libxml2, bacula-fd, openssl
469 %if %{gconsole} && %{su9}
470 Requires: gtk2 >= 2.0
471 Requires: libgnome >= 2.0
472 Requires: libgnomeui >= 2.0
473 Requires: glibc >= 2.3
475 Requires: libart_lgpl >= 2.0
476 Requires: libbonobo >= 2.0
477 Requires: libbonoboui >= 2.0
478 Requires: bonobo-activation
483 %if %{gconsole} && %{su10}
484 Requires: gtk2 >= 2.8
485 Requires: libgnome >= 2.12
486 Requires: libgnomeui >= 2.12
487 Requires: glibc >= 2.3
489 Requires: libart_lgpl >= 2.3
490 Requires: libbonobo >= 2.10
491 Requires: libbonoboui >= 2.10
492 Requires: bonobo-activation
496 Requires: fontconfig >= 2.3
497 Requires: gnome-vfs2 >= 2.12
500 %if %{gconsole} && %{mdk}
501 Requires: gtk2 >= 2.0
502 Requires: libgnomeui2
503 Requires: glibc >= 2.3
505 Requires: libart_lgpl >= 2.0
506 Requires: libbonobo >= 2.0
507 Requires: libbonoboui >= 2.0
511 %if %{gconsole} && %{fc3}
512 Requires: gtk2 >= 2.4
513 Requires: libgnomeui >= 2.8
514 Requires: glibc >= 2.3
516 Requires: libart_lgpl >= 2.3
517 Requires: libbonobo >= 2.8
518 Requires: libbonoboui >= 2.8
519 Requires: bonobo-activation
523 %if %{gconsole} && %{fc4}
524 Requires: gtk2 >= 2.6
525 Requires: libgnomeui >= 2.10
526 Requires: glibc >= 2.3
528 Requires: libart_lgpl >= 2.3
529 Requires: libbonobo >= 2.8
530 Requires: libbonoboui >= 2.8
531 Requires: bonobo-activation
535 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
536 Requires: gtk2 >= 2.0
537 Requires: libgnomeui >= 2.0
538 Requires: glibc >= 2.3
540 Requires: libart_lgpl >= 2.0
541 Requires: libbonobo >= 2.0
542 Requires: libbonoboui >= 2.0
543 Requires: bonobo-activation
548 %if %{gconsole} && %{su9}
551 %if %{gconsole} && %{su10}
554 %if %{gconsole} && ! %{su9} && ! %{su10}
559 %description gconsole
560 Bacula - It comes by night and sucks the vital essence from your computers.
562 Bacula is a set of computer programs that permit you (or the system
563 administrator) to manage backup, recovery, and verification of computer
564 data across a network of computers of different kinds. In technical terms,
565 it is a network client/server based backup program. Bacula is relatively
566 easy to use and efficient, while offering many advanced storage management
567 features that make it easy to find and recover lost or damaged files.
568 Bacula source code has been released under the GPL version 2 license.
570 This is the Gnome Console package. It is an add-on to the client or
587 %if %{su9} || %{su10}
588 export LDFLAGS="-L/usr/lib/termcap"
599 # patches for the bundled sqlite scripts
600 # as of 1.38.0 first 3 patches no longer needed
602 # patch the make_sqlite_tables script for installation bindir
603 # patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
605 # patch the create_sqlite_database script for installation bindir
606 #patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
608 # patch the make_catalog_backup script for installation bindir
609 #patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
611 # patch the update_sqlite_tables script for installation bindir
612 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
614 # patch the bacula-dir init script to remove sqlite service
615 %if %{sqlite} && %{su9}
616 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
618 %if %{sqlite} && %{su10}
619 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
622 # 64 bit lib location hacks
623 # this is the location on redhat type platforms, don't know about others yet
625 export LDFLAGS=-L/usr/lib64
627 %if %{mysql} && %{x86_64}
628 export LDFLAGS=-L/usr/lib64/mysql
633 --sbindir=/usr/sbin \
634 --sysconfdir=/etc/bacula \
635 --with-scriptdir=/etc/bacula \
636 --enable-smartalloc \
637 --enable-client-only \
647 --sbindir=/usr/sbin \
648 --sysconfdir=/etc/bacula \
649 --with-scriptdir=/etc/bacula \
650 --enable-smartalloc \
654 %if %{gconsole} && ! %{rh8}
655 --enable-tray-monitor \
661 --with-sqlite=${cwd}/%{depkgs}/sqlite \
666 --with-working-dir=%{working_dir} \
667 --with-pid-dir=/var/run \
668 --with-subsys-dir=/var/lock/subsys \
669 --with-dir-user=%{director_daemon_user} \
670 --with-dir-group=%{daemon_group} \
671 --with-sd-user=%{storage_daemon_user} \
672 --with-sd-group=%{storage_daemon_group} \
673 --with-fd-user=%{file_daemon_user} \
674 --with-fd-group=%{daemon_group} \
675 --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
676 --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
677 --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
678 --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
679 --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
680 --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
688 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
689 mkdir -p $RPM_BUILD_ROOT/etc/init.d
690 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
691 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/logfiles
692 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/services
693 mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
694 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
696 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
698 mkdir -p $RPM_BUILD_ROOT/etc/bacula/updatedb
699 %if %{gconsole} && ! %{su9} && ! %{su10}
700 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
701 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
702 mkdir -p $RPM_BUILD_ROOT/usr/bin
706 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
710 prefix=$RPM_BUILD_ROOT/usr \
711 sbindir=$RPM_BUILD_ROOT/usr/sbin \
712 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
713 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
714 working_dir=$RPM_BUILD_ROOT%{working_dir} \
719 prefix=$RPM_BUILD_ROOT/usr \
720 sbindir=$RPM_BUILD_ROOT/usr/sbin \
721 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
722 working_dir=$RPM_BUILD_ROOT%{working_dir} \
723 mandir=$RPM_BUILD_ROOT/usr/man \
727 # fixme - make installs the mysql scripts for sqlite build
729 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
730 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
731 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
734 # fixme - make installs the mysql scripts for postgresql build
736 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
737 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
740 # fixme - make installs gconsole script for build without gconsole
742 rm -f $RPM_BUILD_ROOT/etc/bacula/gconsole
745 rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
747 # install the init scripts
748 %if %{su9} || %{su10}
749 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
750 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
751 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
754 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
755 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
756 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
758 %if ! %{su9} && ! %{su10} && ! %{mdk}
759 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
760 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
761 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
763 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
765 # install the menu stuff
766 %if %{gconsole} && %{su9}
767 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
768 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
769 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
770 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
772 %if %{gconsole} && %{su10}
773 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
774 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
775 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
776 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
778 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{mdk}
783 %if %{gconsole} && %{iftrick}
784 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
785 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
786 cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console
787 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console
788 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console
790 %if %{gconsole} && ! %{rh8}
791 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
792 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
797 cp -p %{depkgs}/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
798 cp -p %{depkgs}/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
799 cp -p %{depkgs}/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
802 # install the logrotate file
803 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
805 # install the updatedb scripts
806 cp -p updatedb/* $RPM_BUILD_ROOT/etc/bacula/updatedb/
808 # install the logwatch scripts
809 cp -p scripts/logwatch/bacula $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
810 cp -p scripts/logwatch/logfile.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
811 cp -p scripts/logwatch/services.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
812 chmod 755 $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
813 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
814 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
816 # install the rescue files
817 mkdir $RPM_BUILD_ROOT/etc/bacula/rescue
818 cp -p %{_rescuesrc}/Makefile* $RPM_BUILD_ROOT/etc/bacula/rescue/
819 cp -p %{_rescuesrc}/README $RPM_BUILD_ROOT/etc/bacula/rescue/
820 cp -p %{_rescuesrc}/configure $RPM_BUILD_ROOT/etc/bacula/rescue/
821 cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT/etc/bacula/rescue/
822 cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT/etc/bacula/rescue/
823 cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT/etc/bacula/rescue/
824 touch $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/rpm_release
825 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/bacula/bin/bacula-fd
826 rm -f src/filed/static-bacula-fd
828 # now clean up permissions that are left broken by the install
829 chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
830 chmod o-rwx $RPM_BUILD_ROOT/var/bacula
831 %if %{gconsole} && ! %{rh8}
832 chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
833 chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf
837 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
840 # MySQL specific files
842 %defattr(-, root, root)
843 %attr(-, root, %{daemon_group}) /etc/bacula/create_mysql_database
844 %attr(-, root, %{daemon_group}) /etc/bacula/drop_mysql_database
845 %attr(-, root, %{daemon_group}) /etc/bacula/make_mysql_tables
846 %attr(-, root, %{daemon_group}) /etc/bacula/drop_mysql_tables
847 %attr(-, root, %{daemon_group}) /etc/bacula/update_mysql_tables
848 %attr(-, root, %{daemon_group}) /etc/bacula/grant_mysql_privileges
849 %attr(-, root, %{daemon_group}) /etc/bacula/startmysql
850 %attr(-, root, %{daemon_group}) /etc/bacula/stopmysql
855 %defattr(-,root,root)
856 %attr(-, root, %{daemon_group}) /etc/bacula/create_sqlite_database
857 %attr(-, root, %{daemon_group}) /etc/bacula/drop_sqlite_database
858 %attr(-, root, %{daemon_group}) /etc/bacula/grant_sqlite_privileges
859 %attr(-, root, %{daemon_group}) /etc/bacula/make_sqlite_tables
860 %attr(-, root, %{daemon_group}) /etc/bacula/drop_sqlite_tables
861 %attr(-, root, %{daemon_group}) /etc/bacula/update_sqlite_tables
862 %{sqlite_bindir}/libsqlite.a
863 %{sqlite_bindir}/sqlite.h
864 %{sqlite_bindir}/sqlite
869 %defattr(-,root,root)
870 %attr(-, root, %{daemon_group}) /etc/bacula/create_postgresql_database
871 %attr(-, root, %{daemon_group}) /etc/bacula/drop_postgresql_database
872 %attr(-, root, %{daemon_group}) /etc/bacula/make_postgresql_tables
873 %attr(-, root, %{daemon_group}) /etc/bacula/drop_postgresql_tables
874 %attr(-, root, %{daemon_group}) /etc/bacula/update_postgresql_tables
875 %attr(-, root, %{daemon_group}) /etc/bacula/grant_postgresql_privileges
878 # The rest is DB backend independent
879 %attr(-, root, %{daemon_group}) %dir /etc/bacula
880 %attr(-, root, %{daemon_group}) /etc/bacula/bacula
881 %attr(-, root, %{daemon_group}) /etc/bacula/bconsole
882 %attr(-, root, %{daemon_group}) /etc/bacula/create_bacula_database
883 %attr(-, root, %{daemon_group}) /etc/bacula/drop_bacula_database
884 %attr(-, root, %{daemon_group}) /etc/bacula/grant_bacula_privileges
885 %attr(-, root, %{daemon_group}) /etc/bacula/make_bacula_tables
886 %attr(-, root, %{daemon_group}) /etc/bacula/drop_bacula_tables
887 %attr(-, root, %{daemon_group}) /etc/bacula/update_bacula_tables
888 %attr(-, root, %{daemon_group}) /etc/bacula/make_catalog_backup
889 %attr(-, root, %{daemon_group}) /etc/bacula/delete_catalog_backup
890 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.dbx
891 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.gdb
892 %attr(-, root, %{daemon_group}) /etc/bacula/rescue
893 %attr(-, root, %{daemon_group}) /etc/bacula/disk-changer
894 %attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-dir
895 %attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-fd
896 %attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-sd
897 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
898 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
899 %attr(-, root, %{storage_daemon_group}) /etc/bacula/dvd-handler
900 %attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
901 %attr(-, root, %{storage_daemon_group}) /etc/bacula/mtx-changer
903 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
904 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
906 /etc/logrotate.d/bacula
907 /etc/log.d/scripts/services/bacula
908 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bacula-dir.conf
909 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bacula-fd.conf
910 %attr(-, root, %{storage_daemon_group}) %config(noreplace) /etc/bacula/bacula-sd.conf
911 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bconsole.conf
912 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
913 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/services/bacula.conf
914 %attr(-, root, %{daemon_group}) /etc/bacula/query.sql
915 %attr(-, root, %{daemon_group}) %dir %{working_dir}
932 # test for bacula database older than version 8
933 # note: this ASSUMES no password has been set for bacula database
934 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
939 # test for bacula database older than version 8
940 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
941 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
946 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
949 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then
950 echo "This bacula upgrade will update a bacula database from version 8 to 9."
951 echo "You appear to be running database version $DB_VER. You must first update"
952 echo "your database to version 8 and then install this upgrade. The alternative"
953 echo "is to use /etc/bacula/drop_%{db_backend}_tables to delete all your your current"
954 echo "catalog information, then do the upgrade. Information on updating a"
955 echo "database older than version 8 can be found in the release notes."
963 # check for and copy /etc/bacula/console.conf to bconsole.conf
964 if [ -s /etc/bacula/console.conf ];then
965 cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
968 # create the daemon users and groups
969 # first create the groups if they don't exist
970 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
971 if [ -z "$HAVE_BACULA" ]; then
972 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
973 echo "The group %{daemon_group} has been added to %{group_file}."
974 echo "See the manual chapter \"Running Bacula\" for details."
976 HAVE_BACULA=`grep %{storage_daemon_group} %{group_file} 2>/dev/null`
977 if [ -z "$HAVE_BACULA" ]; then
978 %{groupadd} -r %{storage_daemon_group} > /dev/null 2>&1
979 echo "The group %{storage_daemon_group} has been added to %{group_file}."
980 echo "See the manual chapter \"Running Bacula\" for details."
982 # now create the users if they do not exist
983 # we do not use the -g option allowing the primary group to be set to system default
984 # this will be a unique group on redhat type systems or the group users on some systems
985 HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
986 if [ -z "$HAVE_BACULA" ]; then
987 %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
988 echo "The user %{storage_daemon_user} has been added to %{user_file}."
989 echo "See the manual chapter \"Running Bacula\" for details."
991 HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
992 if [ -z "$HAVE_BACULA" ]; then
993 %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
994 echo "The user %{director_daemon_user} has been added to %{user_file}."
995 echo "See the manual chapter \"Running Bacula\" for details."
997 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
998 if [ -z "$HAVE_BACULA" ]; then
999 %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1000 echo "The user %{file_daemon_user} has been added to %{user_file}."
1001 echo "See the manual chapter \"Running Bacula\" for details."
1003 # now we add the supplementary groups, this is ok to call even if the users already exist
1004 # we only do this if the user is NOT root
1005 IS_ROOT=%{director_daemon_user}
1006 if [ "$IS_ROOT" != "root" ]; then
1007 %{usermod} %{director_daemon_user} -G %{daemon_group}
1009 IS_ROOT=%{storage_daemon_user}
1010 if [ "$IS_ROOT" != "root" ]; then
1011 %{usermod} %{storage_daemon_user} -G %{daemon_group},%{storage_daemon_group}
1013 IS_ROOT=%{file_daemon_user}
1014 if [ "$IS_ROOT" != "root" ]; then
1015 %{usermod} %{file_daemon_user} -G %{daemon_group}
1029 if [ "$1" -ge 1 ] ; then
1030 /sbin/chkconfig --add bacula-dir
1031 /sbin/chkconfig --add bacula-fd
1032 /sbin/chkconfig --add bacula-sd
1036 # test for an existing database
1037 # note: this ASSUMES no password has been set for bacula database
1038 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1040 # grant privileges and create tables if they do not exist
1041 if [ -z "$DB_VER" ]; then
1042 echo "Hmm, doesn't look like you have an existing database."
1043 echo "Granting privileges for MySQL user bacula..."
1044 /etc/bacula/grant_mysql_privileges
1045 echo "Creating MySQL bacula database..."
1046 /etc/bacula/create_mysql_database
1047 echo "Creating bacula tables..."
1048 /etc/bacula/make_mysql_tables
1050 # check to see if we need to upgrade a 1.36 or lower database
1051 elif [ "$DB_VER" -lt "9" ]; then
1052 echo "This release requires an upgrade to your bacula database."
1053 echo "Backing up your current database..."
1054 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1055 echo "Upgrading bacula database ..."
1056 /etc/bacula/update_mysql_tables
1057 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1063 # test for an existing database
1064 if [ -s %{working_dir}/bacula.db ]; then
1065 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1066 # check to see if we need to upgrade a 1.36 or lower database
1067 if [ "$DB_VER" -lt "9" ] && [ "$DB_VER" -ge "8" ]; then
1068 echo "This release requires an upgrade to your bacula database."
1069 echo "Backing up your current database..."
1070 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1071 echo "Upgrading bacula database ..."
1072 /etc/bacula/update_sqlite_tables
1073 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1076 # create the database and tables
1077 echo "Hmm, doesn't look like you have an existing database."
1078 echo "Creating SQLite database..."
1079 /etc/bacula/create_sqlite_database
1080 echo "Creating the SQLite tables..."
1081 /etc/bacula/make_sqlite_tables
1086 # test for an existing database
1087 # note: this ASSUMES no password has been set for bacula database
1088 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1090 # grant privileges and create tables if they do not exist
1091 if [ -z "$DB_VER" ]; then
1092 echo "Hmm, doesn't look like you have an existing database."
1093 echo "Creating PostgreSQL bacula database..."
1094 /etc/bacula/create_postgresql_database
1095 echo "Creating bacula tables..."
1096 /etc/bacula/make_postgresql_tables
1097 echo "Granting privileges for PostgreSQL user bacula..."
1098 /etc/bacula/grant_postgresql_privileges
1100 # check to see if we need to upgrade a 1.36 or lower database
1101 elif [ "$DB_VER" -lt "9" ]; then
1102 echo "This release requires an upgrade to your bacula database."
1103 echo "Backing up your current database..."
1104 pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1105 echo "Upgrading bacula database ..."
1106 /etc/bacula/update_postgresql_tables
1107 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1112 # generate passwords if needed
1113 if [ -d /etc/bacula ]; then
1115 for file in *.conf; do
1116 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
1117 need_password=`grep $string $file 2>/dev/null`
1118 if [ -n "$need_password" ]; then
1119 pass=`openssl rand -base64 33`
1120 sed "s-$string-$pass-g" $file > $file.new
1121 cp -f $file.new $file; rm -f $file.new
1139 /sbin/chkconfig --del bacula-dir
1140 /sbin/chkconfig --del bacula-fd
1141 /sbin/chkconfig --del bacula-sd
1146 %attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
1147 %attr(-, root, %{storage_daemon_group}) /usr/sbin/mtx
1148 %attr(-, root, %{storage_daemon_group}) /usr/sbin/scsitape
1149 %attr(-, root, %{storage_daemon_group}) /usr/sbin/tapeinfo
1154 %defattr(-,root,root)
1155 %attr(-, root, %{daemon_group}) %dir /etc/bacula
1156 %attr(-, root, %{daemon_group}) /etc/bacula/bconsole
1157 /etc/init.d/bacula-fd
1158 %attr(-, root, %{daemon_group}) /etc/bacula/rescue
1160 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1161 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1163 /etc/logrotate.d/bacula
1165 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bacula-fd.conf
1166 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bconsole.conf
1167 %attr(-, root, %{daemon_group}) %dir %{working_dir}
1170 /usr/sbin/btraceback
1171 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.gdb
1172 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.dbx
1178 # create the daemon group and user
1179 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1180 if [ -z "$HAVE_BACULA" ]; then
1181 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1182 echo "The group %{daemon_group} has been added to %{group_file}."
1183 echo "See the manual chapter \"Running Bacula\" for details."
1185 # we do not use the -g option allowing the primary group to be set to system default
1186 # this will be a unique group on redhat type systems or the group users on some systems
1187 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1188 if [ -z "$HAVE_BACULA" ]; then
1189 %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1190 echo "The user %{file_daemon_user} has been added to %{user_file}."
1191 echo "See the manual chapter \"Running Bacula\" for details."
1193 # now we add the supplementary group, this is ok to call even if the user already exists
1194 # we only do this if the user is NOT root
1195 IS_ROOT=%{file_daemon_user}
1196 if [ "$IS_ROOT" != "root" ]; then
1197 %{usermod} %{file_daemon_user} -G %{daemon_group}
1202 if [ "$1" -ge 1 ] ; then
1203 /sbin/chkconfig --add bacula-fd
1206 # generate passwords if needed
1207 if [ -d /etc/bacula ]; then
1209 for file in *.conf; do
1210 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
1211 need_password=`grep $string $file 2>/dev/null`
1212 if [ -n "$need_password" ]; then
1213 pass=`openssl rand -base64 33`
1214 sed "s-$string-$pass-g" $file > $file.new
1215 cp -f $file.new $file; rm -f $file.new
1224 /sbin/chkconfig --del bacula-fd
1228 %defattr(-,root,%{daemon_group})
1229 /etc/bacula/updatedb/*
1232 # create the daemon group
1233 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1234 if [ -z "$HAVE_BACULA" ]; then
1235 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1236 echo "The group %{daemon_group} has been added to %{group_file}."
1237 echo "See the manual chapter \"Running Bacula\" for details."
1241 echo "The database update scripts were installed to /etc/bacula/updatedb"
1245 %defattr(-,root,root)
1246 /usr/sbin/gnome-console
1247 %attr(-, root, %{daemon_group}) %dir /etc/bacula
1248 %attr(-, root, %{daemon_group}) /etc/bacula/gconsole
1249 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/gnome-console.conf
1250 /usr/share/pixmaps/bacula.png
1254 /usr/share/applications/bacula.desktop
1257 %if %{gconsole} && ! %{rh8}
1258 /usr/sbin/bacula-tray-monitor
1259 %config(noreplace) /etc/bacula/tray-monitor.conf
1260 /usr/share/pixmaps/bacula-tray-monitor.xpm
1261 /usr/share/applications/bacula-tray-monitor.desktop
1264 %if %{gconsole} && ! %{su9} && ! %{su10}
1265 # add the console helper files
1266 %config(noreplace,missingok) /etc/pam.d/gnome-console
1267 %config(noreplace,missingok) /etc/security/console.apps/gnome-console
1268 /usr/bin/gnome-console
1273 # create the daemon group
1274 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1275 if [ -z "$HAVE_BACULA" ]; then
1276 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1277 echo "The group %{daemon_group} has been added to %{group_file}."
1278 echo "See the manual chapter \"Running Bacula\" for details."
1282 # generate passwords if needed
1283 if [ -d /etc/bacula ]; then
1285 for file in *.conf; do
1286 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
1287 need_password=`grep $string $file 2>/dev/null`
1288 if [ -n "$need_password" ]; then
1289 pass=`openssl rand -base64 33`
1290 sed "s-$string-$pass-g" $file > $file.new
1291 cp -f $file.new $file; rm -f $file.new
1299 * Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1301 - fix problem specifying more than one primary group for user bacula
1302 - add build switch to not build gconsole regardless of platform
1303 * Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1304 - add centos3 build tag
1305 - fix link error of static-fd on Mandrake with --disable-nls
1306 * Fri Jan 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1307 - add fc4 dependencies
1308 * Mon Jan 23 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1309 - add SuSE 10.0 build
1310 - remove specific permission in attrib macros
1311 * Sat Jan 21 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1313 - fix usermode required on suse, suse doesn't have usermode (xsu instead)
1314 - refix compat for _dist on SLES9 which seems to have been removed
1315 - added note regarding Aleksandar's use of specific permissions in attrib macros
1316 - need to review and add specific fc4 build currently using fc3 Requires
1317 * Wed Dec 14 2005 Aleksandar Milivojevic <alex@milivojevic.org>
1319 - Reorganize files and pre/post sections to remove repetitions
1320 - Always build separate mtx package
1321 - Fix file ownerships for /etc/bacula and Bacula's working dir
1322 * Wed Nov 23 2005 Aleksandar Milivojevic <alex@milivojevic.org>
1323 - Disable GNOME on RH7
1324 * Fri Nov 18 2005 Aleksandar Milivojevic <alex@milivojevic.org>
1325 - Red Hat and look alikes have mtx RPM, do not build/package our version
1326 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1327 - minor edit to _dist for SLES9 compatibility
1328 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1330 - kern changed location of pdf files and html manual in docs package
1331 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1333 - add docs (from prebuilt tarball) and rescue packages back in
1334 - remove dvd-freespace and dvd-writepart files, add dvd-handler
1335 - remove 3 of 4 sqlite script patches as not needed
1336 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1338 - remove docs and rescue sections (remove static fd)
1339 - add dvd-freespace and dvd-writepart files
1340 - update depkgs to 22Jun05
1341 - change database update to 8 to 9
1342 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1343 - minor cleanups before 1.38 changes
1344 - add popt and popt-devel build dependencies
1345 - add tetex and tetex-dvips dependencies for doc build
1346 - replace deprecated Copyright tag with License
1347 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1348 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
1349 - conflict with sqlite packages. remove readline dependency.
1350 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1351 - release 1.36.3 update docs
1352 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1353 - add centos4 build tag
1354 - add x86_64 build tag
1355 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1356 - add rhel4 build tag
1357 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
1358 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1359 - add rhel3 build tag
1360 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1361 - fix tray-monitor.conf for noreplace
1362 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1363 - fix distribution check for Fedora and Whitebox
1364 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1365 - add logwatch script
1367 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1368 - add build for Fedora Core 3 (linc now included in ORDit2)
1369 - add mysql4 define for Mandrake 10.1
1370 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1371 - fix {group_file} variable in post scripts
1372 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
1373 - add distribution checking and custom Distribution tag
1374 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1375 - ASSIGNMENT OF COPYRIGHT
1376 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
1377 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
1378 - all right, title and interest in and to the copyright in this software RPM
1379 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
1380 - free of all liens, encumbrances or any known claims against said copyright.
1381 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1383 - thanks to Daniel Widyono
1384 - update description for rescue package to describe cdrom creation
1385 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1386 - update depkgs to 29Oct04
1387 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1388 - add cdrom rescue to bacula-rescue package
1389 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1390 - misc fixes from 1.36.0 suse feedback
1391 - fix situation where sqlite database exists but sqlite has been removed.
1392 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1393 - remove tray-monitor from RH8 build
1394 - fix permissions on tray-monitor files
1395 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1396 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
1397 - change database update to 7 to 8 upgrade,
1398 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
1399 - build in 30Jul04, add freetype dependancy to gnome package.
1400 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1401 - add documentation to console for groupadd
1402 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1403 - add support for running daemons as root.bacula
1404 - correct for change in location of floppy rescue files in 1.35.2
1405 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
1406 - updated depgkgs to 30Jul04
1407 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1408 - really, really fix symlink creation for gconsole
1409 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1410 - fix symlink creation in gconsole post install
1411 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1412 - fixed error in gconsole post script
1413 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1414 - add check for gconsole symlink before trying to create it
1415 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1416 - fix some minor permissions issues on doc files that CVS won't let us fix
1417 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1418 - add pkgconfig to BuildRequires
1419 - clean up gnome1/2 menu entries for appropriate packages
1420 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1421 - tightened up doc distribution
1422 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1423 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
1424 - rpm's horrible bug that prevents nested conditional macros prevents me
1425 - from implementing these 2 separate approaches within the conditionals which
1426 - create the separate server packages.
1427 - the solution adopted is to remove the gnome-console files from the server packages
1428 - so bacula-gconsole is now an add on for both client and server packages.
1429 - this also now allows the server packages to be install on machines without
1430 - an X-server and we can still maintain a single spec file.
1431 - added tests to make sure we have defined platform and database macros.
1432 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1433 - corrected mysql prerequisites for suse
1434 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1435 - replaced all cp commands with cp -p
1436 - removed addition of a+x permissions on gnome-console
1437 - corrected permissions on init scripts
1438 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1439 - corrected creation of sqlite_bindir in install from !mysql to sqlite
1441 - various cleanup patches from Michael K. Johnson:
1442 - corrected post install routines for nicer chkconfig
1443 - removed chmod changes in post routines and moved to install section
1444 - removed interactive nature of post routine for rescue package
1445 - added description of building rescue disks to the description of rescue package
1446 - added clean of build root to beginning of install
1447 - removed specifying attr in all file lists
1448 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1449 - added bconsole to client package
1450 - added gconsole package as add-on to client
1451 - removed spurious dependancies on updatedb package (!cut/paste)
1452 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1453 - added updatedb package
1454 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1455 - added postgresql package
1456 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1457 - corrected the if else logic in the dependancy sections
1458 - changes for 1.34 release
1459 - /etc/bacula/console is now /etc/bacula/bconsole
1460 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
1461 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
1462 - /usr/sbin/smtp is now /usr/sbin/bsmtp
1463 - added new /etc/bacula/drop_mysql_database
1464 - added new /etc/bacula/drop_sqlite_database
1465 - added new /etc/bacula/grant_sqlite_privileges
1466 - added new generic bacula database scripts in /etc/bacula
1467 - added pre-install sections to check for database versions older than 6
1468 - added check for /etc/bacula/console.conf and copy to bconsole.conf
1469 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1470 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
1471 - added testing for existing databases before executing any of the database creation scripts
1472 - added defines working_dir and sqlite_bindir in place of hard coded paths
1473 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1474 - added build configuration for SuSE.
1475 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
1476 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1477 - added patch for create_sqlite_database to fix the installed bindir
1478 - added execute of create_sqlite_database to post of sqlite package
1479 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1480 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
1481 - added bacula-fd as Requires for rescue package
1482 - added build tag for Fedora Core 1
1483 - cleaned up dependancies for all builds
1484 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1485 - removed rh_version from package names
1486 - added platform build configuration section to beginning of file
1487 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1488 - removed make_static_bacula script from rescue package install
1489 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1490 - Added define at top of file for depkgs version
1491 - Added rescue sub-package
1492 - Moved requires statements into proper sub-package locations
1493 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1494 - Corrected Requires for Gnome 1.4/2.0 builds
1495 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1496 - Added separate source declaration for depkgs
1497 - added patch for make_catalog_backup script
1498 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1499 - Misc changes to mysql/sqlite build and rh7/8 menu differences
1500 - Added rh_version to sub-package names
1501 - Added installed but missing file /etc/bacula/gconsole
1502 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
1503 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
1504 - Update spec for version 1.31 and combine client
1505 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>