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}
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}
+# 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@
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
%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.
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
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
%if %{mysql}
-%files mysql-%{rh_version}
+%files mysql
%defattr(-,root,root)
%attr(0754,root,root) /etc/bacula/bacula
%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
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
%else
-%files sqlite-%{rh_version}
+%files sqlite
%defattr(-,root,root)
%attr(0754,root,root) /etc/bacula/bacula
%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
# 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
%endif
-%files client-%{rh_version}
+%files client
%defattr(-,root,root)
%attr(0754,root,root) /etc/bacula/fd
%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
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>
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);
}
}
}
#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;
}
#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;
}
#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;
}
}
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;
}
}
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;
}
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;