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 BuildRoot: %{_tmppath}/%{name}-root
149 URL: http://www.bacula.org/
150 Vendor: The Bacula Team
151 Distribution: %{_dist}
152 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
154 %define _docsrc ../%{name}-docs-%{version}
155 %define _rescuesrc ../%{name}-rescue-%{_rescuever}
157 BuildRequires: atk-devel, ncurses-devel, pango-devel, perl
158 BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel
159 BuildRequires: openssl-devel
161 BuildRequires: pkgconfig
164 BuildRequires: libtermcap-devel
165 BuildRequires: glibc-devel >= 2.2
168 BuildRequires: termcap
169 BuildRequires: glibc-devel >= 2.3
171 %if %{su9} && %{gconsole}
172 BuildRequires: libgnome >= 2.0
173 BuildRequires: gtk2-devel >= 2.0
174 BuildRequires: libgnomeui-devel >= 2.0
175 BuildRequires: ORBit2-devel
176 BuildRequires: libart_lgpl-devel >= 2.0
177 BuildRequires: libbonobo-devel >= 2.0
178 BuildRequires: libbonoboui-devel >= 2.0
179 BuildRequires: bonobo-activation-devel
180 BuildRequires: gconf2-devel
181 BuildRequires: linc-devel
182 BuildRequires: freetype2-devel
185 BuildRequires: termcap
186 BuildRequires: glibc-devel >= 2.3
188 %if %{su10} && %{gconsole}
189 BuildRequires: libgnome >= 2.12
190 BuildRequires: gtk2-devel >= 2.8
191 BuildRequires: libgnomeui-devel >= 2.12
192 BuildRequires: ORBit2-devel
193 BuildRequires: libart_lgpl-devel >= 2.3
194 BuildRequires: libbonobo-devel >= 2.10
195 BuildRequires: libbonoboui-devel >= 2.10
196 BuildRequires: bonobo-activation-devel
197 BuildRequires: gconf2-devel
198 BuildRequires: freetype2-devel
199 BuildRequires: cairo-devel
200 BuildRequires: fontconfig-devel >= 2.3
201 BuildRequires: gnome-vfs2-devel >= 2.12
202 BuildRequires: libpng-devel
205 BuildRequires: libtermcap-devel
206 BuildRequires: libstdc++-static-devel
207 BuildRequires: glibc-static-devel
208 BuildRequires: glibc-devel >= 2.3
210 %if %{mdk} && %{gconsole}
211 BuildRequires: gtk2-devel >= 2.0
212 BuildRequires: libgnomeui2-devel >= 2.0
213 BuildRequires: libORBit2-devel
214 BuildRequires: libart_lgpl-devel >= 2.0
215 BuildRequires: libbonobo2_0-devel
216 BuildRequires: libbonoboui2_0-devel
217 BuildRequires: libbonobo-activation-devel
218 BuildRequires: libGConf2-devel
219 BuildRequires: freetype2-devel
222 BuildRequires: libtermcap-devel
223 BuildRequires: glibc-devel >= 2.3
225 %if %{fc3} && %{gconsole}
226 BuildRequires: gtk2-devel >= 2.4
227 BuildRequires: libgnomeui-devel >= 2.8
228 BuildRequires: ORBit2-devel
229 BuildRequires: libart_lgpl-devel >= 2.3
230 BuildRequires: libbonobo-devel >= 2.8
231 BuildRequires: libbonoboui-devel >= 2.8
232 BuildRequires: bonobo-activation-devel
233 BuildRequires: GConf2-devel
234 BuildRequires: freetype-devel
237 BuildRequires: libtermcap-devel
238 BuildRequires: glibc-devel >= 2.3
240 %if %{fc4} && %{gconsole}
241 BuildRequires: gtk2-devel >= 2.6
242 BuildRequires: libgnomeui-devel >= 2.10
243 BuildRequires: ORBit2-devel
244 BuildRequires: libart_lgpl-devel >= 2.3
245 BuildRequires: libbonobo-devel >= 2.8
246 BuildRequires: libbonoboui-devel >= 2.8
247 BuildRequires: bonobo-activation-devel
248 BuildRequires: GConf2-devel
249 BuildRequires: freetype-devel
251 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
252 BuildRequires: libtermcap-devel
253 BuildRequires: glibc-devel >= 2.3
255 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && %{gconsole}
256 BuildRequires: gtk2-devel >= 2.0
257 BuildRequires: libgnomeui-devel >= 2.0
258 BuildRequires: ORBit2-devel
259 BuildRequires: libart_lgpl-devel >= 2.0
260 BuildRequires: libbonobo-devel >= 2.0
261 BuildRequires: libbonoboui-devel >= 2.0
262 BuildRequires: bonobo-activation-devel
263 BuildRequires: GConf2-devel
264 BuildRequires: linc-devel
265 BuildRequires: freetype-devel
268 %if %{mysql} && ! %{mysql4}
269 BuildRequires: mysql-devel >= 3.23
272 %if %{mysql} && %{mysql4}
273 BuildRequires: mysql-devel >= 4.0
276 %if %{postgresql} && %{wb3}
277 BuildRequires: rh-postgresql-devel >= 7
280 %if %{postgresql} && ! %{wb3}
281 BuildRequires: postgresql-devel >= 7
285 Bacula - It comes by night and sucks the vital essence from your computers.
287 Bacula is a set of computer programs that permit you (or the system
288 administrator) to manage backup, recovery, and verification of computer
289 data across a network of computers of different kinds. In technical terms,
290 it is a network client/server based backup program. Bacula is relatively
291 easy to use and efficient, while offering many advanced storage management
292 features that make it easy to find and recover lost or damaged files.
293 Bacula source code has been released under the GPL version 2 license.
305 Summary: Bacula - The Network Backup Solution
306 Group: System Environment/Daemons
307 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
308 Conflicts: bacula-client
309 Obsoletes: bacula-rescue
310 Requires: ncurses, libstdc++, zlib, openssl, mtx
313 Requires: glibc >= 2.2
316 %if %{su9} || %{su10}
317 Requires: glibc >= 2.3
320 %if ! %{rh7} && ! %{su9} && ! %{su10}
321 Requires: glibc >= 2.3
325 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4}
326 Requires: mysql >= 3.23
327 Requires: mysql-server >= 3.23
329 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{mdk} && %{mysql4}
330 Requires: mysql >= 4.0
331 Requires: mysql-server >= 4.0
334 %if %{mysql} && %{su9} && ! %{mysql4}
335 Requires: mysql >= 3.23
336 Requires: mysql-client >= 3.23
338 %if %{mysql} && %{su9} && %{mysql4}
339 Requires: mysql >= 4.0
340 Requires: mysql-client >= 4.0
342 %if %{mysql} && %{su10} && %{mysql4}
343 Requires: mysql >= 4.0
344 Requires: mysql-client >= 4.0
347 %if %{mysql} && %{mdk} && ! %{mysql4}
348 Requires: mysql >= 3.23
349 Requires: mysql-client >= 3.23
351 %if %{mysql} && %{mdk} && %{mysql4}
352 Requires: mysql >= 4.0
353 Requires: mysql-client >= 4.0
356 %if %{postgresql} && %{wb3}
357 Requires: rh-postgresql >= 7
358 Requires: rh-postgresql-server >= 7
360 %if %{postgresql} && ! %{wb3}
361 Requires: postgresql >= 7
362 Requires: postgresql-server >= 7
372 %description postgresql
375 Bacula - It comes by night and sucks the vital essence from your computers.
377 Bacula is a set of computer programs that permit you (or the system
378 administrator) to manage backup, recovery, and verification of computer
379 data across a network of computers of different kinds. In technical terms,
380 it is a network client/server based backup program. Bacula is relatively
381 easy to use and efficient, while offering many advanced storage management
382 features that make it easy to find and recover lost or damaged files.
383 Bacula source code has been released under the GPL version 2 license.
386 This build requires MySQL to be installed separately as the catalog database.
389 This build requires PostgreSQL to be installed separately as the catalog database.
392 This build incorporates sqlite as the catalog database, statically compiled.
396 Summary: Bacula - The Network Backup Solution
397 Group: System Environment/Daemons
401 This is Bacula's version of mtx tape utilities for Linux distributions that
402 do not provide their own mtx package
405 Summary: Bacula - The Network Backup Solution
406 Group: System Environment/Daemons
408 Conflicts: bacula-mysql
409 Conflicts: bacula-sqlite
410 Conflicts: bacula-postgresql
411 Obsoletes: bacula-rescue
412 Requires: libstdc++, zlib, openssl
415 Requires: glibc >= 2.2
418 %if %{su9} || %{su10}
419 Requires: glibc >= 2.3
422 %if ! %{rh7} && ! %{su9} && ! %{su10}
423 Requires: glibc >= 2.3
428 Bacula - It comes by night and sucks the vital essence from your computers.
430 Bacula is a set of computer programs that permit you (or the system
431 administrator) to manage backup, recovery, and verification of computer
432 data across a network of computers of different kinds. In technical terms,
433 it is a network client/server based backup program. Bacula is relatively
434 easy to use and efficient, while offering many advanced storage management
435 features that make it easy to find and recover lost or damaged files.
436 Bacula source code has been released under the GPL version 2 license.
438 This is the File daemon (Client) only package. It includes the command line
443 Summary: Bacula - The Network Backup Solution
444 Group: System Environment/Daemons
446 %description updatedb
447 Bacula - It comes by night and sucks the vital essence from your computers.
449 Bacula is a set of computer programs that permit you (or the system
450 administrator) to manage backup, recovery, and verification of computer
451 data across a network of computers of different kinds. In technical terms,
452 it is a network client/server based backup program. Bacula is relatively
453 easy to use and efficient, while offering many advanced storage management
454 features that make it easy to find and recover lost or damaged files.
455 Bacula source code has been released under the GPL version 2 license.
457 This package installs scripts for updating older versions of the bacula
462 Summary: Bacula - The Network Backup Solution
463 Group: System Environment/Daemons
464 Requires: atk, libstdc++, zlib, pango, libxml2, bacula-fd, openssl
467 %if %{gconsole} && %{su9}
468 Requires: gtk2 >= 2.0
469 Requires: libgnome >= 2.0
470 Requires: libgnomeui >= 2.0
471 Requires: glibc >= 2.3
473 Requires: libart_lgpl >= 2.0
474 Requires: libbonobo >= 2.0
475 Requires: libbonoboui >= 2.0
476 Requires: bonobo-activation
481 %if %{gconsole} && %{su10}
482 Requires: gtk2 >= 2.8
483 Requires: libgnome >= 2.12
484 Requires: libgnomeui >= 2.12
485 Requires: glibc >= 2.3
487 Requires: libart_lgpl >= 2.3
488 Requires: libbonobo >= 2.10
489 Requires: libbonoboui >= 2.10
490 Requires: bonobo-activation
494 Requires: fontconfig >= 2.3
495 Requires: gnome-vfs2 >= 2.12
498 %if %{gconsole} && %{mdk}
499 Requires: gtk2 >= 2.0
500 Requires: libgnomeui2
501 Requires: glibc >= 2.3
503 Requires: libart_lgpl >= 2.0
504 Requires: libbonobo >= 2.0
505 Requires: libbonoboui >= 2.0
509 %if %{gconsole} && %{fc3}
510 Requires: gtk2 >= 2.4
511 Requires: libgnomeui >= 2.8
512 Requires: glibc >= 2.3
514 Requires: libart_lgpl >= 2.3
515 Requires: libbonobo >= 2.8
516 Requires: libbonoboui >= 2.8
517 Requires: bonobo-activation
521 %if %{gconsole} && %{fc4}
522 Requires: gtk2 >= 2.6
523 Requires: libgnomeui >= 2.10
524 Requires: glibc >= 2.3
526 Requires: libart_lgpl >= 2.3
527 Requires: libbonobo >= 2.8
528 Requires: libbonoboui >= 2.8
529 Requires: bonobo-activation
533 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
534 Requires: gtk2 >= 2.0
535 Requires: libgnomeui >= 2.0
536 Requires: glibc >= 2.3
538 Requires: libart_lgpl >= 2.0
539 Requires: libbonobo >= 2.0
540 Requires: libbonoboui >= 2.0
541 Requires: bonobo-activation
546 %if %{gconsole} && %{su9}
549 %if %{gconsole} && %{su10}
552 %if %{gconsole} && ! %{su9} && ! %{su10}
557 %description gconsole
558 Bacula - It comes by night and sucks the vital essence from your computers.
560 Bacula is a set of computer programs that permit you (or the system
561 administrator) to manage backup, recovery, and verification of computer
562 data across a network of computers of different kinds. In technical terms,
563 it is a network client/server based backup program. Bacula is relatively
564 easy to use and efficient, while offering many advanced storage management
565 features that make it easy to find and recover lost or damaged files.
566 Bacula source code has been released under the GPL version 2 license.
568 This is the Gnome Console package. It is an add-on to the client or
582 %if %{su9} || %{su10}
583 export LDFLAGS="-L/usr/lib/termcap"
594 # patches for the bundled sqlite scripts
595 # as of 1.38.0 first 3 patches no longer needed
597 # patch the make_sqlite_tables script for installation bindir
598 # patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
600 # patch the create_sqlite_database script for installation bindir
601 #patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
603 # patch the make_catalog_backup script for installation bindir
604 #patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
606 # patch the update_sqlite_tables script for installation bindir
607 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
609 # patch the bacula-dir init script to remove sqlite service
610 %if %{sqlite} && %{su9}
611 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
613 %if %{sqlite} && %{su10}
614 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
617 # 64 bit lib location hacks
618 # this is the location on redhat type platforms, don't know about others yet
620 export LDFLAGS=-L/usr/lib64
622 %if %{mysql} && %{x86_64}
623 export LDFLAGS=-L/usr/lib64/mysql
628 --sbindir=/usr/sbin \
629 --sysconfdir=/etc/bacula \
630 --with-scriptdir=/etc/bacula \
631 --enable-smartalloc \
632 --enable-client-only \
642 --sbindir=/usr/sbin \
643 --sysconfdir=/etc/bacula \
644 --with-scriptdir=/etc/bacula \
645 --enable-smartalloc \
649 %if %{gconsole} && ! %{rh8}
650 --enable-tray-monitor \
656 --with-sqlite=${cwd}/%{depkgs}/sqlite \
661 --with-working-dir=%{working_dir} \
662 --with-pid-dir=/var/run \
663 --with-subsys-dir=/var/lock/subsys \
664 --with-dir-user=%{director_daemon_user} \
665 --with-dir-group=%{daemon_group} \
666 --with-sd-user=%{storage_daemon_user} \
667 --with-sd-group=%{storage_daemon_group} \
668 --with-fd-user=%{file_daemon_user} \
669 --with-fd-group=%{daemon_group} \
670 --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
671 --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
672 --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
673 --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
674 --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
675 --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
683 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
684 mkdir -p $RPM_BUILD_ROOT/etc/init.d
685 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
686 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/logfiles
687 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/services
688 mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
689 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
691 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
693 mkdir -p $RPM_BUILD_ROOT/etc/bacula/updatedb
694 %if %{gconsole} && ! %{su9} && ! %{su10}
695 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
696 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
697 mkdir -p $RPM_BUILD_ROOT/usr/bin
701 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
705 prefix=$RPM_BUILD_ROOT/usr \
706 sbindir=$RPM_BUILD_ROOT/usr/sbin \
707 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
708 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
709 working_dir=$RPM_BUILD_ROOT%{working_dir} \
714 prefix=$RPM_BUILD_ROOT/usr \
715 sbindir=$RPM_BUILD_ROOT/usr/sbin \
716 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
717 working_dir=$RPM_BUILD_ROOT%{working_dir} \
718 mandir=$RPM_BUILD_ROOT/usr/man \
722 # fixme - make installs the mysql scripts for sqlite build
724 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
725 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
726 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
729 # fixme - make installs the mysql scripts for postgresql build
731 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
732 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
735 # fixme - make installs gconsole script for build without gconsole
737 rm -f $RPM_BUILD_ROOT/etc/bacula/gconsole
740 rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
742 # install the init scripts
743 %if %{su9} || %{su10}
744 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
745 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
746 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
749 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
750 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
751 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
753 %if ! %{su9} && ! %{su10} && ! %{mdk}
754 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
755 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
756 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
758 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
760 # install the menu stuff
761 %if %{gconsole} && %{su9}
762 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
763 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
764 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
765 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
767 %if %{gconsole} && %{su10}
768 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
769 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
770 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
771 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
773 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{mdk}
778 %if %{gconsole} && %{iftrick}
779 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
780 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
781 cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console
782 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console
783 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console
785 %if %{gconsole} && ! %{rh8}
786 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
787 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
792 cp -p %{depkgs}/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
793 cp -p %{depkgs}/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
794 cp -p %{depkgs}/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
797 # install the logrotate file
798 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
800 # install the updatedb scripts
801 cp -p updatedb/* $RPM_BUILD_ROOT/etc/bacula/updatedb/
803 # install the logwatch scripts
804 cp -p scripts/logwatch/bacula $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
805 cp -p scripts/logwatch/logfile.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
806 cp -p scripts/logwatch/services.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
807 chmod 755 $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
808 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
809 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
811 # install the rescue files
812 mkdir $RPM_BUILD_ROOT/etc/bacula/rescue
813 cp -p %{_rescuesrc}/Makefile* $RPM_BUILD_ROOT/etc/bacula/rescue/
814 cp -p %{_rescuesrc}/README $RPM_BUILD_ROOT/etc/bacula/rescue/
815 cp -p %{_rescuesrc}/configure $RPM_BUILD_ROOT/etc/bacula/rescue/
816 cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT/etc/bacula/rescue/
817 cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT/etc/bacula/rescue/
818 cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT/etc/bacula/rescue/
819 touch $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/rpm_release
820 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/bacula/bin/bacula-fd
821 rm -f src/filed/static-bacula-fd
823 # now clean up permissions that are left broken by the install
824 chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
825 chmod o-rwx $RPM_BUILD_ROOT/var/bacula
826 %if %{gconsole} && ! %{rh8}
827 chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
828 chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf
832 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
835 # MySQL specific files
837 %defattr(-, root, root)
838 %attr(-, root, %{daemon_group}) /etc/bacula/create_mysql_database
839 %attr(-, root, %{daemon_group}) /etc/bacula/drop_mysql_database
840 %attr(-, root, %{daemon_group}) /etc/bacula/make_mysql_tables
841 %attr(-, root, %{daemon_group}) /etc/bacula/drop_mysql_tables
842 %attr(-, root, %{daemon_group}) /etc/bacula/update_mysql_tables
843 %attr(-, root, %{daemon_group}) /etc/bacula/grant_mysql_privileges
844 %attr(-, root, %{daemon_group}) /etc/bacula/startmysql
845 %attr(-, root, %{daemon_group}) /etc/bacula/stopmysql
850 %defattr(-,root,root)
851 %attr(-, root, %{daemon_group}) /etc/bacula/create_sqlite_database
852 %attr(-, root, %{daemon_group}) /etc/bacula/drop_sqlite_database
853 %attr(-, root, %{daemon_group}) /etc/bacula/grant_sqlite_privileges
854 %attr(-, root, %{daemon_group}) /etc/bacula/make_sqlite_tables
855 %attr(-, root, %{daemon_group}) /etc/bacula/drop_sqlite_tables
856 %attr(-, root, %{daemon_group}) /etc/bacula/update_sqlite_tables
857 %{sqlite_bindir}/libsqlite.a
858 %{sqlite_bindir}/sqlite.h
859 %{sqlite_bindir}/sqlite
864 %defattr(-,root,root)
865 %attr(-, root, %{daemon_group}) /etc/bacula/create_postgresql_database
866 %attr(-, root, %{daemon_group}) /etc/bacula/drop_postgresql_database
867 %attr(-, root, %{daemon_group}) /etc/bacula/make_postgresql_tables
868 %attr(-, root, %{daemon_group}) /etc/bacula/drop_postgresql_tables
869 %attr(-, root, %{daemon_group}) /etc/bacula/update_postgresql_tables
870 %attr(-, root, %{daemon_group}) /etc/bacula/grant_postgresql_privileges
873 # The rest is DB backend independent
874 %attr(-, root, %{daemon_group}) %dir /etc/bacula
875 %attr(-, root, %{daemon_group}) /etc/bacula/bacula
876 %attr(-, root, %{daemon_group}) /etc/bacula/bconsole
877 %attr(-, root, %{daemon_group}) /etc/bacula/create_bacula_database
878 %attr(-, root, %{daemon_group}) /etc/bacula/drop_bacula_database
879 %attr(-, root, %{daemon_group}) /etc/bacula/grant_bacula_privileges
880 %attr(-, root, %{daemon_group}) /etc/bacula/make_bacula_tables
881 %attr(-, root, %{daemon_group}) /etc/bacula/drop_bacula_tables
882 %attr(-, root, %{daemon_group}) /etc/bacula/update_bacula_tables
883 %attr(-, root, %{daemon_group}) /etc/bacula/make_catalog_backup
884 %attr(-, root, %{daemon_group}) /etc/bacula/delete_catalog_backup
885 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.dbx
886 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.gdb
887 %attr(-, root, %{daemon_group}) /etc/bacula/rescue
888 %attr(-, root, %{daemon_group}) /etc/bacula/disk-changer
889 %attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-dir
890 %attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-fd
891 %attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-sd
892 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
893 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
894 %attr(-, root, %{storage_daemon_group}) /etc/bacula/dvd-handler
895 %attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
896 %attr(-, root, %{storage_daemon_group}) /etc/bacula/mtx-changer
898 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
899 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
901 /etc/logrotate.d/bacula
902 /etc/log.d/scripts/services/bacula
903 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bacula-dir.conf
904 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bacula-fd.conf
905 %attr(-, root, %{storage_daemon_group}) %config(noreplace) /etc/bacula/bacula-sd.conf
906 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bconsole.conf
907 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
908 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/services/bacula.conf
909 %attr(-, root, %{daemon_group}) /etc/bacula/query.sql
910 %attr(-, root, %{daemon_group}) %dir %{working_dir}
929 # test for bacula database older than version 8
930 # note: this ASSUMES no password has been set for bacula database
931 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
936 # test for bacula database older than version 8
937 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
938 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
943 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
946 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then
947 echo "This bacula upgrade will update a bacula database from version 8 to 9."
948 echo "You appear to be running database version $DB_VER. You must first update"
949 echo "your database to version 8 and then install this upgrade. The alternative"
950 echo "is to use /etc/bacula/drop_%{db_backend}_tables to delete all your your current"
951 echo "catalog information, then do the upgrade. Information on updating a"
952 echo "database older than version 8 can be found in the release notes."
960 # check for and copy /etc/bacula/console.conf to bconsole.conf
961 if [ -s /etc/bacula/console.conf ];then
962 cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
965 # create the daemon users and groups
966 # first create the groups if they don't exist
967 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
968 if [ -z "$HAVE_BACULA" ]; then
969 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
970 echo "The group %{daemon_group} has been added to %{group_file}."
971 echo "See the manual chapter \"Running Bacula\" for details."
973 HAVE_BACULA=`grep %{storage_daemon_group} %{group_file} 2>/dev/null`
974 if [ -z "$HAVE_BACULA" ]; then
975 %{groupadd} -r %{storage_daemon_group} > /dev/null 2>&1
976 echo "The group %{storage_daemon_group} has been added to %{group_file}."
977 echo "See the manual chapter \"Running Bacula\" for details."
979 # now create the users if they do not exist
980 # we do not use the -g option allowing the primary group to be set to system default
981 # this will be a unique group on redhat type systems or the group users on some systems
982 HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
983 if [ -z "$HAVE_BACULA" ]; then
984 %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
985 echo "The user %{storage_daemon_user} has been added to %{user_file}."
986 echo "See the manual chapter \"Running Bacula\" for details."
988 HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
989 if [ -z "$HAVE_BACULA" ]; then
990 %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
991 echo "The user %{director_daemon_user} has been added to %{user_file}."
992 echo "See the manual chapter \"Running Bacula\" for details."
994 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
995 if [ -z "$HAVE_BACULA" ]; then
996 %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
997 echo "The user %{file_daemon_user} has been added to %{user_file}."
998 echo "See the manual chapter \"Running Bacula\" for details."
1000 # now we add the supplementary groups, this is ok to call even if the users already exist
1001 # we only do this if the user is NOT root
1002 IS_ROOT=%{director_daemon_user}
1003 if [ "$IS_ROOT" != "root" ]; then
1004 %{usermod} %{director_daemon_user} -G %{daemon_group}
1006 IS_ROOT=%{storage_daemon_user}
1007 if [ "$IS_ROOT" != "root" ]; then
1008 %{usermod} %{storage_daemon_user} -G %{daemon_group},%{storage_daemon_group}
1010 IS_ROOT=%{file_daemon_user}
1011 if [ "$IS_ROOT" != "root" ]; then
1012 %{usermod} %{file_daemon_user} -G %{daemon_group}
1026 if [ "$1" -ge 1 ] ; then
1027 /sbin/chkconfig --add bacula-dir
1028 /sbin/chkconfig --add bacula-fd
1029 /sbin/chkconfig --add bacula-sd
1033 # test for an existing database
1034 # note: this ASSUMES no password has been set for bacula database
1035 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1037 # grant privileges and create tables if they do not exist
1038 if [ -z "$DB_VER" ]; then
1039 echo "Hmm, doesn't look like you have an existing database."
1040 echo "Granting privileges for MySQL user bacula..."
1041 /etc/bacula/grant_mysql_privileges
1042 echo "Creating MySQL bacula database..."
1043 /etc/bacula/create_mysql_database
1044 echo "Creating bacula tables..."
1045 /etc/bacula/make_mysql_tables
1047 # check to see if we need to upgrade a 1.36 or lower database
1048 elif [ "$DB_VER" -lt "9" ]; then
1049 echo "This release requires an upgrade to your bacula database."
1050 echo "Backing up your current database..."
1051 mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1052 echo "Upgrading bacula database ..."
1053 /etc/bacula/update_mysql_tables
1054 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1060 # test for an existing database
1061 if [ -s %{working_dir}/bacula.db ]; then
1062 DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1063 # check to see if we need to upgrade a 1.36 or lower database
1064 if [ "$DB_VER" -lt "9" ] && [ "$DB_VER" -ge "8" ]; then
1065 echo "This release requires an upgrade to your bacula database."
1066 echo "Backing up your current database..."
1067 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1068 echo "Upgrading bacula database ..."
1069 /etc/bacula/update_sqlite_tables
1070 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1073 # create the database and tables
1074 echo "Hmm, doesn't look like you have an existing database."
1075 echo "Creating SQLite database..."
1076 /etc/bacula/create_sqlite_database
1077 echo "Creating the SQLite tables..."
1078 /etc/bacula/make_sqlite_tables
1083 # test for an existing database
1084 # note: this ASSUMES no password has been set for bacula database
1085 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1087 # grant privileges and create tables if they do not exist
1088 if [ -z "$DB_VER" ]; then
1089 echo "Hmm, doesn't look like you have an existing database."
1090 echo "Creating PostgreSQL bacula database..."
1091 /etc/bacula/create_postgresql_database
1092 echo "Creating bacula tables..."
1093 /etc/bacula/make_postgresql_tables
1094 echo "Granting privileges for PostgreSQL user bacula..."
1095 /etc/bacula/grant_postgresql_privileges
1097 # check to see if we need to upgrade a 1.36 or lower database
1098 elif [ "$DB_VER" -lt "9" ]; then
1099 echo "This release requires an upgrade to your bacula database."
1100 echo "Backing up your current database..."
1101 pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1102 echo "Upgrading bacula database ..."
1103 /etc/bacula/update_postgresql_tables
1104 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1109 # generate passwords if needed
1110 if [ -d /etc/bacula ]; then
1112 for file in *.conf; do
1113 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
1114 need_password=`grep $string $file 2>/dev/null`
1115 if [ -n "$need_password" ]; then
1116 pass=`openssl rand -base64 33`
1117 sed "s-$string-$pass-g" $file > $file.new
1118 cp -f $file.new $file; rm -f $file.new
1136 /sbin/chkconfig --del bacula-dir
1137 /sbin/chkconfig --del bacula-fd
1138 /sbin/chkconfig --del bacula-sd
1143 %attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
1144 %attr(-, root, %{storage_daemon_group}) /usr/sbin/mtx
1145 %attr(-, root, %{storage_daemon_group}) /usr/sbin/scsitape
1146 %attr(-, root, %{storage_daemon_group}) /usr/sbin/tapeinfo
1151 %defattr(-,root,root)
1152 %attr(-, root, %{daemon_group}) %dir /etc/bacula
1153 %attr(-, root, %{daemon_group}) /etc/bacula/bconsole
1154 /etc/init.d/bacula-fd
1155 %attr(-, root, %{daemon_group}) /etc/bacula/rescue
1157 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1158 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1160 /etc/logrotate.d/bacula
1162 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bacula-fd.conf
1163 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bconsole.conf
1164 %attr(-, root, %{daemon_group}) %dir %{working_dir}
1167 /usr/sbin/btraceback
1168 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.gdb
1169 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.dbx
1175 # create the daemon group and user
1176 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1177 if [ -z "$HAVE_BACULA" ]; then
1178 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1179 echo "The group %{daemon_group} has been added to %{group_file}."
1180 echo "See the manual chapter \"Running Bacula\" for details."
1182 # we do not use the -g option allowing the primary group to be set to system default
1183 # this will be a unique group on redhat type systems or the group users on some systems
1184 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
1185 if [ -z "$HAVE_BACULA" ]; then
1186 %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
1187 echo "The user %{file_daemon_user} has been added to %{user_file}."
1188 echo "See the manual chapter \"Running Bacula\" for details."
1190 # now we add the supplementary group, this is ok to call even if the user already exists
1191 # we only do this if the user is NOT root
1192 IS_ROOT=%{file_daemon_user}
1193 if [ "$IS_ROOT" != "root" ]; then
1194 %{usermod} %{file_daemon_user} -G %{daemon_group}
1199 if [ "$1" -ge 1 ] ; then
1200 /sbin/chkconfig --add bacula-fd
1203 # generate passwords if needed
1204 if [ -d /etc/bacula ]; then
1206 for file in *.conf; do
1207 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
1208 need_password=`grep $string $file 2>/dev/null`
1209 if [ -n "$need_password" ]; then
1210 pass=`openssl rand -base64 33`
1211 sed "s-$string-$pass-g" $file > $file.new
1212 cp -f $file.new $file; rm -f $file.new
1221 /sbin/chkconfig --del bacula-fd
1225 %defattr(-,root,%{daemon_group})
1226 /etc/bacula/updatedb/*
1229 # create the daemon group
1230 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1231 if [ -z "$HAVE_BACULA" ]; then
1232 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1233 echo "The group %{daemon_group} has been added to %{group_file}."
1234 echo "See the manual chapter \"Running Bacula\" for details."
1238 echo "The database update scripts were installed to /etc/bacula/updatedb"
1242 %defattr(-,root,root)
1243 /usr/sbin/gnome-console
1244 %attr(-, root, %{daemon_group}) %dir /etc/bacula
1245 %attr(-, root, %{daemon_group}) /etc/bacula/gconsole
1246 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/gnome-console.conf
1247 /usr/share/pixmaps/bacula.png
1251 /usr/share/applications/bacula.desktop
1254 %if %{gconsole} && ! %{rh8}
1255 /usr/sbin/bacula-tray-monitor
1256 %config(noreplace) /etc/bacula/tray-monitor.conf
1257 /usr/share/pixmaps/bacula-tray-monitor.xpm
1258 /usr/share/applications/bacula-tray-monitor.desktop
1261 %if %{gconsole} && ! %{su9} && ! %{su10}
1262 # add the console helper files
1263 %config(noreplace,missingok) /etc/pam.d/gnome-console
1264 %config(noreplace,missingok) /etc/security/console.apps/gnome-console
1265 /usr/bin/gnome-console
1270 # create the daemon group
1271 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1272 if [ -z "$HAVE_BACULA" ]; then
1273 %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1274 echo "The group %{daemon_group} has been added to %{group_file}."
1275 echo "See the manual chapter \"Running Bacula\" for details."
1279 # generate passwords if needed
1280 if [ -d /etc/bacula ]; then
1282 for file in *.conf; do
1283 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
1284 need_password=`grep $string $file 2>/dev/null`
1285 if [ -n "$need_password" ]; then
1286 pass=`openssl rand -base64 33`
1287 sed "s-$string-$pass-g" $file > $file.new
1288 cp -f $file.new $file; rm -f $file.new
1296 * Fri Apr 14 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1298 * Sun Apr 08 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1300 - remove -n option from useradd scripts
1301 * Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1303 - fix problem specifying more than one primary group for user bacula
1304 - add build switch to not build gconsole regardless of platform
1305 * Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1306 - add centos3 build tag
1307 - fix link error of static-fd on Mandrake with --disable-nls
1308 * Fri Jan 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1309 - add fc4 dependencies
1310 * Mon Jan 23 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1311 - add SuSE 10.0 build
1312 - remove specific permission in attrib macros
1313 * Sat Jan 21 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
1315 - fix usermode required on suse, suse doesn't have usermode (xsu instead)
1316 - refix compat for _dist on SLES9 which seems to have been removed
1317 - added note regarding Aleksandar's use of specific permissions in attrib macros
1318 - need to review and add specific fc4 build currently using fc3 Requires
1319 * Wed Dec 14 2005 Aleksandar Milivojevic <alex@milivojevic.org>
1321 - Reorganize files and pre/post sections to remove repetitions
1322 - Always build separate mtx package
1323 - Fix file ownerships for /etc/bacula and Bacula's working dir
1324 * Wed Nov 23 2005 Aleksandar Milivojevic <alex@milivojevic.org>
1325 - Disable GNOME on RH7
1326 * Fri Nov 18 2005 Aleksandar Milivojevic <alex@milivojevic.org>
1327 - Red Hat and look alikes have mtx RPM, do not build/package our version
1328 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1329 - minor edit to _dist for SLES9 compatibility
1330 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1332 - kern changed location of pdf files and html manual in docs package
1333 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1335 - add docs (from prebuilt tarball) and rescue packages back in
1336 - remove dvd-freespace and dvd-writepart files, add dvd-handler
1337 - remove 3 of 4 sqlite script patches as not needed
1338 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1340 - remove docs and rescue sections (remove static fd)
1341 - add dvd-freespace and dvd-writepart files
1342 - update depkgs to 22Jun05
1343 - change database update to 8 to 9
1344 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1345 - minor cleanups before 1.38 changes
1346 - add popt and popt-devel build dependencies
1347 - add tetex and tetex-dvips dependencies for doc build
1348 - replace deprecated Copyright tag with License
1349 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1350 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
1351 - conflict with sqlite packages. remove readline dependency.
1352 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1353 - release 1.36.3 update docs
1354 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1355 - add centos4 build tag
1356 - add x86_64 build tag
1357 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1358 - add rhel4 build tag
1359 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
1360 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1361 - add rhel3 build tag
1362 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1363 - fix tray-monitor.conf for noreplace
1364 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1365 - fix distribution check for Fedora and Whitebox
1366 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1367 - add logwatch script
1369 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1370 - add build for Fedora Core 3 (linc now included in ORDit2)
1371 - add mysql4 define for Mandrake 10.1
1372 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1373 - fix {group_file} variable in post scripts
1374 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
1375 - add distribution checking and custom Distribution tag
1376 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1377 - ASSIGNMENT OF COPYRIGHT
1378 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
1379 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
1380 - all right, title and interest in and to the copyright in this software RPM
1381 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
1382 - free of all liens, encumbrances or any known claims against said copyright.
1383 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1385 - thanks to Daniel Widyono
1386 - update description for rescue package to describe cdrom creation
1387 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1388 - update depkgs to 29Oct04
1389 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1390 - add cdrom rescue to bacula-rescue package
1391 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1392 - misc fixes from 1.36.0 suse feedback
1393 - fix situation where sqlite database exists but sqlite has been removed.
1394 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1395 - remove tray-monitor from RH8 build
1396 - fix permissions on tray-monitor files
1397 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1398 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
1399 - change database update to 7 to 8 upgrade,
1400 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
1401 - build in 30Jul04, add freetype dependancy to gnome package.
1402 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1403 - add documentation to console for groupadd
1404 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1405 - add support for running daemons as root.bacula
1406 - correct for change in location of floppy rescue files in 1.35.2
1407 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
1408 - updated depgkgs to 30Jul04
1409 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1410 - really, really fix symlink creation for gconsole
1411 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1412 - fix symlink creation in gconsole post install
1413 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1414 - fixed error in gconsole post script
1415 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1416 - add check for gconsole symlink before trying to create it
1417 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1418 - fix some minor permissions issues on doc files that CVS won't let us fix
1419 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1420 - add pkgconfig to BuildRequires
1421 - clean up gnome1/2 menu entries for appropriate packages
1422 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1423 - tightened up doc distribution
1424 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1425 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
1426 - rpm's horrible bug that prevents nested conditional macros prevents me
1427 - from implementing these 2 separate approaches within the conditionals which
1428 - create the separate server packages.
1429 - the solution adopted is to remove the gnome-console files from the server packages
1430 - so bacula-gconsole is now an add on for both client and server packages.
1431 - this also now allows the server packages to be install on machines without
1432 - an X-server and we can still maintain a single spec file.
1433 - added tests to make sure we have defined platform and database macros.
1434 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1435 - corrected mysql prerequisites for suse
1436 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1437 - replaced all cp commands with cp -p
1438 - removed addition of a+x permissions on gnome-console
1439 - corrected permissions on init scripts
1440 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1441 - corrected creation of sqlite_bindir in install from !mysql to sqlite
1443 - various cleanup patches from Michael K. Johnson:
1444 - corrected post install routines for nicer chkconfig
1445 - removed chmod changes in post routines and moved to install section
1446 - removed interactive nature of post routine for rescue package
1447 - added description of building rescue disks to the description of rescue package
1448 - added clean of build root to beginning of install
1449 - removed specifying attr in all file lists
1450 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1451 - added bconsole to client package
1452 - added gconsole package as add-on to client
1453 - removed spurious dependancies on updatedb package (!cut/paste)
1454 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1455 - added updatedb package
1456 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1457 - added postgresql package
1458 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1459 - corrected the if else logic in the dependancy sections
1460 - changes for 1.34 release
1461 - /etc/bacula/console is now /etc/bacula/bconsole
1462 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
1463 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
1464 - /usr/sbin/smtp is now /usr/sbin/bsmtp
1465 - added new /etc/bacula/drop_mysql_database
1466 - added new /etc/bacula/drop_sqlite_database
1467 - added new /etc/bacula/grant_sqlite_privileges
1468 - added new generic bacula database scripts in /etc/bacula
1469 - added pre-install sections to check for database versions older than 6
1470 - added check for /etc/bacula/console.conf and copy to bconsole.conf
1471 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1472 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
1473 - added testing for existing databases before executing any of the database creation scripts
1474 - added defines working_dir and sqlite_bindir in place of hard coded paths
1475 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1476 - added build configuration for SuSE.
1477 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
1478 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1479 - added patch for create_sqlite_database to fix the installed bindir
1480 - added execute of create_sqlite_database to post of sqlite package
1481 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1482 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
1483 - added bacula-fd as Requires for rescue package
1484 - added build tag for Fedora Core 1
1485 - cleaned up dependancies for all builds
1486 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1487 - removed rh_version from package names
1488 - added platform build configuration section to beginning of file
1489 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1490 - removed make_static_bacula script from rescue package install
1491 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1492 - Added define at top of file for depkgs version
1493 - Added rescue sub-package
1494 - Moved requires statements into proper sub-package locations
1495 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1496 - Corrected Requires for Gnome 1.4/2.0 builds
1497 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1498 - Added separate source declaration for depkgs
1499 - added patch for make_catalog_backup script
1500 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1501 - Misc changes to mysql/sqlite build and rh7/8 menu differences
1502 - Added rh_version to sub-package names
1503 - Added installed but missing file /etc/bacula/gconsole
1504 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
1505 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
1506 - Update spec for version 1.31 and combine client
1507 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>