]> git.sur5r.net Git - bacula/bacula/commitdiff
Final changes
authorKern Sibbald <kern@sibbald.com>
Wed, 24 Mar 2004 15:27:45 +0000 (15:27 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 24 Mar 2004 15:27:45 +0000 (15:27 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1148 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ChangeLog
bacula/ReleaseNotes
bacula/autoconf/configure.in
bacula/configure
bacula/kernstodo
bacula/src/cats/sql_get.c
bacula/src/dird/ua_cmds.c
bacula/src/dird/ua_purge.c
bacula/src/dird/ua_query.c
bacula/src/version.h

index 3415de833ca1bb8a862d5b7caf9d59b9dc93e44e..bad993d5bf2ee3b1b45d6cc01e665aa3ab2af7b4 100644 (file)
@@ -1,4 +1,16 @@
 
+24Mar04
+- Apply corrected SQL to sql_get.c supplied by Dan Langille.
+- Implement "delete job jobid=xxx jobid=yyy ..."
+- Implemente "purge volume=xxx volume=yyy ..."
+- Fix buffer overrun in query string substitution.
+22Mar04
+- Fix bad format %s instead of %d for editing new slot in update volume.
+  Reported by Vadim Zotov.
+- Better error diagnostics in ./configure for detecting termcap library.
+20Mar04
+- Restore old sql.c split_path and file name since it seems to have
+  broken the Verify stuff.
 19Mar04
 - Hunt down missing free_locked_jcr() in SD that caused zombies.
 - Modify status outputs to be more consistent for zombie checking.
index 4f83db8686f96949262ef68479596c79501af0d9..f3e20fee7712e4e70ddc5f8b6c795263316e1d47 100644 (file)
@@ -1,7 +1,24 @@
 
           Release Notes for Bacula 1.33.4
 
-  Bacula code: Total files = 301 Total lines = 89,118 (*.h *.c *.in)
+  Bacula code: Total files = 306 Total lines = 90,715 (*.h *.c *.in)
+
+Major Features:
+- Data spooling which eliminates tape shoe-shine during Inc backups,         
+  and permits multiple simultaneous backups without interleaved blocks.
+- Polling of devices eliminating need to unmount and mount from
+  console.
+- Native Win32 client -- much faster and restores permissions correctly
+  (thanks to Christopher Hull)
+- PostgreSQL database driver (thanks to Dan Langille).
+- Improved Autochange support of Slots (update slots scan).
+- Autochanger support for multiple drives.
+- New conio code to implement Console command line editing and history.
+- JobDefs resource permits smaller .conf files for Director
+- Access console lists for the Console
+- Pool level overrides.
+- Daemon statistics memory.
+- Improved btape "test" and "fill" commands.
 
 New directives:
 - "Close on Poll = yes/no" in SD Device resource.
@@ -39,14 +56,11 @@ New Commands:
 - "unmarkdir" command in restore tree.
 - "quit" command in restore tree.
 - Trace option on "setdebug trace=1/0 ..."
+- Update slots scan
 
 
-Most Significant Changes since 1.32f-4
-- Native Win32 Client -- much faster and does better restores than old
-  Cygwin Win32 Client.
+Additional changes:
 - Implement Gnome 2.0 restore GUI
-- Implement data spooling
-- Implement Volume Polling
 - Add a missing unlock in the jobq handler.
 - Fix bug where a soft linked file and a directory had the same name
   by treating the soft link as a directory and putting the entries under
@@ -99,10 +113,8 @@ Most Significant Changes since 1.32f-4
 - Fixed seg fault in restore of multiple simultaneous jobs to 
   a single Volume.
 - Fixed thread race problem in multiple simultaneous jobs to
-  a single Volume where the volume lable is not in the first 
+  a single Volume where the volume label is not in the first 
   tape block, so the tape is not recognized.
-
-Other Changes since 1.32d
 - Restore directory tree automatically selects all higher level
   directories to be restored.
 - Implement conio.c to use in console program -- mini-readline.
index 96fdfa9e356f02ca6bfe25f6739f255e2c2dca6a..d294713455c8c60e1d1c19570f89018516013d56 100644 (file)
@@ -1606,6 +1606,9 @@ AC_OUTPUT([autoconf/Make.common \
           src/cats/drop_bacula_database \
           src/findlib/Makefile \
           src/tools/Makefile \
+          src/win32/winbacula.nsi \
+          src/win32/bacula-fd.conf \
+          src/win32/Makefile \
           $PFILES ],  
          [(echo "Doing make of dependencies"; make depend;) ]
 )
index 8e657a1530babe27643657b23fceb3433483e418..7a54c6d50513b420f13e38bd717b2e48ad2fe6ee 100755 (executable)
@@ -18039,7 +18039,7 @@ if test "x${subsysdir}" = "x${sbindir}" ; then
    exit 1
 fi
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ac_config_files="$ac_config_files autoconf/Make.common Makefile rescue/Makefile rescue/linux/Makefile rescue/freebsd/Makefile rescue/solaris/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/devel_bacula scripts/fd scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/mtx-changer doc/Makefile src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome-console/Makefile src/gnome-console/gnome-console.conf src/gnome2-console/Makefile src/gnome2-console/gnome-console.conf src/tconsole/Makefile src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/filed/win32/Makefile src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile $PFILES"
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ac_config_files="$ac_config_files autoconf/Make.common Makefile rescue/Makefile rescue/linux/Makefile rescue/freebsd/Makefile rescue/solaris/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/devel_bacula scripts/fd scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/mtx-changer doc/Makefile src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome-console/Makefile src/gnome-console/gnome-console.conf src/gnome2-console/Makefile src/gnome2-console/gnome-console.conf src/tconsole/Makefile src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/filed/win32/Makefile src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile src/win32/winbacula.nsi src/win32/bacula-fd.conf src/win32/Makefile $PFILES"
           ac_config_commands="$ac_config_commands default"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -18644,6 +18644,9 @@ do
   "src/cats/drop_bacula_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_bacula_database" ;;
   "src/findlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/findlib/Makefile" ;;
   "src/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;;
+  "src/win32/winbacula.nsi" ) CONFIG_FILES="$CONFIG_FILES src/win32/winbacula.nsi" ;;
+  "src/win32/bacula-fd.conf" ) CONFIG_FILES="$CONFIG_FILES src/win32/bacula-fd.conf" ;;
+  "src/win32/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/win32/Makefile" ;;
   "$PFILES" ) CONFIG_FILES="$CONFIG_FILES $PFILES" ;;
   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
   "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:autoconf/config.h.in" ;;
index 41f8387397d44ea58fa2537669fe3c7e737ddb5b..2977974a0fa423ec7db92033e292582bfac119bb 100644 (file)
@@ -74,11 +74,9 @@ For 1.33 Testing/Documentation:
 For 1.33
 - Complete Win32 installer
 - Finish work on Gnome restore GUI.
-- Fix query buffer clobber ua_query.c
 - On unknown client in restore "client=xxx"
   Could not find Client "Matou": ERR=Query failed: DROP TABLE temp1: 
      ERR=no such table: temp1
-- Allow "delete job jobid=xx jobid=xxx".   
 - Implement multiple Volume in "purge jobs volume=".
 - Fix "llist jobid=xx" where no fileset or client exists.
 - Build console in client-only build.
@@ -1419,3 +1417,6 @@ Block Position: 0
 - Estimate to Tibs never returns.
 - Symbolic link a directory to another one, then backup the symbolic link.
 - Check and possibly fix problems with hard links.
+- Fix query buffer clobber ua_query.c
+- Allow "delete job jobid=xx jobid=xxx".   
+
index 02981b9b92cc71fccc659121112276faf31bde04..9594f74108309497cfff78e011fce6c1999fde64 100644 (file)
@@ -320,17 +320,12 @@ int db_get_job_volume_names(JCR *jcr, B_DB *mdb, uint32_t JobId, POOLMEM **Volum
    int i;
 
    db_lock(mdb);
-#ifdef HAVE_POSTGRESQL
+   /* Get one entry per VolumeName, but "sort" by VolIndex */
    Mmsg(&mdb->cmd, 
-        "SELECT DISTINCT VolumeName FROM JobMedia,Media WHERE "
-        "JobMedia.JobId=%u AND JobMedia.MediaId=Media.MediaId ", JobId);
-#else
-   Mmsg(&mdb->cmd, 
-        "SELECT VolumeName,VolIndex FROM JobMedia,Media WHERE "
+        "SELECT VolumeName,MAX(VolIndex) FROM JobMedia,Media WHERE "
         "JobMedia.JobId=%u AND JobMedia.MediaId=Media.MediaId "
         "GROUP BY VolumeName "
-        "ORDER BY VolIndex", JobId);
-#endif
+        "ORDER BY 2 ASC", JobId);
 
    Dmsg1(130, "VolNam=%s\n", mdb->cmd);
    *VolumeNames[0] = 0;
index 18d546bf31ce553a6822c0fe0204c2b574e4efa7..b17df2582d85c0680cfc1a72c8f6d83051e97092 100644 (file)
@@ -1503,7 +1503,8 @@ static int reload_cmd(UAContext *ua, char *cmd)
  * Delete Pool records (should purge Media with it).
  *
  *  delete pool=<pool-name>
- *  delete media pool=<pool-name> volume=<name>
+ *  delete volume pool=<pool-name> volume=<name>
+ *  delete job jobid=xxx
  */
 static int delete_cmd(UAContext *ua, char *cmd)
 {
@@ -1517,8 +1518,7 @@ static int delete_cmd(UAContext *ua, char *cmd)
       return 1;
    }
 
-     
-   switch (find_arg_keyword(ua, keywords)) {
+   switch (find_arg_keyword(ua, keywords)) {     
    case 0:
       delete_volume(ua);     
       return 1;
@@ -1526,7 +1526,11 @@ static int delete_cmd(UAContext *ua, char *cmd)
       delete_pool(ua);
       return 1;
    case 2:
-      delete_job(ua);
+      int i;
+      while ((i=find_arg(ua, _("jobid"))) > 0) {
+        delete_job(ua);
+        *ua->argk[i] = 0;         /* zap keyword already visited */
+      }
       return 1;
    default:
       break;
@@ -1558,7 +1562,7 @@ static int delete_job(UAContext *ua)
    POOLMEM *query = get_pool_memory(PM_MESSAGE);
    JobId_t JobId;
 
-   int i = find_arg_with_value(ua, "jobid");
+   int i = find_arg_with_value(ua, _("jobid"));
    if (i >= 0) {
       JobId = str_to_int64(ua->argv[i]);
    } else if (!get_pint(ua, _("Enter JobId to delete: "))) {
index 569a5f7b76fc16c8eccbf7cb3f7506c29d320ac3..3cba6c85573973d814a06f6ab4511687beb2eed7 100644 (file)
@@ -163,6 +163,7 @@ static int file_delete_handler(void *ctx, int num_fields, char **row)
  */
 int purgecmd(UAContext *ua, char *cmd)
 {
+   int i;
    CLIENT *client;
    MEDIA_DBR mr;
    JOB_DBR  jr;
@@ -234,8 +235,12 @@ int purgecmd(UAContext *ua, char *cmd)
       }
    /* Volume */
    case 2:
-      if (select_media_dbr(ua, &mr)) {
-        purge_jobs_from_volume(ua, &mr);
+      while ((i=find_arg(ua, _("volume"))) >= 0) {
+        if (select_media_dbr(ua, &mr)) {
+           purge_jobs_from_volume(ua, &mr);
+        }
+        *ua->argk[i] = 0;            /* zap keyword already seen */
+         bsendmsg(ua, "\n");
       }
       return 1;
    default:
index dcd802531d6ed94386023e9629552464da199e22..970ef5ab52f43cc845c407a39a504e9f1b5c40a9 100644 (file)
@@ -172,16 +172,15 @@ static POOLMEM *substitute_prompts(UAContext *ua,
    for (i=0; i<9; i++) {
       subst[i] = NULL;
    }
-   /* ****FIXME**** second and third check_pool ... below are probably broken */
-   new_query = get_memory(2000);
-   new_query = check_pool_memory_size(new_query, strlen(query) +100);
+   new_query = get_pool_memory(PM_FNAME);
    o = new_query;
-   olen = 0;
    for (q=query; (p=strchr(q, '%')); ) {
       if (p) {
+       olen = o - new_query;
+       new_query = check_pool_memory_size(new_query, olen + p - q + 10);
+       o = new_query + olen;
         while (q < p) {              /* copy up to % */
            *o++ = *q++;
-           olen++;
         }
         p++;
         switch (*p) {
@@ -206,10 +205,11 @@ static POOLMEM *substitute_prompts(UAContext *ua,
               p = (char *)malloc(len * 2 + 1);
               db_escape_string(p, ua->cmd, len);
               subst[n] = p;
-              new_query = check_pool_memory_size(new_query, olen + strlen(p) + 1);
+              olen = o - new_query;
+              new_query = check_pool_memory_size(new_query, olen + strlen(p) + 10);
+              o = new_query + olen;
               while (*p) {
                  *o++ = *p++;
-                 olen++;
               }
            } else {
                bsendmsg(ua, _("Warning prompt %d missing.\n"), n+1);
@@ -218,18 +218,18 @@ static POOLMEM *substitute_prompts(UAContext *ua,
            break;
          case '%':
             *o++ = '%';
-           olen++;
            q += 2;
            break;
         default:
             *o++ = '%';
-           olen++;
            q++;
            break;
         }
       }
    }
-   new_query = check_pool_memory_size(new_query, olen + strlen(q) + 1);
+   olen = o - new_query;
+   new_query = check_pool_memory_size(new_query, olen + strlen(q) + 10);
+   o = new_query + olen;
    while (*q) {
       *o++ = *q++;
    }
index 751b6bb7eb3e97ac930a183bfb65d796496515dd..6aa15024b9fdbae4ec032e2bbc46a3847a593da5 100644 (file)
@@ -1,9 +1,9 @@
 /* */
 #undef  VERSION
-#define VERSION "1.33.4"
+#define VERSION "1.33.5"
 #define VSTRING "1"
-#define BDATE   "23 Mar 2004"
-#define LSMDATE "23Mar04"
+#define BDATE   "24 Mar 2004"
+#define LSMDATE "24Mar04"
 
 /* Debug flags */
 #undef  DEBUG