]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/platforms/redhat/bacula.spec.in
Update rescue version.
[bacula/bacula] / bacula / platforms / redhat / bacula.spec.in
index a6367f4e89b7356043cfdfc8b7f2dbc11d60872b..616d76b9c7277b7341b89a0284a347f43a766504 100644 (file)
@@ -8,18 +8,22 @@
 %define depkgs_version 28Mar06
 %define sqlite_bindir /usr/lib/bacula/sqlite
 %define working_dir /var/bacula
+
+# NOTE these defines are used in some rather complex useradd and groupadd
+# commands. If you change them examine the post scripts for consequences.
 %define director_daemon_user bacula
 %define storage_daemon_user bacula
 %define file_daemon_user root
 %define daemon_group bacula
 # group that has write access to tape devices, usually disk on Linux
 %define storage_daemon_group disk
+
 %define user_file /etc/passwd
 %define group_file /etc/group
 %define useradd /usr/sbin/useradd
 %define groupadd /usr/sbin/groupadd
 %define usermod /usr/sbin/usermod
-%define _rescuever 1.8.3
+%define _rescuever 1.8.4
 
 # platform defines - set one below or define the build_xxx on the command line
 # RedHat builds
@@ -36,6 +40,8 @@
 %{?build_fc3:%define fc3 1}
 %define fc4 0
 %{?build_fc4:%define fc4 1}
+%define fc5 0
+%{?build_fc5:%define fc5 1}
 # Whitebox Enterprise build
 %define wb3 0
 %{?build_wb3:%define wb3 1}
@@ -66,7 +72,7 @@
 %{?build_mdv:%define mdk 1}
 
 # test for a platform definition
-%if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{mdk}
+%if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{mdk}
 %{error: You must specify a platform. Please examine the spec file.}
 exit 1
 %endif
@@ -76,7 +82,7 @@ exit 1
 %define mysql 0
 %{?build_mysql:%define mysql 1}
 # if using mysql 4.x define this and mysql above
-# currently: Mandrake 10.1, SuSE 9.2, RHEL4 and Fedora Core 4
+# currently: Mandrake 10.1, SuSE 9.x & 10.x, RHEL4 and Fedora Core 4 & 5
 %define mysql4 0
 %{?build_mysql4:%define mysql4 1}
 %{?build_mysql4:%define mysql 1}
@@ -109,7 +115,7 @@ exit 1
 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4}
 %define _dist %(grep Red /etc/redhat-release)
 %endif
-%if %{fc1} || %{fc4}
+%if %{fc1} || %{fc4} || %{fc5}
 %define _dist %(grep Fedora /etc/redhat-release)
 %endif
 %if %{centos4} || %{centos3}
@@ -142,6 +148,16 @@ exit 1
 %define wxconsole 0
 %{?build_wxconsole:%define wxconsole 1}
 
+# define the basic package description
+%define blurb Bacula - It comes by night and sucks the vital essence from your computers.
+%define blurb2 Bacula is a set of computer programs that permit you (or the system
+%define blurb3 administrator) to manage backup, recovery, and verification of computer
+%define blurb4 data across a network of computers of different kinds. In technical terms,
+%define blurb5 it is a network client/server based backup program. Bacula is relatively
+%define blurb6 easy to use and efficient, while offering many advanced storage management
+%define blurb7 features that make it easy to find and recover lost or damaged files.
+%define blurb8 Bacula source code has been released under the GPL version 2 license.
+
 Summary: Bacula - The Network Backup Solution
 Name: bacula
 Version: @VERSION@
@@ -267,11 +283,25 @@ BuildRequires: bonobo-activation-devel
 BuildRequires: GConf2-devel
 BuildRequires: freetype-devel
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
+%if %{fc5}
+BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.4
+%endif
+%if %{fc5} && %{gconsole}
+BuildRequires: gtk2-devel >= 2.8
+BuildRequires: libgnomeui-devel >= 2.14
+BuildRequires: ORBit2-devel
+BuildRequires: libart_lgpl-devel >= 2.3
+BuildRequires: libbonobo-devel >= 2.14
+BuildRequires: libbonoboui-devel >= 2.14
+BuildRequires: GConf2-devel
+BuildRequires: freetype-devel
+%endif
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5}
 BuildRequires: libtermcap-devel
 BuildRequires: glibc-devel >= 2.3
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && %{gconsole}
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && %{gconsole}
 BuildRequires: gtk2-devel >= 2.0
 BuildRequires: libgnomeui-devel >= 2.0
 BuildRequires: ORBit2-devel
@@ -305,15 +335,15 @@ BuildRequires: wxGTK-devel >= 2.6
 %endif
 
 %description
-Bacula - It comes by night and sucks the vital essence from your computers.
+%{blurb}
 
-Bacula is a set of computer programs that permit you (or the system 
-administrator) to manage backup, recovery, and verification of computer 
-data across a network of computers of different kinds. In technical terms, 
-it is a network client/server based backup program. Bacula is relatively 
-easy to use and efficient, while offering many advanced storage management 
-features that make it easy to find and recover lost or damaged files. 
-Bacula source code has been released under the GPL version 2 license.
+%{blurb2}
+%{blurb3}
+%{blurb4}
+%{blurb5}
+%{blurb6}
+%{blurb7}
+%{blurb8}
 
 %if %{mysql}
 %package mysql
@@ -340,10 +370,14 @@ Requires: libtermcap
 Requires: glibc >= 2.3
 Requires: termcap
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10}
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{fc5}
 Requires: glibc >= 2.3
 Requires: libtermcap
 %endif
+%if %{fc5}
+Requires: glibc >= 2.4
+Requires: libtermcap
+%endif
 
 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4}
 Requires: mysql >= 3.23
@@ -395,15 +429,15 @@ Requires: postgresql-server >= 7
 %description postgresql
 %endif
 
-Bacula - It comes by night and sucks the vital essence from your computers.
+%{blurb}
 
-Bacula is a set of computer programs that permit you (or the system 
-administrator) to manage backup, recovery, and verification of computer 
-data across a network of computers of different kinds. In technical terms, 
-it is a network client/server based backup program. Bacula is relatively 
-easy to use and efficient, while offering many advanced storage management 
-features that make it easy to find and recover lost or damaged files. 
-Bacula source code has been released under the GPL version 2 license.
+%{blurb2}
+%{blurb3}
+%{blurb4}
+%{blurb5}
+%{blurb6}
+%{blurb7}
+%{blurb8}
 
 %if %{mysql}
 This build requires MySQL to be installed separately as the catalog database.
@@ -442,21 +476,25 @@ Requires: libtermcap
 Requires: glibc >= 2.3
 Requires: termcap
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10}
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{fc5}
 Requires: glibc >= 2.3
 Requires: libtermcap
 %endif
+%if %{fc5}
+Requires: glibc >= 2.4
+Requires: libtermcap
+%endif
 
 %description client
-Bacula - It comes by night and sucks the vital essence from your computers.
+%{blurb}
 
-Bacula is a set of computer programs that permit you (or the system 
-administrator) to manage backup, recovery, and verification of computer 
-data across a network of computers of different kinds. In technical terms, 
-it is a network client/server based backup program. Bacula is relatively 
-easy to use and efficient, while offering many advanced storage management 
-features that make it easy to find and recover lost or damaged files. 
-Bacula source code has been released under the GPL version 2 license.
+%{blurb2}
+%{blurb3}
+%{blurb4}
+%{blurb5}
+%{blurb6}
+%{blurb7}
+%{blurb8}
 
 This is the File daemon (Client) only package. It includes the command line 
 console program.
@@ -467,15 +505,15 @@ Summary: Bacula - The Network Backup Solution
 Group: System Environment/Daemons
 
 %description updatedb
-Bacula - It comes by night and sucks the vital essence from your computers.
+%{blurb}
 
-Bacula is a set of computer programs that permit you (or the system 
-administrator) to manage backup, recovery, and verification of computer 
-data across a network of computers of different kinds. In technical terms, 
-it is a network client/server based backup program. Bacula is relatively 
-easy to use and efficient, while offering many advanced storage management 
-features that make it easy to find and recover lost or damaged files. 
-Bacula source code has been released under the GPL version 2 license.
+%{blurb2}
+%{blurb3}
+%{blurb4}
+%{blurb5}
+%{blurb6}
+%{blurb7}
+%{blurb8}
 
 This package installs scripts for updating older versions of the bacula
 database.
@@ -564,7 +602,18 @@ Requires: bonobo-activation
 Requires: GConf2
 Requires: freetype
 %endif
-%if %{gconsole} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
+%if %{gconsole} && %{fc5}  
+Requires: gtk2 >= 2.8
+Requires: libgnomeui >= 2.14
+Requires: glibc >= 2.4
+Requires: ORBit2
+Requires: libart_lgpl >= 2.3
+Requires: libbonobo >= 2.14
+Requires: libbonoboui >= 2.14
+Requires: GConf2
+Requires: freetype
+%endif
+%if %{gconsole} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5}
 Requires: gtk2 >= 2.0
 Requires: libgnomeui >= 2.0
 Requires: glibc >= 2.3
@@ -589,15 +638,15 @@ Requires: usermode
 
 %if %{gconsole}
 %description gconsole
-Bacula - It comes by night and sucks the vital essence from your computers.
+%{blurb}
 
-Bacula is a set of computer programs that permit you (or the system 
-administrator) to manage backup, recovery, and verification of computer 
-data across a network of computers of different kinds. In technical terms, 
-it is a network client/server based backup program. Bacula is relatively 
-easy to use and efficient, while offering many advanced storage management 
-features that make it easy to find and recover lost or damaged files. 
-Bacula source code has been released under the GPL version 2 license.
+%{blurb2}
+%{blurb3}
+%{blurb4}
+%{blurb5}
+%{blurb6}
+%{blurb7}
+%{blurb8}
 
 This is the Gnome Console package. It is an add-on to the client or
 server packages.
@@ -614,21 +663,29 @@ Requires: wxGTK >= 2.6, libstdc++, openssl
 Requires: gtk2 >= 2.8
 %endif
 
+%if %{wxconsole} && %{fc3}  
+Requires: gtk2 >= 2.4
+%endif
+
 %if %{wxconsole} && %{fc4}  
 Requires: gtk2 >= 2.6
 %endif
 
+%if %{wxconsole} && %{fc5}  
+Requires: gtk2 >= 2.8
+%endif
+
 %if %{wxconsole}
 %description wxconsole
-Bacula - It comes by night and sucks the vital essence from your computers.
+%{blurb}
 
-Bacula is a set of computer programs that permit you (or the system 
-administrator) to manage backup, recovery, and verification of computer 
-data across a network of computers of different kinds. In technical terms, 
-it is a network client/server based backup program. Bacula is relatively 
-easy to use and efficient, while offering many advanced storage management 
-features that make it easy to find and recover lost or damaged files. 
-Bacula source code has been released under the GPL version 2 license.
+%{blurb2}
+%{blurb3}
+%{blurb4}
+%{blurb5}
+%{blurb6}
+%{blurb7}
+%{blurb8}
 
 This is the WXWindows Console package. It is an add-on to the client or
 server packages.
@@ -680,7 +737,6 @@ patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
 %endif
 
 # 64 bit lib location hacks
-# this is the location on redhat type platforms, don't know about others yet
 %if %{x86_64}
 export LDFLAGS=-L/usr/lib64
 %endif
@@ -842,7 +898,7 @@ cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications
 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
 %endif
-%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{mdk}
+%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{mdk}
 %define iftrick 1
 %else
 %define iftrick 0
@@ -1065,19 +1121,19 @@ fi
 # this will be a unique group on redhat type systems or the group users on some systems
 HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
 if [ -z "$HAVE_BACULA" ]; then
-        %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
+        %{useradd} -r -c "Bacula" -d %{working_dir} -g %{storage_daemon_group} -M -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
         echo "The user %{storage_daemon_user} has been added to %{user_file}."
         echo "See the manual chapter \"Running Bacula\" for details."
 fi
 HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
 if [ -z "$HAVE_BACULA" ]; then
-        %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
+        %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
         echo "The user %{director_daemon_user} has been added to %{user_file}."
         echo "See the manual chapter \"Running Bacula\" for details."
 fi
 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
 if [ -z "$HAVE_BACULA" ]; then
-        %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
+        %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
         echo "The user %{file_daemon_user} has been added to %{user_file}."
         echo "See the manual chapter \"Running Bacula\" for details."
 fi
@@ -1085,15 +1141,15 @@ fi
 # we only do this if the user is NOT root
 IS_ROOT=%{director_daemon_user}
 if [ "$IS_ROOT" != "root" ]; then
-%{usermod} %{director_daemon_user} -G %{daemon_group}
+%{usermod} -G %{daemon_group} %{director_daemon_user}
 fi
 IS_ROOT=%{storage_daemon_user}
 if [ "$IS_ROOT" != "root" ]; then
-%{usermod} %{storage_daemon_user} -G %{daemon_group},%{storage_daemon_group}
+%{usermod} -G %{daemon_group},%{storage_daemon_group} %{storage_daemon_user}
 fi
 IS_ROOT=%{file_daemon_user}
 if [ "$IS_ROOT" != "root" ]; then
-%{usermod} %{file_daemon_user} -G %{daemon_group}
+%{usermod} -G %{daemon_group} %{file_daemon_user}
 fi
 
 %if %{mysql}
@@ -1267,7 +1323,7 @@ fi
 # this will be a unique group on redhat type systems or the group users on some systems
 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
 if [ -z "$HAVE_BACULA" ]; then
-        %{useradd} -r -c "Bacula" -d %{working_dir} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
+        %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
         echo "The user %{file_daemon_user} has been added to %{user_file}."
         echo "See the manual chapter \"Running Bacula\" for details."
 fi
@@ -1275,7 +1331,7 @@ fi
 # we only do this if the user is NOT root
 IS_ROOT=%{file_daemon_user}
 if [ "$IS_ROOT" != "root" ]; then
-%{usermod} %{file_daemon_user} -G %{daemon_group}
+%{usermod} -G %{daemon_group} %{file_daemon_user}
 fi
 
 %post client
@@ -1329,9 +1385,6 @@ echo "The database update scripts were installed to /etc/bacula/updatedb"
 %attr(-, root, %{daemon_group}) /etc/bacula/gconsole
 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/gnome-console.conf
 /usr/share/pixmaps/bacula.png
-%endif
-
-%if %{gconsole}
 /usr/share/applications/bacula.desktop
 %endif
 
@@ -1383,9 +1436,6 @@ fi
 %attr(-, root, %{daemon_group}) %dir /etc/bacula
 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/wxconsole.conf
 /usr/share/pixmaps/wxwin16x16.xpm
-%endif
-
-%if %{wxconsole}
 /usr/share/applications/wxconsole.desktop
 %endif
 
@@ -1424,6 +1474,15 @@ fi
 %endif
 
 %changelog
+* Mon Jun 12 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 1.38.10 bump rescue version
+* Sun Jun 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- fix usermod statements
+- add fc5 target
+* Thu Apr 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- add -g param back to useradd statements Bug 605
+* Mon Apr 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- redundant code cleanup
 * Sun Apr 16 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
 - add wxconsole package
 * Fri Apr 14 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>