]> git.sur5r.net Git - bacula/bacula/commitdiff
Continue work on bacula.spec
authorKern Sibbald <kern@sibbald.com>
Fri, 31 Jul 2009 06:09:56 +0000 (06:09 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 31 Jul 2009 06:09:56 +0000 (06:09 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@9134 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/platforms/redhat/bacula.spec
bacula/src/version.h

index 00ebd7847a707612958f8d808ee86079e18a4eb1..b78cbb1651a7c34bf1d2c1531087dfb17446d822 100644 (file)
@@ -11,7 +11,7 @@
 %define docs_version       3.0.2
 %define depkgs_version     18Feb09
 %define depkgs_qt_version  28Jul09
-%define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
+%define _packager Kern Sibbald <kern@sibbald.com>
 
 %define single_dir 0
 %{?single_dir_install:%define single_dir 1}
@@ -2278,13 +2278,12 @@ elif [ "$DB_VER" -lt "11" ]; then
         echo "Upgrading bacula database ..."
         %{script_dir}/update_mysql_tables
         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
-
 fi
 %endif
 
 %if %{sqlite}
 # test for an existing database
-if [ -s %{working_dir}/bacula.db ]; then
+if [ -f %{working_dir}/bacula.db ]; then
         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite3 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
         # check to see if we need to upgrade a 2.x database
         if [ "$DB_VER" -lt "11" ] && [ "$DB_VER" -ge "10" ]; then
@@ -2337,16 +2336,26 @@ fi
 # generate passwords if needed
 if [ -d %{sysconf_dir} ]; then
         cd %{sysconf_dir}
-        for file in *.conf; do
                 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
-                        need_password=`grep $string $file 2>/dev/null`
-                        if [ -n "$need_password" ]; then
                                 pass=`openssl rand -base64 33`
-                                sed "s-$string-$pass-g" $file > $file.new
+      for file in *.conf; do
+         need_password=`grep ${string} $file 2>/dev/null`
+         if [ -n "$need_password" ]; then
+            sed "s@${string}@${pass}@g" $file > $file.new
                                 cp -f $file.new $file; rm -f $file.new
                         fi
                 done
         done
+# put actual hostname in conf file
+   host=`hostname`
+   string="XXX_HOSTNAME_XXX"
+   for file in *.conf; do
+      need_host=`grep ${string} $file 2>/dev/null`
+      if [ -n "$need_host" ]; then
+         sed "s@${string}@${host}@g" $file >$file.new
+         cp -f $file.new $file; rm -f $file.new
+      fi
+   done
 fi
 /sbin/ldconfig
 %endif
@@ -2456,16 +2465,26 @@ fi
 # generate passwords if needed
 if [ -d %{sysconf_dir} ]; then
         cd %{sysconf_dir}
-        for file in *.conf; do
                 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
-                        need_password=`grep $string $file 2>/dev/null`
-                        if [ -n "$need_password" ]; then
                                 pass=`openssl rand -base64 33`
-                                sed "s-$string-$pass-g" $file > $file.new
+      for file in *.conf; do
+         need_password=`grep ${string} $file 2>/dev/null`
+         if [ -n "$need_password" ]; then
+            sed "s@${string}@${pass}@g" $file > $file.new
                                 cp -f $file.new $file; rm -f $file.new
                         fi
                 done
         done
+# put actual hostname in conf file
+   host=`hostname`
+   string="XXX_HOSTNAME_XXX"
+   for file in *.conf; do
+      need_host=`grep ${string} $file 2>/dev/null`
+      if [ -n "$need_host" ]; then
+         sed "s@${string}@${host}@g" $file >$file.new
+         cp -f $file.new $file; rm -f $file.new
+      fi
+   done
 fi
 
 /sbin/ldconfig
@@ -2538,16 +2557,26 @@ fi
 # generate passwords if needed
 if [ -d %{sysconf_dir} ]; then
         cd %{sysconf_dir}
-        for file in *.conf; do
                 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
-                        need_password=`grep $string $file 2>/dev/null`
-                        if [ -n "$need_password" ]; then
                                 pass=`openssl rand -base64 33`
-                                sed "s-$string-$pass-g" $file > $file.new
+      for file in *.conf; do
+         need_password=`grep ${string} $file 2>/dev/null`
+         if [ -n "$need_password" ]; then
+            sed "s@${string}@${pass}@g" $file > $file.new
                                 cp -f $file.new $file; rm -f $file.new
                         fi
                 done
         done
+# put actual hostname in conf file
+   host=`hostname`
+   string="XXX_HOSTNAME_XXX"
+   for file in *.conf; do
+      need_host=`grep ${string} $file 2>/dev/null`
+      if [ -n "$need_host" ]; then
+         sed "s@${string}@${host}@g" $file >$file.new
+         cp -f $file.new $file; rm -f $file.new
+      fi
+   done
 fi
 %endif
 
@@ -2583,16 +2612,26 @@ fi
 # generate passwords if needed
 if [ -d %{sysconf_dir} ]; then
         cd %{sysconf_dir}
-        for file in *.conf; do
                 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
-                        need_password=`grep $string $file 2>/dev/null`
-                        if [ -n "$need_password" ]; then
                                 pass=`openssl rand -base64 33`
-                                sed "s-$string-$pass-g" $file > $file.new
+      for file in *.conf; do
+         need_password=`grep ${string} $file 2>/dev/null`
+         if [ -n "$need_password" ]; then
+            sed "s@${string}@${pass}@g" $file > $file.new
                                 cp -f $file.new $file; rm -f $file.new
                         fi
                 done
         done
+# put actual hostname in conf file
+   host=`hostname`
+   string="XXX_HOSTNAME_XXX"
+   for file in *.conf; do
+      need_host=`grep ${string} $file 2>/dev/null`
+      if [ -n "$need_host" ]; then
+         sed "s@${string}@${host}@g" $file >$file.new
+         cp -f $file.new $file; rm -f $file.new
+      fi
+   done
 fi
 %endif
 
@@ -2628,16 +2667,26 @@ fi
 # generate passwords if needed
 if [ -d %{sysconf_dir} ]; then
         cd %{sysconf_dir}
-        for file in *.conf; do
                 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
-                        need_password=`grep $string $file 2>/dev/null`
-                        if [ -n "$need_password" ]; then
                                 pass=`openssl rand -base64 33`
-                                sed "s-$string-$pass-g" $file > $file.new
+      for file in *.conf; do
+         need_password=`grep ${string} $file 2>/dev/null`
+         if [ -n "$need_password" ]; then
+            sed "s@${string}@${pass}@g" $file > $file.new
                                 cp -f $file.new $file; rm -f $file.new
                         fi
                 done
         done
+# put actual hostname in conf file
+   host=`hostname`
+   string="XXX_HOSTNAME_XXX"
+   for file in *.conf; do
+      need_host=`grep ${string} $file 2>/dev/null`
+      if [ -n "$need_host" ]; then
+         sed "s@${string}@${host}@g" $file >$file.new
+         cp -f $file.new $file; rm -f $file.new
+      fi
+   done
 fi
 %endif
 
index c3ad6bcbc6d84dc8a143940b8c26c62d1c00c107..d5ceb6dd4ac9159915eab7bce2d2e1af0eefea0e 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "3.0.3"
-#define BDATE   "29 July 2009"
-#define LSMDATE "29Jul09"
+#define BDATE   "30 July 2009"
+#define LSMDATE "30Jul09"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2009 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2009"       /* year for copyright messages in progs */