From: Kern Sibbald Date: Wed, 24 Mar 2004 15:27:45 +0000 (+0000) Subject: Final changes X-Git-Tag: Release-7.0.0~9610 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2c1d12019fab3157a989f12f415aa69aaa767c7e;p=bacula%2Fbacula Final changes git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1148 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/ChangeLog b/bacula/ChangeLog index 3415de833c..bad993d5bf 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -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. diff --git a/bacula/ReleaseNotes b/bacula/ReleaseNotes index 4f83db8686..f3e20fee77 100644 --- a/bacula/ReleaseNotes +++ b/bacula/ReleaseNotes @@ -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. diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 96fdfa9e35..d294713455 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -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;) ] ) diff --git a/bacula/configure b/bacula/configure index 8e657a1530..7a54c6d505 100755 --- a/bacula/configure +++ b/bacula/configure @@ -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" ;; diff --git a/bacula/kernstodo b/bacula/kernstodo index 41f8387397..2977974a0f 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -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". + diff --git a/bacula/src/cats/sql_get.c b/bacula/src/cats/sql_get.c index 02981b9b92..9594f74108 100644 --- a/bacula/src/cats/sql_get.c +++ b/bacula/src/cats/sql_get.c @@ -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; diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 18d546bf31..b17df2582d 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -1503,7 +1503,8 @@ static int reload_cmd(UAContext *ua, char *cmd) * Delete Pool records (should purge Media with it). * * delete pool= - * delete media pool= volume= + * delete volume pool= volume= + * 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: "))) { diff --git a/bacula/src/dird/ua_purge.c b/bacula/src/dird/ua_purge.c index 569a5f7b76..3cba6c8557 100644 --- a/bacula/src/dird/ua_purge.c +++ b/bacula/src/dird/ua_purge.c @@ -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: diff --git a/bacula/src/dird/ua_query.c b/bacula/src/dird/ua_query.c index dcd802531d..970ef5ab52 100644 --- a/bacula/src/dird/ua_query.c +++ b/bacula/src/dird/ua_query.c @@ -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++; } diff --git a/bacula/src/version.h b/bacula/src/version.h index 751b6bb7eb..6aa15024b9 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -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