From 643e1e7364b20ea66d0bb53e0caf2ec713401d21 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 13 Oct 2008 12:23:09 +0000 Subject: [PATCH] ebl Pemit to mark version as Beta in some ouputs git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7773 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/configure.in | 13 ++++-- bacula/configure | 25 ++++++++---- bacula/scripts/bacula-ctl-dir.in | 6 +-- bacula/scripts/bacula-ctl-fd.in | 6 +-- bacula/scripts/bacula-ctl-sd.in | 6 +-- bacula/src/dird/backup.c | 4 +- bacula/src/dird/migrate.c | 4 +- bacula/src/dird/restore.c | 4 +- bacula/src/dird/vbackup.c | 4 +- bacula/src/dird/verify.c | 68 ++++++++++++++++---------------- bacula/src/host.h.in | 4 +- bacula/technotes-2.5 | 2 + 12 files changed, 83 insertions(+), 63 deletions(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 914d1c23a3..7071ab2b1b 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -22,13 +22,20 @@ AC_PATH_PROGS(FALSEPRG, false, :) dnl bacula version +post_host= +if test "x$BACULA" != x; then + post_host=`echo -${BACULA} | tr 'A-Z ' 'a-z-'` +fi +BACULA=${BACULA-Bacula} VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` AC_SUBST(VERSION)dnl AC_SUBST(DATE)dnl AC_SUBST(LSMDATE)dnl -echo "configuring for bacula $VERSION ($DATE)" +AC_SUBST(BACULA)dnl +AC_SUBST(post_host)dnl +echo "configuring for ${BACULA} $VERSION ($DATE)" dnl ------------------------------------------------------- @@ -2511,8 +2518,8 @@ fi echo " Configuration on `date`: - Host: $host -- ${DISTNAME} ${DISTVER} - Bacula version: ${VERSION} (${DATE}) + Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER} + Bacula version: ${BACULA} ${VERSION} (${DATE}) Source code location: ${srcdir} Install binaries: ${sbindir} Install config files: ${sysconfdir} diff --git a/bacula/configure b/bacula/configure index 4c8dc4fd19..2c509e6e40 100755 --- a/bacula/configure +++ b/bacula/configure @@ -657,6 +657,8 @@ FALSEPRG VERSION DATE LSMDATE +BACULA +post_host CC CFLAGS LDFLAGS @@ -2130,10 +2132,15 @@ test -n "$FALSEPRG" || FALSEPRG=":" +post_host= +if test "x$BACULA" != x; then + post_host=`echo -${BACULA} | tr 'A-Z ' 'a-z-'` +fi +BACULA=${BACULA-Bacula} VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` DATE=`sed -n -e 's/^.* \t*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` -echo "configuring for bacula $VERSION ($DATE)" +echo "configuring for ${BACULA} $VERSION ($DATE)" @@ -31415,6 +31422,8 @@ FALSEPRG!$FALSEPRG$ac_delim VERSION!$VERSION$ac_delim DATE!$DATE$ac_delim LSMDATE!$LSMDATE$ac_delim +BACULA!$BACULA$ac_delim +post_host!$post_host$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim @@ -31463,8 +31472,6 @@ LOCAL_CFLAGS!$LOCAL_CFLAGS$ac_delim LOCAL_LDFLAGS!$LOCAL_LDFLAGS$ac_delim LOCAL_DEFS!$LOCAL_DEFS$ac_delim build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then @@ -31510,6 +31517,8 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim @@ -31605,8 +31614,6 @@ READLINE_SRC!$READLINE_SRC$ac_delim PYTHON_LIBS!$PYTHON_LIBS$ac_delim PYTHON_INCDIR!$PYTHON_INCDIR$ac_delim OPENSSL_LIBS!$OPENSSL_LIBS$ac_delim -OPENSSL_INC!$OPENSSL_INC$ac_delim -working_dir!$working_dir$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -31648,6 +31655,8 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +OPENSSL_INC!$OPENSSL_INC$ac_delim +working_dir!$working_dir$ac_delim archivedir!$archivedir$ac_delim scriptdir!$scriptdir$ac_delim plugindir!$plugindir$ac_delim @@ -31712,7 +31721,7 @@ DISTVER!$DISTVER$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 62; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -32369,8 +32378,8 @@ fi echo " Configuration on `date`: - Host: $host -- ${DISTNAME} ${DISTVER} - Bacula version: ${VERSION} (${DATE}) + Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER} + Bacula version: ${BACULA} ${VERSION} (${DATE}) Source code location: ${srcdir} Install binaries: ${sbindir} Install config files: ${sysconfdir} diff --git a/bacula/scripts/bacula-ctl-dir.in b/bacula/scripts/bacula-ctl-dir.in index a455f93857..693e59aba9 100644 --- a/bacula/scripts/bacula-ctl-dir.in +++ b/bacula/scripts/bacula-ctl-dir.in @@ -31,7 +31,7 @@ DIR_PORT=@dir_port@ DIR_USER=@dir_user@ DIR_GROUP=@dir_group@ - +Bacula="@BACULA@" PIDOF=@PIDOF@ # A function to stop a program. @@ -198,7 +198,7 @@ case "$1" in start) [ -x ${BACDIRBIN}/bacula-dir ] && { sleep 2 - echo "Starting the Bacula Director daemon" + echo "Starting the $Bacula Director daemon" OPTIONS='' if [ "${DIR_USER}" != '' ]; then OPTIONS="${OPTIONS} -u ${DIR_USER}" @@ -218,7 +218,7 @@ case "$1" in stop) [ -x ${BACDIRBIN}/bacula-dir ] && { - echo "Stopping the Bacula Director daemon" + echo "Stopping the $Bacula Director daemon" killproc ${BACDIRBIN}/bacula-dir ${DIR_PORT} } ;; diff --git a/bacula/scripts/bacula-ctl-fd.in b/bacula/scripts/bacula-ctl-fd.in index 539a04da3a..a5deeadf66 100644 --- a/bacula/scripts/bacula-ctl-fd.in +++ b/bacula/scripts/bacula-ctl-fd.in @@ -31,7 +31,7 @@ FD_PORT=@fd_port@ FD_USER=@fd_user@ FD_GROUP=@fd_group@ - +Bacula="@BACULA@" PIDOF=@PIDOF@ # A function to stop a program. @@ -197,7 +197,7 @@ fi case "$1" in start) [ -x ${BACFDBIN}/bacula-fd ] && { - echo "Starting the Bacula File daemon" + echo "Starting the $Bacula File daemon" OPTIONS='' if [ "${FD_USER}" != '' ]; then OPTIONS="${OPTIONS} -u ${FD_USER}" @@ -214,7 +214,7 @@ case "$1" in stop) # Stop the FD first so that SD will fail jobs and update catalog [ -x ${BACFDBIN}/bacula-fd ] && { - echo "Stopping the Bacula File daemon" + echo "Stopping the $Bacula File daemon" killproc ${BACFDBIN}/bacula-fd ${FD_PORT} } ;; diff --git a/bacula/scripts/bacula-ctl-sd.in b/bacula/scripts/bacula-ctl-sd.in index 9586bfc84c..b1bbbf78dc 100644 --- a/bacula/scripts/bacula-ctl-sd.in +++ b/bacula/scripts/bacula-ctl-sd.in @@ -31,7 +31,7 @@ SD_PORT=@sd_port@ SD_USER=@sd_user@ SD_GROUP=@sd_group@ - +Bacula="@BACULA@" PIDOF=@PIDOF@ # A function to stop a program. @@ -197,7 +197,7 @@ fi case "$1" in start) [ -x ${BACSDBIN}/bacula-sd ] && { - echo "Starting the Bacula Storage daemon" + echo "Starting the $Bacula Storage daemon" OPTIONS='' if [ "${SD_USER}" != '' ]; then OPTIONS="${OPTIONS} -u ${SD_USER}" @@ -214,7 +214,7 @@ case "$1" in stop) [ -x ${BACSDBIN}/bacula-sd ] && { - echo "Stopping the Bacula Storage daemon" + echo "Stopping the $Bacula Storage daemon" killproc ${BACSDBIN}/bacula-sd ${SD_PORT} } ;; diff --git a/bacula/src/dird/backup.c b/bacula/src/dird/backup.c index 4f50f8b791..a09bc35a45 100644 --- a/bacula/src/dird/backup.c +++ b/bacula/src/dird/backup.c @@ -543,7 +543,7 @@ void backup_cleanup(JCR *jcr, int TermCode) // bmicrosleep(15, 0); /* for debugging SIGHUP */ - Jmsg(jcr, msg_type, 0, _("Bacula %s %s (%s): %s\n" + Jmsg(jcr, msg_type, 0, _("%s %s %s (%s): %s\n" " Build OS: %s %s %s\n" " JobId: %d\n" " Job: %s\n" @@ -576,7 +576,7 @@ void backup_cleanup(JCR *jcr, int TermCode) " FD termination status: %s\n" " SD termination status: %s\n" " Termination: %s\n\n"), - my_name, VERSION, LSMDATE, edt, + BACULA, my_name, VERSION, LSMDATE, edt, HOST_OS, DISTNAME, DISTVER, jcr->jr.JobId, jcr->jr.Job, diff --git a/bacula/src/dird/migrate.c b/bacula/src/dird/migrate.c index 4f3653aaf1..e78a8a9665 100644 --- a/bacula/src/dird/migrate.c +++ b/bacula/src/dird/migrate.c @@ -1239,7 +1239,7 @@ void migration_cleanup(JCR *jcr, int TermCode) jobstatus_to_ascii(jcr->SDJobStatus, sd_term_msg, sizeof(sd_term_msg)); - Jmsg(jcr, msg_type, 0, _("Bacula %s %s (%s): %s\n" + Jmsg(jcr, msg_type, 0, _("%s %s %s (%s): %s\n" " Build OS: %s %s %s\n" " Prev Backup JobId: %s\n" " New Backup JobId: %s\n" @@ -1267,7 +1267,7 @@ void migration_cleanup(JCR *jcr, int TermCode) " SD Errors: %d\n" " SD termination status: %s\n" " Termination: %s\n\n"), - my_name, VERSION, LSMDATE, edt, + BACULA, my_name, VERSION, LSMDATE, edt, HOST_OS, DISTNAME, DISTVER, edit_uint64(jcr->previous_jr.JobId, ec6), mig_jcr ? edit_uint64(mig_jcr->jr.JobId, ec7) : "0", diff --git a/bacula/src/dird/restore.c b/bacula/src/dird/restore.c index cbfc9d9612..b57e6802df 100644 --- a/bacula/src/dird/restore.c +++ b/bacula/src/dird/restore.c @@ -297,7 +297,7 @@ void restore_cleanup(JCR *jcr, int TermCode) jobstatus_to_ascii(jcr->FDJobStatus, fd_term_msg, sizeof(fd_term_msg)); jobstatus_to_ascii(jcr->SDJobStatus, sd_term_msg, sizeof(sd_term_msg)); - Jmsg(jcr, msg_type, 0, _("Bacula %s %s (%s): %s\n" + Jmsg(jcr, msg_type, 0, _("%s %s %s (%s): %s\n" " Build OS: %s %s %s\n" " JobId: %d\n" " Job: %s\n" @@ -312,7 +312,7 @@ void restore_cleanup(JCR *jcr, int TermCode) " FD termination status: %s\n" " SD termination status: %s\n" " Termination: %s\n\n"), - my_name, VERSION, LSMDATE, edt, + BACULA, my_name, VERSION, LSMDATE, edt, HOST_OS, DISTNAME, DISTVER, jcr->jr.JobId, jcr->jr.Job, diff --git a/bacula/src/dird/vbackup.c b/bacula/src/dird/vbackup.c index 8b098226c7..a382c073bb 100644 --- a/bacula/src/dird/vbackup.c +++ b/bacula/src/dird/vbackup.c @@ -404,7 +404,7 @@ void vbackup_cleanup(JCR *jcr, int TermCode) } jobstatus_to_ascii(jcr->SDJobStatus, sd_term_msg, sizeof(sd_term_msg)); - Jmsg(jcr, msg_type, 0, _("Bacula %s %s (%s): %s\n" + Jmsg(jcr, msg_type, 0, _("%s %s %s (%s): %s\n" " Build OS: %s %s %s\n" " JobId: %d\n" " Job: %s\n" @@ -429,7 +429,7 @@ void vbackup_cleanup(JCR *jcr, int TermCode) " SD Errors: %d\n" " SD termination status: %s\n" " Termination: %s\n\n"), - my_name, VERSION, LSMDATE, edt, + BACULA, my_name, VERSION, LSMDATE, edt, HOST_OS, DISTNAME, DISTVER, jcr->jr.JobId, jcr->jr.Job, diff --git a/bacula/src/dird/verify.c b/bacula/src/dird/verify.c index 723a4915d1..50828f40bd 100644 --- a/bacula/src/dird/verify.c +++ b/bacula/src/dird/verify.c @@ -438,7 +438,7 @@ void verify_cleanup(JCR *jcr, int TermCode) jobstatus_to_ascii(jcr->FDJobStatus, fd_term_msg, sizeof(fd_term_msg)); if (jcr->get_JobLevel() == L_VERIFY_VOLUME_TO_CATALOG) { jobstatus_to_ascii(jcr->SDJobStatus, sd_term_msg, sizeof(sd_term_msg)); - Jmsg(jcr, msg_type, 0, _("Bacula %s %s (%s): %s\n" + Jmsg(jcr, msg_type, 0, _("%s %s %s (%s): %s\n" " Build OS: %s %s %s\n" " JobId: %d\n" " Job: %s\n" @@ -455,25 +455,25 @@ void verify_cleanup(JCR *jcr, int TermCode) " FD termination status: %s\n" " SD termination status: %s\n" " Termination: %s\n\n"), - my_name, VERSION, LSMDATE, edt, - HOST_OS, DISTNAME, DISTVER, - jcr->jr.JobId, - jcr->jr.Job, - jcr->fileset->hdr.name, - level_to_str(jcr->get_JobLevel()), - jcr->client->hdr.name, - jcr->previous_jr.JobId, - Name, - sdt, - edt, - edit_uint64_with_commas(jcr->ExpectedFiles, ec1), - edit_uint64_with_commas(jcr->JobFiles, ec2), - jcr->Errors, - fd_term_msg, - sd_term_msg, - term_msg); + BACULA, my_name, VERSION, LSMDATE, edt, + HOST_OS, DISTNAME, DISTVER, + jcr->jr.JobId, + jcr->jr.Job, + jcr->fileset->hdr.name, + level_to_str(jcr->get_JobLevel()), + jcr->client->hdr.name, + jcr->previous_jr.JobId, + Name, + sdt, + edt, + edit_uint64_with_commas(jcr->ExpectedFiles, ec1), + edit_uint64_with_commas(jcr->JobFiles, ec2), + jcr->Errors, + fd_term_msg, + sd_term_msg, + term_msg); } else { - Jmsg(jcr, msg_type, 0, _("Bacula %s %s (%s): %s\n" + Jmsg(jcr, msg_type, 0, _("%s %s %s (%s): %s\n" " Build: %s %s %s\n" " JobId: %d\n" " Job: %s\n" @@ -488,21 +488,21 @@ void verify_cleanup(JCR *jcr, int TermCode) " Non-fatal FD errors: %d\n" " FD termination status: %s\n" " Termination: %s\n\n"), - my_name, VERSION, LSMDATE, edt, - HOST_OS, DISTNAME, DISTVER, - jcr->jr.JobId, - jcr->jr.Job, - jcr->fileset->hdr.name, - level_to_str(jcr->get_JobLevel()), - jcr->client->name(), - jcr->previous_jr.JobId, - Name, - sdt, - edt, - edit_uint64_with_commas(jcr->JobFiles, ec1), - jcr->Errors, - fd_term_msg, - term_msg); + BACULA, my_name, VERSION, LSMDATE, edt, + HOST_OS, DISTNAME, DISTVER, + jcr->jr.JobId, + jcr->jr.Job, + jcr->fileset->hdr.name, + level_to_str(jcr->get_JobLevel()), + jcr->client->name(), + jcr->previous_jr.JobId, + Name, + sdt, + edt, + edit_uint64_with_commas(jcr->JobFiles, ec1), + jcr->Errors, + fd_term_msg, + term_msg); } Dmsg0(100, "Leave verify_cleanup()\n"); } diff --git a/bacula/src/host.h.in b/bacula/src/host.h.in index a8debf996d..d1432c2466 100644 --- a/bacula/src/host.h.in +++ b/bacula/src/host.h.in @@ -32,6 +32,8 @@ Switzerland, email:ftf@fsfeurope.org. */ -#define HOST_OS "@host@" +#define HOST_OS "@host@@post_host@" +#define BACULA "@BACULA@" #define DISTNAME "@DISTNAME@" #define DISTVER "@DISTVER@" + diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 0b20c4c538..fb47a89e0a 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -17,6 +17,8 @@ dbdriver remove reader/writer in FOPTS???? General: +13Oct08 +ebl Permit to mark version as Beta in some ouputs 11Oct08 kes Add plugin types in jcr.h to reduce need to cast. kes Do better checking of plugin return values. -- 2.39.5