]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Make explicit exception to GPL in LICENSE to permit linking
authorKern Sibbald <kern@sibbald.com>
Fri, 19 Oct 2007 10:07:03 +0000 (10:07 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 19 Oct 2007 10:07:03 +0000 (10:07 +0000)
     the Win32 FD with Microsoft VSS code.
kes  Apply the Solaris package patch from
     Masopust, Christian <christian.masopust@siemens.com>
kes  Apply the patch to optionally add a timestamp in the debug output
     submitted by Mariusz Czulada <manieq@wp.eu>

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5769 91ce42f0-d328-0410-95d8-f526ca767f89

41 files changed:
bacula/LICENSE
bacula/kernstodo
bacula/platforms/solaris/bacula-dir.in
bacula/platforms/solaris/bacula-fd.in
bacula/platforms/solaris/bacula-sd.in
bacula/platforms/solaris/copyright [new file with mode: 0644]
bacula/platforms/solaris/makepkg.sh [new file with mode: 0644]
bacula/platforms/solaris/pkginfo [new file with mode: 0644]
bacula/platforms/solaris/postinstall [new file with mode: 0644]
bacula/platforms/solaris/postremove [new file with mode: 0644]
bacula/platforms/solaris/prototype.master [new file with mode: 0644]
bacula/src/cats/bdb.c
bacula/src/cats/mysql.c
bacula/src/cats/postgresql.c
bacula/src/cats/protos.h
bacula/src/cats/sql_create.c
bacula/src/cats/sqlite.c
bacula/src/console/console.c
bacula/src/dird/dird.c
bacula/src/dird/getmsg.c
bacula/src/dird/ua_run.c
bacula/src/filed/filed.c
bacula/src/lib/message.c
bacula/src/lib/message.h
bacula/src/stored/bcopy.c
bacula/src/stored/bextract.c
bacula/src/stored/bls.c
bacula/src/stored/bscan.c
bacula/src/stored/btape.c
bacula/src/stored/stored.c
bacula/src/tools/bbatch.c
bacula/src/tools/bregex.c
bacula/src/tools/bregtest.c
bacula/src/tools/bsmtp.c
bacula/src/tools/dbcheck.c
bacula/src/tools/testfind.c
bacula/src/tools/testls.c
bacula/src/tray-monitor/eggmarshalers.list [deleted file]
bacula/src/tray-monitor/tray-monitor.c
bacula/src/version.h
bacula/technotes-2.3

index d9b5fd4fb3fe94da70ce782f692fcd20f2b39c9f..751103f54aaec6608b828a793f5cc7d7aabe2166 100644 (file)
@@ -23,6 +23,14 @@ project's "OpenSSL" library (or with modified versions of it that use
 the same license as the "OpenSSL" library), and distribute the linked
 executables.  You must obey the GNU General Public License in all
 respects for all of the code used other than "OpenSSL".
+
+As a special exception to the GPLv2, the Bacula Project gives
+permission to link the code of its release of the Bacula Win32 File
+daemon with the Microsoft supplied Volume Shadow Copy (VSS) libraries
+and distribute the linked executables.  You must obey the GNU General
+Public License in all respects for all of the code used other than for
+the Microsoft VSS code, where you must obey their license terms.
+
              
 ===================================
 
index 7a1c1ee607b97ea8892a929decb59313099a93cf..db0218fc739527ab5fa5e7f0afa38251b5974ba9 100644 (file)
@@ -69,6 +69,19 @@ Professional Needs:
 - Implement Diff,Inc Retention Periods
 
 Priority:
+- Encrypt sd_auth_key = s with director's key = d
+   k[i] = s[i] + (d[i] & 0xF)) & 0xFF + 'A'  skip -
+  Decrypt key = k with director's key
+   x  = k[i] - (d[i] & 0xF))
+   if (x < 0) {
+      x = k[i] - (d[i] & 0xF) + 16
+   }
+   s[i] = x + 'A';
+- finish implementation of fdcalled -- see ua_run.c:105
+- Fix problem in postgresql.c in my_postgresql_query, where the
+  generation of the error message doesn't differentiate result==NULL
+  and a bad status from that result.  Not only that, the result is
+  cleared on a bail_out without having generated the error message.
 - Erabt if min_block_size > max_block_size
 - KIWI
 - Implement wait on multiple objects
index 0346dafcc27958871554f9392b40353244f40200..0563e44c0df16266114533fa1210892a32e1854d 100755 (executable)
@@ -14,16 +14,10 @@ case "$1" in
     start)
        echo "Starting the Bacula Director: "
        @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf
-       RETVAL=$?
-       echo
-       [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir
        ;;
     stop)
        echo "Stopping the Director daemon: "
        pkill -x bacula-dir
-       RETVAL=$?
-       echo
-       [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-dir
        ;;
     restart)
        $0 stop
index 31dbbad476268a72f3a161b39711fa262c539f5c..018dfe48d45818233f22195d79ccb5e21ecf7804 100755 (executable)
@@ -13,16 +13,10 @@ case "$1" in
     start)
        echo "Starting the Bacula File daemon: "
        @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
-       RETVAL=$?
-       echo
-       [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd
        ;;
     stop)
        echo "Stopping the Bacula File daemon: "
        pkill -x bacula-fd
-       RETVAL=$?
-       echo
-       [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-fd
        ;;
     restart)
        $0 stop
index 37230ff971cba7c0f0629288ff4119ead1f99d27..9544f4918d823ba2324b98fbf8b7724d1e8397a3 100755 (executable)
@@ -13,16 +13,10 @@ case "$1" in
     start)
        echo "Starting the Bacula Storage daemon: "
        @sbindir@/bacula-sd $2 -c @sysconfdir@/bacula-sd.conf
-       RETVAL=$?
-       echo
-       [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-sd
        ;;
     stop)
        echo "Stopping the Bacula Storage daemon: "
        pkill -x bacula-sd
-       RETVAL=$?
-       echo
-       [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-sd
        ;;
     restart)
        $0 stop
diff --git a/bacula/platforms/solaris/copyright b/bacula/platforms/solaris/copyright
new file mode 100644 (file)
index 0000000..1660acf
--- /dev/null
@@ -0,0 +1,28 @@
+
+   Bacula - The Network Backup Solution
+
+   Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation, a copy of which
+   is in the LICENSE file
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 ZC<rich,
+   Switzerland, email:ftf@fsfeurope.org.
+
+
diff --git a/bacula/platforms/solaris/makepkg.sh b/bacula/platforms/solaris/makepkg.sh
new file mode 100644 (file)
index 0000000..536b9d8
--- /dev/null
@@ -0,0 +1,82 @@
+#!/bin/bash
+#
+#
+
+# make use of Studio 11 or 12 compiler
+#
+export CC=cc
+export CXX=CC
+
+INSTALL_BASE=/opt/bacula
+SBIN_DIR=$INSTALL_BASE/sbin
+MAN_DIR=$INSTALL_BASE/man
+SYSCONF_DIR=$INSTALL_BASE/etc
+SCRIPT_DIR=$INSTALL_BASE/etc
+WORKING_DIR=/var/bacula
+
+VERSION=2.2.5
+
+CWD=`pwd`
+# Try to guess the distribution base
+DISTR_BASE=`dirname \`pwd\` | sed -e 's@/platforms$@@'`
+echo "Distribution base:   $DISTR_BASE"
+
+TMPINSTALLDIR=/tmp/`basename $DISTR_BASE`-build
+echo "Temp install dir:  $TMPINSTALLDIR"
+echo "Install directory: $INSTALL_BASE"
+
+cd $DISTR_BASE
+
+if [ "x$1" = "xbuild" ]; then
+    ./configure --prefix=$INSTALL_BASE \
+            --sbindir=$SBIN_DIR \
+            --sysconfdir=$SYSCONF_DIR \
+            --mandir=$MAN_DIR \
+            --with-scriptdir=$SCRIPT_DIR \
+            --with-working-dir=$WORKING_DIR \
+            --with-subsys-dir=/var/lock/subsys \
+            --with-pid-dir=/var/run \
+            --enable-smartalloc \
+            --enable-conio \
+            --enable-readline \
+            --enable-client-only \
+            --disable-ipv6
+    
+    make
+fi
+
+if [ -d $TMPINSTALLDIR ]; then
+    rm -rf $TMPINSTALLDIR
+fi
+mkdir $TMPINSTALLDIR
+
+make DESTDIR=$TMPINSTALLDIR install
+
+# copy additional files to install-dir
+#
+
+
+# change conf-files that they won't be overwritten by install
+#
+cd $TMPINSTALLDIR/$SYSCONF_DIR
+for x in *.conf; do
+    mv ${x} ${x}-dist
+done
+
+
+# cd back to my start-dir
+#
+cd $CWD
+
+#cp prototype.master prototype
+sed -e "s|__PKGSOURCE__|$CWD|" prototype.master > prototype
+
+pkgproto $TMPINSTALLDIR/$INSTALL_BASE=. >> prototype
+
+pkgmk -o -d /tmp -b $TMPINSTALLDIR/$INSTALL_BASE -f prototype
+
+if [ $? = 0 ]; then
+    pkgtrans /tmp bacula-$VERSION.pkg Bacula
+    echo "Package has been created in /tmp"
+fi 
+
diff --git a/bacula/platforms/solaris/pkginfo b/bacula/platforms/solaris/pkginfo
new file mode 100644 (file)
index 0000000..0063213
--- /dev/null
@@ -0,0 +1,12 @@
+PKG=Bacula
+NAME=Bacula Client
+ARCH=sparc
+VERSION=2.2.5
+MAXINST=1
+CATEGORY=application
+DESC=Bacula - It comes by night and sucks the essence from your computers
+VENDOR=http://www.bacula.org
+HOTLINE=none
+EMAIL=christian.masopust@siemens.com
+CLASSES=none
+BASEDIR=/opt/bacula
diff --git a/bacula/platforms/solaris/postinstall b/bacula/platforms/solaris/postinstall
new file mode 100644 (file)
index 0000000..c05972d
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# postinstall for Bacula
+#
+if [ ! -d /var/bacula ]; then
+    mkdir /var/bacula
+fi
+
+exit 0
diff --git a/bacula/platforms/solaris/postremove b/bacula/platforms/solaris/postremove
new file mode 100644 (file)
index 0000000..ea142ec
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# postremove for Bacula
+#
+if [ ! -d /var/bacula ]; then
+    rm -rf /var/bacula
+fi
+
+exit 0
diff --git a/bacula/platforms/solaris/prototype.master b/bacula/platforms/solaris/prototype.master
new file mode 100644 (file)
index 0000000..7f5d76a
--- /dev/null
@@ -0,0 +1,24 @@
+#
+# Information files
+#
+i pkginfo=./pkginfo
+i copyright=./copyright
+i postinstall=./postinstall
+i postremove=./postremove
+#
+# Stuff that goes into the system areas
+#
+d none /etc ? ? ?
+d none /etc/init.d ? ? ?
+f none /etc/init.d/bacula=__PKGSOURCE__/bacula-fd 0754 root bin
+d none /etc/rc2.d ? ? ?
+s none /etc/rc2.d/S99bacula=/etc/init.d/bacula
+d none /etc/rc0.d ? ? ?
+s none /etc/rc0.d/K01bacula=/etc/init.d/bacula
+#
+d none /var ? ? ?
+d none /var/bacula 0755 root root
+#
+#
+# Dynamically added entries (by pkgproto)
+#
index d9862abab11eddc97f8c3ebe8bb488705c25882c..2a262f807577e653a841a6636b1f847e5bfccfc5 100644 (file)
@@ -318,9 +318,9 @@ char *db_strerror(B_DB *mdb)
    return mdb->errmsg;
 }
 
-int db_sql_query(B_DB *mdb, char const *query, DB_RESULT_HANDLER *result_handler, void *ctx)
+bool db_sql_query(B_DB *mdb, char const *query, DB_RESULT_HANDLER *result_handler, void *ctx)
 {
-   return 1;
+   return true;
 }
 
 /*
index c0068b1b1dc815a4414de3cc7e2b0ab20b6cce57..8a2832b0ba8d1ca8a4cc1d9eb930fbd33455860f 100644 (file)
@@ -305,7 +305,7 @@ db_escape_string(JCR *jcr, B_DB *mdb, char *snew, char *old, int len)
  * Submit a general SQL command (cmd), and for each row returned,
  *  the sqlite_handler is called with the ctx.
  */
-int db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler, void *ctx)
+bool db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler, void *ctx)
 {
    SQL_ROW row;
    bool send = true;
@@ -314,7 +314,7 @@ int db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler
    if (sql_query(mdb, query) != 0) {
       Mmsg(mdb->errmsg, _("Query failed: %s: ERR=%s\n"), query, sql_strerror(mdb));
       db_unlock(mdb);
-      return 0;
+      return false;
    }
    if (result_handler != NULL) {
       if ((mdb->result = sql_use_result(mdb)) != NULL) {
@@ -337,7 +337,7 @@ int db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler
       }
    }
    db_unlock(mdb);
-   return 1;
+   return true;
 
 }
 
index 733074e27903131d412f1914167146fdc2f64bd3..74b0c65f19aea9ac9f46666a0e176fcb0da8be48 100644 (file)
@@ -307,7 +307,7 @@ db_escape_string(JCR *jcr, B_DB *mdb, char *snew, char *old, int len)
  * Submit a general SQL command (cmd), and for each row returned,
  *  the sqlite_handler is called with the ctx.
  */
-int db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler, void *ctx)
+bool db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler, void *ctx)
 {
    SQL_ROW row;
 
@@ -318,7 +318,7 @@ int db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler
       Mmsg(mdb->errmsg, _("Query failed: %s: ERR=%s\n"), query, sql_strerror(mdb));
       db_unlock(mdb);
       Dmsg0(500, "db_sql_query failed\n");
-      return 0;
+      return false;
    }
    Dmsg0(500, "db_sql_query succeeded. checking handler\n");
 
@@ -342,7 +342,7 @@ int db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler
 
    Dmsg0(500, "db_sql_query finished\n");
 
-   return 1;
+   return true;
 }
 
 
index 43f1d984271561ea886fe6b03aeeb9a7717b02ba..30527d59a6c7aec58fa91c6d61003c596875a5dc 100644 (file)
@@ -49,7 +49,7 @@ void db_close_database(JCR *jcr, B_DB *db);
 void db_escape_string(JCR *jcr, B_DB *db, char *snew, char *old, int len);
 char *db_strerror(B_DB *mdb);
 int  db_next_index(JCR *jcr, B_DB *mdb, char *table, char *index);
-int  db_sql_query(B_DB *mdb, const char *cmd, DB_RESULT_HANDLER *result_handler, void *ctx);
+bool db_sql_query(B_DB *mdb, const char *cmd, DB_RESULT_HANDLER *result_handler, void *ctx);
 void db_start_transaction(JCR *jcr, B_DB *mdb);
 void db_end_transaction(JCR *jcr, B_DB *mdb);
 int db_int64_handler(void *ctx, int num_fields, char **row);
index 8ffba95043b5a98dffcef1e49edc1ac25fdfcef8..3b781bb4ee09e598450587d6df73b5ec3e0bcedf 100644 (file)
@@ -768,7 +768,7 @@ bool db_write_batch_file_records(JCR *jcr)
 
    jcr->JobStatus = JS_AttrInserting;
    if (!sql_batch_end(jcr, jcr->db_batch, NULL)) {
-      Jmsg(jcr, M_FATAL, 0, "Bad batch end %s\n", jcr->db_batch->errmsg);
+      Jmsg1(jcr, M_FATAL, 0, "Batch end %s\n", jcr->db_batch->errmsg);
       return false;
    }
    if (job_canceled(jcr)) {
@@ -778,35 +778,35 @@ bool db_write_batch_file_records(JCR *jcr)
 
    /* we have to lock tables */
    if (!db_sql_query(jcr->db_batch, sql_batch_lock_path_query, NULL, NULL)) {
-      Jmsg(jcr, M_FATAL, 0, "Can't lock Path table %s\n", jcr->db_batch->errmsg);
+      Jmsg1(jcr, M_FATAL, 0, "Lock Path table %s\n", jcr->db_batch->errmsg);
       return false;
    }
 
    if (!db_sql_query(jcr->db_batch, sql_batch_fill_path_query, NULL, NULL)) {
-      Jmsg(jcr, M_FATAL, 0, "Can't fill Path table %s\n",jcr->db_batch->errmsg);
+      Jmsg1(jcr, M_FATAL, 0, "Fill Path table %s\n",jcr->db_batch->errmsg);
       db_sql_query(jcr->db_batch, sql_batch_unlock_tables_query, NULL, NULL);
       return false;
    }
    
    if (!db_sql_query(jcr->db_batch, sql_batch_unlock_tables_query,NULL,NULL)) {
-      Jmsg(jcr, M_FATAL, 0, "Can't unlock Path table %s\n", jcr->db_batch->errmsg);
+      Jmsg1(jcr, M_FATAL, 0, "Unlock Path table %s\n", jcr->db_batch->errmsg);
       return false;      
    }
 
    /* we have to lock tables */
    if (!db_sql_query(jcr->db_batch,sql_batch_lock_filename_query,NULL, NULL)) {
-      Jmsg(jcr, M_FATAL, 0, "Can't lock Filename table %s\n", jcr->db_batch->errmsg);
+      Jmsg1(jcr, M_FATAL, 0, "Lock Filename table %s\n", jcr->db_batch->errmsg);
       return false;
    }
    
    if (!db_sql_query(jcr->db_batch,sql_batch_fill_filename_query, NULL,NULL)) {
-      Jmsg(jcr,M_FATAL,0,"Can't fill Filename table %s\n",jcr->db_batch->errmsg);
+      Jmsg1(jcr,M_FATAL,0,"Fill Filename table %s\n",jcr->db_batch->errmsg);
       db_sql_query(jcr->db_batch, sql_batch_unlock_tables_query, NULL, NULL);
       return false;            
    }
 
    if (!db_sql_query(jcr->db_batch, sql_batch_unlock_tables_query,NULL,NULL)) {
-      Jmsg(jcr, M_FATAL, 0, "Can't unlock Filename table %s\n", jcr->db_batch->errmsg);
+      Jmsg1(jcr, M_FATAL, 0, "Unlock Filename table %s\n", jcr->db_batch->errmsg);
       return false;
    }
    
@@ -819,7 +819,7 @@ bool db_write_batch_file_records(JCR *jcr)
            "JOIN Filename ON (batch.Name = Filename.Name)",
                      NULL,NULL))
    {
-      Jmsg(jcr, M_FATAL, 0, "Can't fill File table %s\n", jcr->db_batch->errmsg);
+      Jmsg1(jcr, M_FATAL, 0, "Fill File table %s\n", jcr->db_batch->errmsg);
       return false;
    }
 
index b4331dd81595fb578632c25c250b8b8a51d1e566..a03691fed1c46bacecb19f576a64fecf400f1c2d 100644 (file)
@@ -338,7 +338,7 @@ static int sqlite_result(void *arh_data, int num_fields, char **rows, char **col
  * Submit a general SQL command (cmd), and for each row returned,
  *  the sqlite_handler is called with the ctx.
  */
-int db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler, void *ctx)
+bool db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler, void *ctx)
 {
    struct rh_data rh_data;
    int stat;
@@ -358,10 +358,10 @@ int db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler
    if (stat != 0) {
       Mmsg(mdb->errmsg, _("Query failed: %s: ERR=%s\n"), query, sql_strerror(mdb));
       db_unlock(mdb);
-      return 0;
+      return false;
    }
    db_unlock(mdb);
-   return 1;
+   return true;
 }
 
 /*
index 0874558b4a620762068c2c0df85ba460c99e6da4..0f57d173c4af6ff5898f10d3ab559b5dcd7e8ed1 100644 (file)
@@ -114,7 +114,8 @@ PROG_COPYRIGHT
 "\nVersion: " VERSION " (" BDATE ") %s %s %s\n\n"
 "Usage: bconsole [-s] [-c config_file] [-d debug_level]\n"
 "       -c <file>   set configuration file to file\n"
-"       -dnn        set debug level to nn\n"
+"       -d <nn>     set debug level to <nn>\n"
+"       -dt         print timestamp in debug output\n"
 "       -n          no conio\n"
 "       -s          no signals\n"
 "       -t          test - read configuration and exit\n"
@@ -532,9 +533,13 @@ int main(int argc, char *argv[])
          break;
 
       case 'd':
-         debug_level = atoi(optarg);
-         if (debug_level <= 0) {
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
          }
          break;
 
index 45ae5a68184278bcb5c0f00e057da302cd722ca2..c4dc63b69d1b7b4b06cf6b6db24051701eac5a2e 100644 (file)
@@ -94,7 +94,8 @@ PROG_COPYRIGHT
 "\nVersion: %s (%s)\n\n"
 "Usage: dird [-f -s] [-c config_file] [-d debug_level] [config_file]\n"
 "       -c <file>   set configuration file to file\n"
-"       -dnn        set debug level to nn\n"
+"       -d <nn>     set debug level to <nn>\n"
+"       -dt         print timestamp in debug output\n"
 "       -f          run in foreground (for debugging)\n"
 "       -g          groupid\n"
 "       -r <job>    run <job> now\n"
@@ -149,9 +150,13 @@ int main (int argc, char *argv[])
          break;
 
       case 'd':                    /* set debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0) {
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
          }
          Dmsg1(10, "Debug level = %d\n", debug_level);
          break;
index 16e88291c42f0b7ce73d77be820db3521f3fe4b1..dae8f098fd0fc680305c79e88fe16dda65c21e62 100644 (file)
@@ -107,7 +107,7 @@ int bget_dirmsg(BSOCK *bs)
 
    for (;;) {
       n = bs->recv();
-      Dmsg2(100, "bget_dirmsg %d: %s", n, bs->msg);
+      Dmsg2(100, "bget_dirmsg %d: %s\n", n, bs->msg);
 
       if (is_bnet_stop(bs)) {
          return n;                    /* error or terminate */
index e90bfda084582f90e5cee758f59d62d71e81f934..5d2de5c67706a6b11587122c995c700d08c0028f 100644 (file)
@@ -449,8 +449,11 @@ try_again:
       Dmsg1(800, "Calling run_job job=%x\n", jcr->job);
 
 start_job:
-      Dmsg1(100, "Using pool %s\n", jcr->pool->name());
+      Dmsg3(000, "JobId=%u using pool %s priority=%d\n", (int)jcr->JobId, 
+            jcr->pool->name(), jcr->JobPriority);
       JobId = run_job(jcr);
+      Dmsg4(000, "JobId=%u NewJobId=%d using pool %s priority=%d\n", (int)jcr->JobId, 
+            JobId, jcr->pool->name(), jcr->JobPriority);
       free_jcr(jcr);                  /* release jcr */
       if (JobId == 0) {
          ua->error_msg(_("Job failed.\n"));
index 277e32d9947680bd20be860e9ec2dfb6b4de6c68..5bbd1bb01ac661eaecc889bf500138b976050e83 100644 (file)
@@ -65,7 +65,8 @@ PROG_COPYRIGHT
 "\nVersion: %s (%s)\n\n"
 "Usage: bacula-fd [-f -s] [-c config_file] [-d debug_level]\n"
 "        -c <file>   use <file> as configuration file\n"
-"        -dnn        set debug level to nn\n"
+"        -d <nn>     set debug level to <nn>\n"
+"        -dt         print timestamp in debug output\n"
 "        -f          run in foreground (for debugging)\n"
 "        -g          groupid\n"
 "        -s          no signals (for debugging)\n"
@@ -114,9 +115,13 @@ int main (int argc, char *argv[])
          break;
 
       case 'd':                    /* debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0) {
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
          }
          break;
 
index 8f0bf18a03b8cf70ce15f625e76c7b5cfd81a192..7546caf202c1199ea08fdcba9998111a18e323f1 100644 (file)
@@ -50,6 +50,7 @@ sql_escape p_sql_escape = NULL;
 const char *working_directory = NULL;       /* working directory path stored here */
 int verbose = 0;                      /* increase User messages */
 int debug_level = 1;                  /* debug level */
+bool dbg_timestamp = false;           /* print timestamp in debug output */
 time_t daemon_start_time = 0;         /* Daemon start time */
 const char *version = VERSION " (" BDATE ")";
 char my_name[30];                     /* daemon name is stored here */
@@ -843,6 +844,7 @@ d_msg(const char *file, int line, int level, const char *fmt,...)
     int       len;
     va_list   arg_ptr;
     bool      details = true;
+    time_t    mtime;
 
     if (level < 0) {
        details = false;
@@ -850,6 +852,15 @@ d_msg(const char *file, int line, int level, const char *fmt,...)
     }
 
     if (level <= debug_level) {
+       if (dbg_timestamp) {
+          mtime = time(NULL);
+          bstrftimes(buf, sizeof(buf), mtime);
+          len = strlen(buf);
+          buf[len++] = ' ';
+          buf[len] = 0;
+          fputs(buf, stdout);
+       }
+    
 #ifdef FULL_LOCATION
        if (details) {
           len = bsnprintf(buf, sizeof(buf), "%s: %s:%d-%u ", 
@@ -1335,7 +1346,7 @@ void Qmsg(JCR *jcr, int type, time_t mtime, const char *fmt,...)
       jcr = get_jcr_from_tsd();
    }
    /* If no jcr or dequeuing send to daemon to avoid recursion */
-   if (!jcr || jcr->dequeuing) {
+   if ((jcr && !jcr->msg_queue) || !jcr || jcr->dequeuing) {
       /* jcr==NULL => daemon message, safe to send now */
       Jmsg(jcr, item->type, item->mtime, "%s", item->msg);
       free(item);
index 476d3611a9b9e6b506978e195b630cfd8f6aa015..4c00f229b9cdad7eba1238145a7c83a7c630920d 100644 (file)
@@ -154,6 +154,7 @@ extern DLL_IMP_EXP sql_query     p_sql_query;
 extern DLL_IMP_EXP sql_escape    p_sql_escape;
 
 extern DLL_IMP_EXP int           debug_level;
+extern DLL_IMP_EXP bool dbg_timestamp;            /* print timestamp in debug output */
 extern DLL_IMP_EXP int           verbose;
 extern DLL_IMP_EXP char          my_name[];
 extern DLL_IMP_EXP const char *  working_directory;
index 76c5cde892651879c4fa716252c2f501ceaa5b8c..73416afbe405088e865ba036b22771cd4b502425 100644 (file)
@@ -73,7 +73,8 @@ PROG_COPYRIGHT
 "Usage: bcopy [-d debug_level] <input-archive> <output-archive>\n"
 "       -b bootstrap      specify a bootstrap file\n"
 "       -c <file>         specify configuration file\n"
-"       -d <nn>           set debug level to nn\n"
+"       -d <nn>           set debug level to <nn>\n"
+"       -dt               print timestamp in debug output\n"
 "       -i                specify input Volume names (separated by |)\n"
 "       -o                specify output Volume names (separated by |)\n"
 "       -p                proceed inspite of errors\n"
@@ -112,9 +113,14 @@ int main (int argc, char *argv[])
          break;
 
       case 'd':                    /* debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0)
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
+         }
          break;
 
       case 'i':                    /* input Volume name */
index 53f40d9738efcc6516fd7ad59c244c72425a6989..cfa5b5b8bfabb95acc7495f4066aa5de26547cb9 100644 (file)
@@ -79,7 +79,8 @@ PROG_COPYRIGHT
 "Usage: bextract <options> <bacula-archive-device-name> <directory-to-store-files>\n"
 "       -b <file>       specify a bootstrap file\n"
 "       -c <file>       specify a configuration file\n"
-"       -d <nn>         set debug level to nn\n"
+"       -d <nn>         set debug level to <nn>\n"
+"       -dt             print timestamp in debug output\n"
 "       -e <file>       exclude list\n"
 "       -i <file>       include list\n"
 "       -p              proceed inspite of I/O errors\n"
@@ -126,9 +127,14 @@ int main (int argc, char *argv[])
          break;
 
       case 'd':                    /* debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0)
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
+         }
          break;
 
       case 'e':                    /* exclude list */
index 92d6fbcc95682d55a8735a5bab602deda575da35..218db4e64e6a1dc12cc96d35bdb3565da044169c 100644 (file)
@@ -79,7 +79,8 @@ PROG_COPYRIGHT
 "Usage: bls [options] <device-name>\n"
 "       -b <file>       specify a bootstrap file\n"
 "       -c <file>       specify a config file\n"
-"       -d <level>      specify debug level\n"
+"       -d <nn>         set debug level to <nn>\n"
+"       -dt             print timestamp in debug output\n"
 "       -e <file>       exclude list\n"
 "       -i <file>       include list\n"
 "       -j              list jobs\n"
@@ -130,9 +131,14 @@ int main (int argc, char *argv[])
          break;
 
       case 'd':                    /* debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0)
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
+         }
          break;
 
       case 'e':                    /* exclude list */
index 71254e5bbf8035d618740a511a4b5bacb1d440c3..fd0924c3404381da4a2bd676f95453e48e4b97ae 100644 (file)
@@ -116,7 +116,8 @@ PROG_COPYRIGHT
 "Usage: bscan [ options ] <bacula-archive>\n"
 "       -b bootstrap      specify a bootstrap file\n"
 "       -c <file>         specify configuration file\n"
-"       -d <nn>           set debug level to nn\n"
+"       -d <nn>           set debug level to <nn>\n"
+"       -dt               print timestamp in debug output\n"
 "       -m                update media info in database\n"
 "       -n <name>         specify the database name (default bacula)\n"
 "       -u <user>         specify database user name (default bacula)\n"
@@ -166,9 +167,14 @@ int main (int argc, char *argv[])
          break;
 
       case 'd':                    /* debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0)
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
+         }
          break;
 
       case 'h':
index a951ba804be84f0bcd2adf19aead04b15c58b231..f63f3403a7d55bb1d50aef4286e1fbd6432c52e1 100644 (file)
@@ -220,9 +220,13 @@ int main(int margc, char *margv[])
          break;
 
       case 'd':                    /* set debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0) {
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
          }
          break;
 
@@ -2598,7 +2602,8 @@ PROG_COPYRIGHT
 "Usage: btape <options> <device_name>\n"
 "       -b <file>   specify bootstrap file\n"
 "       -c <file>   set configuration file to file\n"
-"       -d <nn>     set debug level to nn\n"
+"       -d <nn>     set debug level to <nn>\n"
+"       -dt         print timestamp in debug output\n"
 "       -p          proceed inspite of I/O errors\n"
 "       -s          turn off signals\n"
 "       -v          be verbose\n"
index 74c69e08c15fa120359fef2fc75146f6deefe6b9..f7d7605c1ede9f903f88d1e511629b6a695b6e43 100644 (file)
@@ -82,7 +82,8 @@ PROG_COPYRIGHT
 "\nVersion: %s (%s)\n\n"
 "Usage: stored [options] [-c config_file] [config_file]\n"
 "        -c <file>   use <file> as configuration file\n"
-"        -dnn        set debug level to nn\n"
+"        -d <nn>     set debug level to <nn>\n"
+"        -dt         print timestamp in debug output\n"
 "        -f          run in foreground (for debugging)\n"
 "        -g <group>  set groupid to group\n"
 "        -p          proceed despite I/O errors\n"
@@ -142,9 +143,13 @@ int main (int argc, char *argv[])
          break;
 
       case 'd':                    /* debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0) {
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
          }
          break;
 
index b42ce0c8f35406b1178fc5f0922c9c337fbea58a..aa3a328bd781ed1da26fe49d096b4ba49c800de4 100644 (file)
@@ -80,7 +80,8 @@ PROG_COPYRIGHT
 " will start 3 thread and load dat1, dat and datx in your catalog\n"
 "See bbatch.c to generate datafile\n\n"
 "Usage: bbatch [ options ] -w working/dir -f datafile\n"
-"       -d <nn>           set debug level to nn\n"
+"       -d <nn>           set debug level to <nn>\n"
+"       -dt               print timestamp in debug output\n"
 "       -n <name>         specify the database name (default bacula)\n"
 "       -u <user>         specify database user name (default bacula)\n"
 "       -P <password      specify database password (default none)\n"
@@ -113,9 +114,14 @@ int main (int argc, char *argv[])
    while ((ch = getopt(argc, argv, "h:c:d:n:P:Su:vf:w:?")) != -1) {
       switch (ch) {
       case 'd':                    /* debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0)
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
+         }
          break;
 
       case 'h':
index bb5c49c415ccf6cc147b56b3415db787b283d050..c709b87dc3811404a5906597049b764e61c32ff2 100644 (file)
@@ -65,6 +65,8 @@ static void usage()
 "       -f          specify file of data to be matched\n"
 "       -l          suppress line numbers\n"
 "       -n          print lines that do not match\n"
+"       -d <nn>     set debug level to <nn>\n"
+"       -dt         print timestamp in debug output\n"
 "       -?          print this message.\n"
 "\n\n");
 
@@ -93,9 +95,13 @@ int main(int argc, char *const *argv)
    while ((ch = getopt(argc, argv, "d:f:n?")) != -1) {
       switch (ch) {
       case 'd':                       /* set debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0) {
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
          }
          break;
 
index 2c40e08195baae563e238a30016c37c39426a02e..326d6f654bd5673a8caedeaabf708375a9d2666e 100644 (file)
@@ -54,6 +54,8 @@ static void usage()
 "       -f          specify file of data to be matched\n"
 "       -e          specify expression\n"
 "       -s          sed output\n"
+"       -d <nn>     set debug level to <nn>\n"
+"       -dt         print timestamp in debug output\n"
 "       -?          print this message.\n"
 "\n");
 
@@ -77,9 +79,13 @@ int main(int argc, char *const *argv)
    while ((ch = getopt(argc, argv, "sd:f:e:")) != -1) {
       switch (ch) {
       case 'd':                       /* set debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0) {
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
          }
          break;
 
index c1a3e22110955f39ae5b3f831dd614181805e715..11b4904aad7b250dea4abb47b8dbed8bc0a80fc7 100644 (file)
@@ -187,7 +187,8 @@ _("\n"
 "Usage: %s [-f from] [-h mailhost] [-s subject] [-c copy] [recipient ...]\n"
 "       -8          set charset utf-8\n"
 "       -c          set the Cc: field\n"
-"       -dnn        set debug level to nn\n"
+"       -d <nn>     set debug level to <nn>\n"
+"       -dt         print timestamp in debug output\n"
 "       -f          set the From: field\n"
 "       -h          use mailhost:port as the SMTP server\n"
 "       -s          set the Subject: field\n"
@@ -286,9 +287,13 @@ int main (int argc, char *argv[])
          break;
 
       case 'd':                    /* set debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0) {
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
          }
          Dmsg1(20, "Debug level = %d\n", debug_level);
          break;
index dafff136af50cf0e188131fb7e07e7999bacf05a..07a501e4f7cb944c7635afbfd4c86cfb775c67af 100644 (file)
@@ -105,7 +105,8 @@ static void usage()
 "       -b              batch mode\n"
 "       -C              catalog name in the director conf file\n"
 "       -c              director conf filename\n"
-"       -dnn            set debug level to nn\n"
+"       -d <nn>         set debug level to <nn>\n"
+"       -dt             print timestamp in debug output\n"
 "       -f              fix inconsistencies\n"
 "       -v              verbose\n"
 "       -?              print this message\n\n");
@@ -145,9 +146,14 @@ int main (int argc, char *argv[])
          break;
 
       case 'd':                    /* debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0)
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
+         }
          break;
 
       case 'f':                    /* fix inconsistencies */
index 184580604b70fc6c7bbc1c825d629e23ed0bedb8..2c3d5d0f34cc9a6890530eebbcce0f1515799237 100644 (file)
@@ -66,7 +66,8 @@ static void usage()
 "\n"
 "Usage: testfind [-d debug_level] [-] [pattern1 ...]\n"
 "       -a          print extended attributes (Win32 debug)\n"
-"       -dnn        set debug level to nn\n"
+"       -d <nn>     set debug level to <nn>\n"
+"       -dt         print timestamp in debug output\n"
 "       -c          specify config file containing FileSet resources\n"
 "       -f          specify which FileSet to use\n"
 "       -?          print this message.\n"
@@ -108,10 +109,14 @@ main (int argc, char *const *argv)
             break;
 
          case 'd':                    /* set debug level */
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
             debug_level = atoi(optarg);
             if (debug_level <= 0) {
                debug_level = 1;
             }
+         }
             break;
 
          case 'f':                    /* exclude patterns */
index 02ab05788f4e5225f7fd1eba38b4f6b17d9a42c4..c28b4c40074c8709dd7cba4026feb4ba1e83081e 100644 (file)
@@ -55,7 +55,8 @@ static void usage()
 "\n"
 "Usage: testls [-d debug_level] [-] [pattern1 ...]\n"
 "       -a          print extended attributes (Win32 debug)\n"
-"       -dnn        set debug level to nn\n"
+"       -d <nn>     set debug level to <nn>\n"
+"       -dt         print timestamp in debug output\n"
 "       -e          specify file of exclude patterns\n"
 "       -i          specify file of include patterns\n"
 "       -           read pattern(s) from stdin\n"
@@ -94,9 +95,13 @@ main (int argc, char *const *argv)
          break;
 
       case 'd':                       /* set debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0) {
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
          }
          break;
 
diff --git a/bacula/src/tray-monitor/eggmarshalers.list b/bacula/src/tray-monitor/eggmarshalers.list
deleted file mode 100644 (file)
index d443ca7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-VOID:OBJECT,OBJECT
-VOID:OBJECT,STRING,LONG,LONG
-VOID:OBJECT,LONG
-VOID:OBJECT,STRING,STRING
-VOID:UINT,UINT
-BOOLEAN:INT
-BOOLEAN:ENUM
-BOOLEAN:VOID
-OBJECT:VOID
-VOID:VOID
-VOID:INT,INT
-VOID:UINT,UINT
-VOID:BOOLEAN
-VOID:OBJECT,ENUM,BOXED
-VOID:BOXED
-BOOLEAN:BOOLEAN
-BOOLEAN:OBJECT,STRING,STRING
index 195bfd5b949c9abe48d9a23d5b99e9377151c55c..df2b46f09ddedd9ef6b5d726a53768b51f4a21ca 100644 (file)
@@ -112,7 +112,8 @@ PROG_COPYRIGHT
 "\nVersion: %s (%s) %s %s %s\n\n"
 "Usage: tray-monitor [-c config_file] [-d debug_level]\n"
 "       -c <file>     set configuration file to file\n"
-"       -dnn          set debug level to nn\n"
+"       -d <nn>       set debug level to <nn>\n"
+"       -dt           print timestamp in debug output\n"
 "       -t            test - read configuration and exit\n"
 "       -?            print this message.\n"
 "\n"), 2004, VERSION, BDATE, HOST_OS, DISTNAME, DISTVER);
@@ -219,9 +220,13 @@ int main(int argc, char *argv[])
          break;
 
       case 'd':
-         debug_level = atoi(optarg);
-         if (debug_level <= 0) {
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
          }
          break;
 
index 59ef1f2ca17ef5d1432e9ab5d564c796d391a407..e2db23da2f8662328dac79a35127690c1312cc0e 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.3.6"
-#define BDATE   "16 October 2007"
-#define LSMDATE "16Oct07"
+#define BDATE   "19 October 2007"
+#define LSMDATE "19Oct07"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2007"       /* year for copyright messages in progs */
index 71277ab32ae748e5716590d978047e8815f262fa..a399c21ca07f9248c8e48f741c59dca8ee7d4892 100644 (file)
@@ -1,10 +1,19 @@
               Technical notes on version 2.3
 
 General:
+19Oct07
+kes  Make explicit exception to GPL in LICENSE to permit linking
+     the Win32 FD with Microsoft VSS code.
+kes  Apply the Solaris package patch from 
+     Masopust, Christian <christian.masopust@siemens.com>
+kes  Apply the patch to optionally add a timestamp in the debug output
+     submitted by Mariusz Czulada <manieq@wp.eu>.
 18Oct07
 ebl  Use PQerrorMessage instead of PQresultErrorMessage in postgresql
-     backend (sql_strerror). Fixe bug #989
+     backend (sql_strerror). Fixes bug #989
 16Oct07
+kes  Apply Michael Short's <mdshort@gmail.com> Win32 regress patch.
+     It applied with no problems.
 kes  Add PATH command to SunOS part of mtx-changer.in so that sed and
      awk are on the path.  
 kes  Redirect stderror to stdin on mt status command in mtx-changer.in
@@ -167,10 +176,10 @@ kes  Note, you need GTK >= 2.10 to be able to link the Tray Monitor
      program.
 kes  Move patches into patches directory.
 11Sep07 
-ebl  Fix bug #946 about "bacula-dir -t" which doesn't works
+ebl  Fix bug #946 about 'bacula-dir -t' which doesn't works
      as expected.
 09Sep07 
-ebl  Using "m" in bconsole will show messages like before,
+ebl  Using 'm' in bconsole will show messages like before,
      and not memory usage.
 kes  Fix bug #935, and probably also bug #903 where files were not
      restored. MediaId was not properly set in JobMedia record after