]> 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 48a65028e5769280e686a4b5da61233f6fff60dc..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}
@@ -277,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
@@ -350,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
@@ -452,10 +476,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
 
 %description client
 %{blurb}
@@ -574,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
@@ -632,6 +671,10 @@ Requires: gtk2 >= 2.4
 Requires: gtk2 >= 2.6
 %endif
 
+%if %{wxconsole} && %{fc5}  
+Requires: gtk2 >= 2.8
+%endif
+
 %if %{wxconsole}
 %description wxconsole
 %{blurb}
@@ -855,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
@@ -1078,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
@@ -1098,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}
@@ -1280,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
@@ -1288,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
@@ -1431,6 +1474,13 @@ 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>