]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix configure print FD user + new bacula.spec + make RunAfterJob non-fatal
authorKern Sibbald <kern@sibbald.com>
Thu, 1 Jan 2004 21:19:52 +0000 (21:19 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 1 Jan 2004 21:19:52 +0000 (21:19 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@979 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/autoconf/configure.in
bacula/configure
bacula/platforms/redhat/bacula.spec.in
bacula/src/dird/job.c
bacula/src/lib/message.c

index 4a1901d9bf2290cc8401ac211f9be2f36baf8a70..982edff5c3b7af73ccb2c58580e4b917890b3da1 100644 (file)
@@ -1699,8 +1699,8 @@ Configuration on `date`:
   Director Group:            ${dir_group}
   Storage Daemon User:       ${dir_user}
   Storage DaemonGroup:       ${dir_group}
-  File Daemon User:          ${dir_user}
-  File Daemon Group:         ${dir_group}
+  File Daemon User:          ${fd_user}
+  File Daemon Group:         ${fd_group}
 
   SQL binaries Directory      ${SQL_BINDIR}
 
index d8fd023fca0c170a3eb76525d2d92ec552e28227..350bce5ed7b806b4664e951cefd19894c7eebd27 100755 (executable)
@@ -19506,8 +19506,8 @@ Configuration on `date`:
   Director Group:            ${dir_group}
   Storage Daemon User:       ${dir_user}
   Storage DaemonGroup:       ${dir_group}
-  File Daemon User:          ${dir_user}
-  File Daemon Group:         ${dir_group}
+  File Daemon User:          ${fd_user}
+  File Daemon Group:         ${fd_group}
 
   SQL binaries Directory      ${SQL_BINDIR}
 
index d8fba455fa0f8b02070fa804d931808fc2a85f97..9a437c61f43e492fbe753126d2c65c066f71ca72 100644 (file)
@@ -1,40 +1,27 @@
+# Platform Build Configuration
 
 # basic defines for every build
 %define depkgs ../depkgs
 %define depkgs_version 24Jul03
 %define tomsrtbt tomsrtbt-2.0.103
 
-# 
-# You must build the package with at least one define parameter
-#  e.g.  rpmbuild -ba --define "build_rh7 1" bacula.spec
-#
-# If you want the MySQL version, use:
-#        rpmbuild -ba --define "build_mysql 1" --define "build_rh7 1" bacula.spec
-#
-
+# platform defines - set one below or define the build_xxx on the command line
+# RedHat builds
 %define rh7 0
 %{?build_rh7:%define rh7 1}
-
 %define rh8 0
 %{?build_rh8:%define rh8 1}
-
 %define rh9 0
 %{?build_rh9:%define rh9 1}
+# Whitebox Enterprise build
+%define wb3 0
+%{?build_wb3:%define wb3 1}
 
+# database defines
+# set mysql for MySQL support, leave unset for sqlite support
 %define mysql 0
 %{?build_mysql:%define mysql 1}
 
-
-%if %{rh7}
-%define rh_version rh7
-%endif
-%if %{rh8}
-%define rh_version rh8
-%endif
-%if %{rh9}
-%define rh_version rh9
-%endif
-
 Summary: Bacula - The Network Backup Solution
 Name: bacula
 Version: @VERSION@
@@ -73,9 +60,9 @@ 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.
 
 %if %{mysql}
-%package mysql-%{rh_version}
+%package mysql
 %else
-%package sqlite-%{rh_version}
+%package sqlite
 %endif
 
 Summary: Bacula - The Network Backup Solution
@@ -94,9 +81,9 @@ Requires: mysql-server >= 3.23
 %endif
 
 %if %{mysql}
-%description mysql-%{rh_version}
+%description mysql
 %else
-%description sqlite-%{rh_version}
+%description sqlite
 %endif
 
 Bacula - It comes by night and sucks the vital essence from your computers.
@@ -115,7 +102,7 @@ This build requires MySQL to be installed separately as the catalog database.
 This build incorporates sqlite as the catalog database, statically compiled.
 %endif
 
-%package client-%{rh_version}
+%package client
 Summary: Bacula - The Network Backup Solution
 Group: System Environment/Daemons
 Requires: readline
@@ -127,7 +114,7 @@ Requires: gtk2 >= 2.0
 Requires: libgnomeui >= 2.0
 %endif
 
-%description client-%{rh_version}
+%description client
 Bacula - It comes by night and sucks the vital essence from your computers.
 
 Bacula is a set of computer programs that permit you (or the system 
@@ -291,7 +278,7 @@ cp ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
 
 %if %{mysql}
 
-%files mysql-%{rh_version}
+%files mysql
 %defattr(-,root,root)
 
 %attr(0754,root,root) /etc/bacula/bacula
@@ -330,7 +317,7 @@ cp ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
 
 %attr(0750,root,root) /usr/sbin/*
 
-%post mysql-%{rh_version}
+%post mysql
 # delete then add our links
 /sbin/chkconfig --del bacula-dir
 /sbin/chkconfig --del bacula-fd
@@ -351,7 +338,7 @@ echo "Creating MySQL bacula database..."
 echo "Creating bacula tables..."
 /etc/bacula/make_mysql_tables
 
-%preun mysql-%{rh_version}
+%preun mysql
 # delete our links
 /sbin/chkconfig --del bacula-dir
 /sbin/chkconfig --del bacula-fd
@@ -359,7 +346,7 @@ echo "Creating bacula tables..."
 
 %else
 
-%files sqlite-%{rh_version}
+%files sqlite
 %defattr(-,root,root)
 
 %attr(0754,root,root) /etc/bacula/bacula
@@ -398,7 +385,7 @@ echo "Creating bacula tables..."
 %attr(0750,root,root) /usr/sbin/*
 %attr(0750,root,root) /usr/lib/sqlite/sqlite
 
-%post sqlite-%{rh_version}
+%post sqlite
 # delete then add our links
 /sbin/chkconfig --del bacula-dir
 /sbin/chkconfig --del bacula-fd
@@ -413,7 +400,7 @@ chmod 0755 /usr/sbin/gnome-console
 # create the tables
 /etc/bacula/make_sqlite_tables
 
-%preun sqlite-%{rh_version}
+%preun sqlite
 # delete our links
 /sbin/chkconfig --del bacula-dir
 /sbin/chkconfig --del bacula-fd
@@ -421,7 +408,7 @@ chmod 0755 /usr/sbin/gnome-console
 
 %endif
 
-%files client-%{rh_version}
+%files client
 %defattr(-,root,root)
 
 %attr(0754,root,root) /etc/bacula/fd
@@ -439,12 +426,12 @@ chmod 0755 /usr/sbin/gnome-console
 %attr(0750,root,root) /usr/sbin/smtp
 
 
-%post client-%{rh_version}
+%post client
 # delete then add our links
 /sbin/chkconfig --del bacula-fd
 /sbin/chkconfig --add bacula-fd
 
-%preun client-%{rh_version}
+%preun client
 # delete our links
 /sbin/chkconfig --del bacula-fd
 
@@ -497,6 +484,9 @@ rm -f /etc/bacula/rescue/sfdisk
 rm -rf /etc/bacula/rescue/diskinfo/*
 
 %changelog
+* Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- removed rh_version from package names
+- added platform build configuration section to beginning of file
 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
 - removed make_static_bacula script from rescue package install
 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
index 4e7e4d9a3b93aaa5e28250541b8201383fe3f11d..378c19a135edd050dedff14441fc683cd63e1f7b 100644 (file)
@@ -478,16 +478,18 @@ static void *job_thread(void *arg)
                Jmsg(jcr, M_INFO, 0, _("RunAfter: %s"), line);
            }
            status = close_bpipe(bpipe);
+           /*
+            * Note, if we get an error here, do not mark the
+            *  job in error, simply report the error condition. */
+            */
            if (status != 0) {
               if (jcr->JobStatus == JS_Terminated) {
-                  Jmsg(jcr, M_FATAL, 0, _("RunAfterJob returned non-zero status=%d\n"),
+                  Jmsg(jcr, M_ERROR, 0, _("RunAfterJob returned non-zero status=%d\n"),
                       status);
               } else {
                   Jmsg(jcr, M_FATAL, 0, _("RunAfterFailedJob returned non-zero status=%d\n"),
                       status);
               }
-              set_jcr_job_status(jcr, JS_FatalError);
-              update_job_end_record(jcr);
            }
         }
       }
index 19031f5c189c9edf59234d40e94e8eb65021aeb0..0993165bcca5c8939f676e5da2419ab261820a88 100755 (executable)
@@ -753,7 +753,7 @@ d_msg(char *file, int line, int level, char *fmt,...)
 #endif
 #ifdef FULL_LOCATION
        if (details) {
-          len = sprintf(buf, "%s: %s:%d ", my_name, file, line);
+          len = bsnprintf(buf, sizeof(buf), "%s: %s:%d ", my_name, file, line);
        } else {
          len = 0;
        }
@@ -790,7 +790,7 @@ p_msg(char *file, int line, int level, char *fmt,...)
 
 #ifdef FULL_LOCATION
     if (level >= 0) {
-       len = sprintf(buf, "%s: %s:%d ", my_name, file, line);
+       len = bsnprintf(buf, sizeof(buf), "%s: %s:%d ", my_name, file, line);
     } else {
        len = 0;
     }
@@ -839,7 +839,7 @@ t_msg(char *file, int line, int level, char *fmt,...)
     
 #ifdef FULL_LOCATION
        if (details) {
-          len = sprintf(buf, "%s: %s:%d ", my_name, file, line);
+          len = bsnprintf(buf, sizeof(buf), "%s: %s:%d ", my_name, file, line);
        } else {
          len = 0;
        }
@@ -879,30 +879,30 @@ e_msg(char *file, int line, int type, int level, char *fmt,...)
     }
     switch (type) {
     case M_ABORT:
-       len = sprintf(buf, "%s: ABORTING due to ERROR in %s:%d\n", 
+       len = bsnprintf(buf, sizeof(buf), "%s: ABORTING due to ERROR in %s:%d\n", 
               my_name, file, line);
        break;
     case M_ERROR_TERM:
-       len = sprintf(buf, "%s: ERROR TERMINATION at %s:%d\n", 
+       len = bsnprintf(buf, sizeof(buf), "%s: ERROR TERMINATION at %s:%d\n", 
               my_name, file, line);
        break;
     case M_FATAL:
        if (level == -1)           /* skip details */
-          len = sprintf(buf, "%s: Fatal Error because: ", my_name);
+          len = bsnprintf(buf, sizeof(buf), "%s: Fatal Error because: ", my_name);
        else
-          len = sprintf(buf, "%s: Fatal Error at %s:%d because:\n", my_name, file, line);
+          len = bsnprintf(buf, sizeof(buf), "%s: Fatal Error at %s:%d because:\n", my_name, file, line);
        break;
     case M_ERROR:
        if (level == -1)           /* skip details */
-          len = sprintf(buf, "%s: Error: ", my_name);
+          len = bsnprintf(buf, sizeof(buf), "%s: Error: ", my_name);
        else
-          len = sprintf(buf, "%s: Error in %s:%d ", my_name, file, line);
+          len = bsnprintf(buf, sizeof(buf), "%s: Error in %s:%d ", my_name, file, line);
        break;
     case M_WARNING:
-       len = sprintf(buf, "%s: Warning: ", my_name);
+       len = bsnprintf(buf, sizeof(buf), "%s: Warning: ", my_name);
        break;
     default:
-       len = sprintf(buf, "%s: ", my_name);
+       len = bsnprintf(buf, sizeof(buf), "%s: ", my_name);
        break;
     }
 
@@ -975,28 +975,28 @@ Jmsg(JCR *jcr, int type, int level, char *fmt,...)
     }
     switch (type) {
     case M_ABORT:
-       len = sprintf(rbuf, "%s ABORTING due to ERROR\n", my_name);
+       len = bsnprintf(rbuf, sizeof(rbuf), "%s ABORTING due to ERROR\n", my_name);
        break;
     case M_ERROR_TERM:
-       len = sprintf(rbuf, "%s ERROR TERMINATION\n", my_name);
+       len = bsnprintf(rbuf, sizeof(rbuf), "%s ERROR TERMINATION\n", my_name);
        break;
     case M_FATAL:
-       len = sprintf(rbuf, "%s: %s Fatal error: ", my_name, job);
+       len = bsnprintf(rbuf, sizeof(rbuf), "%s: %s Fatal error: ", my_name, job);
        if (jcr) {
          set_jcr_job_status(jcr, JS_FatalError);
        }
        break;
     case M_ERROR:
-       len = sprintf(rbuf, "%s: %s Error: ", my_name, job);
+       len = bsnprintf(rbuf, sizeof(rbuf), "%s: %s Error: ", my_name, job);
        if (jcr) {
          jcr->Errors++;
        }
        break;
     case M_WARNING:
-       len = sprintf(rbuf, "%s: %s Warning: ", my_name, job);
+       len = bsnprintf(rbuf, sizeof(rbuf), "%s: %s Warning: ", my_name, job);
        break;
     default:
-       len = sprintf(rbuf, "%s: ", my_name);
+       len = bsnprintf(rbuf, sizeof(rbuf), "%s: ", my_name);
        break;
     }
 
@@ -1070,7 +1070,7 @@ void j_msg(char *file, int line, JCR *jcr, int type, int level, char *fmt,...)
    POOLMEM *pool_buf;
 
    pool_buf = get_pool_memory(PM_EMSG);
-   i = sprintf(pool_buf, "%s:%d ", file, line);
+   i = Mmsg(&pool_buf, "%s:%d ", file, line);
 
 again:
    maxlen = sizeof_pool_memory(pool_buf) - i - 1;