From: Robert Nelson Date: Tue, 26 Sep 2006 22:46:06 +0000 (+0000) Subject: Eliminate dependency on man2html. X-Git-Tag: Release-7.0.0~7524 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=70fe74e091b2426c2209110ada86566ee2f89c97;hp=8a49c134be05205e405f216807802529d84f27c6;p=bacula%2Fbacula Eliminate dependency on man2html. Made Windows service tray status windows resizable. Fixed horizontal scrolling of text in status window. Preserve horizontal and vertical scroll position while updating. This prevents the display being reset to the top line every 5 seconds. Fix Windows cross-compile compatibilty problems with *nix variants such as OS X without the zic command. Changed the URL for mt-st from ftp: to http:. Fix PostgreSQL mingw32 build problems on some platforms. Add processing of NL in tray status window. Convert listbox to a text box in Client status window. Removed unused support for events and properties display. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3509 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/configure b/bacula/configure index 05c807d839..d032766b76 100755 --- a/bacula/configure +++ b/bacula/configure @@ -16631,9 +16631,9 @@ echo "$as_me: error: Unable to find libpq-fe.h in standard locations" >&2;} elif test -f $withval/include/postgresql/libpq-fe.h; then POSTGRESQL_INCDIR=$withval/include/postgresql if test -d $withval/lib64; then - POSTGRESQL_LIBDIR=$withval/lib64 + POSTGRESQL_LIBDIR=$withval/lib64 else - POSTGRESQL_LIBDIR=$withval/lib + POSTGRESQL_LIBDIR=$withval/lib fi POSTGRESQL_BINDIR=$withval/bin else @@ -16921,7 +16921,7 @@ echo "$as_me: error: Invalid MySQL directory $withval - unable to find mysql.h u fi fi SQL_INCLUDE=-I$MYSQL_INCDIR - if test -f "$MYSQL_LIBDIR/libmysqlclient_r.a"; then + if test -f $MYSQL_LIBDIR/libmysqlclient_r.a; then SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz" cat >>confdefs.h <<\_ACEOF #define HAVE_THREAD_SAFE_MYSQL 1 diff --git a/bacula/src/filed/status.c b/bacula/src/filed/status.c index 829757dcef..fc597efb0f 100755 --- a/bacula/src/filed/status.c +++ b/bacula/src/filed/status.c @@ -49,7 +49,7 @@ extern VSSClient *g_pVSSClient; /* * General status generator */ -static void do_status(void sendit(const char *msg, int len, void *sarg), void *arg) +void output_status(void sendit(const char *msg, int len, void *sarg), void *arg) { int sec, bps; char *msg, b1[32], b2[32], b3[32], b4[32]; @@ -125,7 +125,7 @@ static void do_status(void sendit(const char *msg, int len, void *sarg), void *a * List running jobs */ Dmsg0(1000, "Begin status jcr loop.\n"); - len = Mmsg(msg, _("Running Jobs:\n")); + len = Mmsg(msg, _("\nRunning Jobs:\n")); sendit(msg, len, arg); char *vss = ""; #ifdef WIN32_VSS @@ -180,12 +180,7 @@ static void do_status(void sendit(const char *msg, int len, void *sarg), void *a } endeach_jcr(njcr); - if (!found) { - len = Mmsg(msg, _("No Jobs running.\n")); - sendit(msg, len, arg); - } - len = Mmsg(msg, _("====\n")); - sendit(msg, len, arg); + sendit(_("====\n"), 5, arg); list_terminated_jobs(sendit, arg); @@ -199,15 +194,14 @@ static void list_terminated_jobs(void sendit(const char *msg, int len, void *sa struct s_last_job *je; const char *msg; + msg = _("\nTerminated Jobs:\n"); + sendit(msg, strlen(msg), arg); + if (last_jobs->size() == 0) { - msg = _("No Terminated Jobs.\n"); - sendit(msg, strlen(msg), arg); + sendit(_("====\n"), 5, arg); return; } lock_last_jobs_list(); - sendit("\n", 1, arg); /* send separately */ - msg = _("Terminated Jobs:\n"); - sendit(msg, strlen(msg), arg); msg = _(" JobId Level Files Bytes Status Finished Name \n"); sendit(msg, strlen(msg), arg); msg = _("======================================================================\n"); @@ -292,7 +286,7 @@ int status_cmd(JCR *jcr) BSOCK *user = jcr->dir_bsock; bnet_fsend(user, "\n"); - do_status(bsock_sendit, (void *)user); + output_status(bsock_sendit, (void *)user); bnet_sig(user, BNET_EOD); return 1; @@ -399,46 +393,13 @@ static const char *level_to_str(int level) #if defined(HAVE_WIN32) int bacstat = 0; -struct s_win32_arg { - HWND hwnd; - int idlist; -}; - /* * Put message in Window List Box */ -static void win32_sendit(const char *msg, int len, void *marg) -{ - struct s_win32_arg *arg = (struct s_win32_arg *)marg; - - if (len > 0 && msg[len-1] == '\n') { - // when compiling with visual studio some strings are read-only - // and cause access violations. So we creat a tmp copy. - char *_msg = (char *)alloca(len); - bstrncpy(_msg, msg, len); - msg = _msg; - } - SendDlgItemMessage(arg->hwnd, arg->idlist, LB_ADDSTRING, 0, (LONG)msg); - -} - -void FillStatusBox(HWND hwnd, int idlist) -{ - struct s_win32_arg arg; - - arg.hwnd = hwnd; - arg.idlist = idlist; - - /* Empty box */ - for ( ; SendDlgItemMessage(hwnd, idlist, LB_DELETESTRING, 0, (LONG)0) > 0; ) - { } - do_status(win32_sendit, (void *)&arg); -} - char *bac_status(char *buf, int buf_len) { JCR *njcr; - const char *termstat = _("Bacula Idle"); + const char *termstat = _("Bacula Client: Idle"); struct s_last_job *job; int stat = 0; /* Idle */ @@ -449,7 +410,7 @@ char *bac_status(char *buf, int buf_len) foreach_jcr(njcr) { if (njcr->JobId != 0) { stat = JS_Running; - termstat = _("Bacula Running"); + termstat = _("Bacula Client: Running"); break; } } @@ -463,15 +424,15 @@ char *bac_status(char *buf, int buf_len) stat = job->JobStatus; switch (job->JobStatus) { case JS_Canceled: - termstat = _("Last Job Canceled"); + termstat = _("Bacula Client: Last Job Canceled"); break; case JS_ErrorTerminated: case JS_FatalError: - termstat = _("Last Job Failed"); + termstat = _("Bacula Client: Last Job Failed"); break; default: if (job->Errors) { - termstat = _("Last Job had Warnings"); + termstat = _("Bacula Client: Last Job had Warnings"); } break; } diff --git a/bacula/src/lib/bpipe.h b/bacula/src/lib/bpipe.h index 38c2c21f10..36a7ed7cea 100644 --- a/bacula/src/lib/bpipe.h +++ b/bacula/src/lib/bpipe.h @@ -27,4 +27,4 @@ public: btimer_t *timer_id; FILE *rfd; FILE *wfd; -}; +}; diff --git a/bacula/src/stored/status.c b/bacula/src/stored/status.c index db3a2c4c5e..1e2916e6e6 100644 --- a/bacula/src/stored/status.c +++ b/bacula/src/stored/status.c @@ -43,16 +43,13 @@ static void send_blocked_status(DEVICE *dev, void sendit(const char *msg, int le static void list_terminated_jobs(void sendit(const char *msg, int len, void *sarg), void *arg); static void list_running_jobs(void sendit(const char *msg, int len, void *sarg), void *arg); static void list_jobs_waiting_on_reservation(void sendit(const char *msg, int len, void *sarg), void *arg); -#if defined(HAVE_WIN32) -static void win32_sendit(const char *msg, int len, void *arg); -#endif static const char *level_to_str(int level); /* * Status command from Director */ -bool do_status(void sendit(const char *msg, int len, void *sarg), void *arg) +void output_status(void sendit(const char *msg, int len, void *sarg), void *arg) { DEVRES *device; AUTOCHANGER *changer; @@ -168,21 +165,19 @@ bool do_status(void sendit(const char *msg, int len, void *sarg), void *arg) if (dev) { len = Mmsg(msg, _("Device %s is not open.\n"), dev->print_name()); sendit(msg, len, arg); + send_blocked_status(dev, sendit, arg); } else { len = Mmsg(msg, _("Device \"%s\" is not open or does not exist.\n"), device->hdr.name); sendit(msg, len, arg); } - send_blocked_status(dev, sendit, arg); } } - len = Mmsg(msg, _("====\n\n")); - sendit(msg, len, arg); + sendit("====\n\n", 6, arg); len = Mmsg(msg, _("In Use Volume status:\n")); sendit(msg, len, arg); list_volumes(sendit, arg); - len = Mmsg(msg, _("====\n\n")); - sendit(msg, len, arg); - + sendit("====\n\n", 6, arg); + #ifdef xxx if (debug_level > 10) { bnet_fsend(user, _("====\n\n")); @@ -194,7 +189,6 @@ bool do_status(void sendit(const char *msg, int len, void *sarg), void *arg) list_spool_stats(sendit, arg); free_pool_memory(msg); - return true; } static void send_blocked_status(DEVICE *dev, void sendit(const char *msg, int len, void *sarg), void *arg) @@ -410,12 +404,7 @@ static void list_running_jobs(void sendit(const char *msg, int len, void *sarg), } endeach_jcr(jcr); - if (!found) { - len = Mmsg(msg, _("No Jobs running.\n")); - sendit(msg, len, arg); - } - len = Mmsg(msg, _("====\n")); - sendit(msg, len, arg); + sendit("====\n", 5, arg); free_pool_memory(msg); } @@ -436,8 +425,7 @@ static void list_jobs_waiting_on_reservation(void sendit(const char *msg, int le } endeach_jcr(jcr); - msg = _("====\n"); - sendit(msg, strlen(msg), arg); + sendit("====\n", 5, arg); } @@ -448,14 +436,13 @@ static void list_terminated_jobs(void sendit(const char *msg, int len, void *sar struct s_last_job *je; const char *msg; + msg = _("\nTerminated Jobs:\n"); + sendit(msg, strlen(msg), arg); if (last_jobs->size() == 0) { - msg = _("No Terminated Jobs.\n"); - sendit(msg, strlen(msg), arg); + sendit("====\n", 5, arg); return; } lock_last_jobs_list(); - msg = _("\nTerminated Jobs:\n"); - sendit(msg, strlen(msg), arg); msg = _(" JobId Level Files Bytes Status Finished Name \n"); sendit(msg, strlen(msg), arg); msg = _("===================================================================\n"); @@ -514,8 +501,8 @@ static void list_terminated_jobs(void sendit(const char *msg, int len, void *sar dt, JobName); sendit(buf, strlen(buf), arg); } - sendit(_("====\n"), 5, arg); unlock_last_jobs_list(); + sendit("====\n", 5, arg); } /* @@ -585,7 +572,7 @@ bool status_cmd(JCR *jcr) BSOCK *user = jcr->dir_bsock; bnet_fsend(user, "\n"); - do_status(bsock_sendit, (void *)user); + output_status(bsock_sendit, (void *)user); bnet_sig(user, BNET_EOD); return 1; @@ -638,46 +625,10 @@ bool qstatus_cmd(JCR *jcr) #if defined(HAVE_WIN32) int bacstat = 0; -struct s_win32_arg { - HWND hwnd; - int idlist; -}; - -/* - * Put message in Window List Box - */ -static void win32_sendit(const char *msg, int len, void *marg) -{ - struct s_win32_arg *arg = (struct s_win32_arg *)marg; - - if (len > 0 && msg[len-1] == '\n') { - // when compiling with visual studio some strings are read-only - // and cause access violations. So we creat a tmp copy. - char *_msg = (char *)alloca(len); - bstrncpy(_msg, msg, len); - msg = _msg; - } - SendDlgItemMessage(arg->hwnd, arg->idlist, LB_ADDSTRING, 0, (LONG)msg); - -} - -void FillStatusBox(HWND hwnd, int idlist) -{ - struct s_win32_arg arg; - - arg.hwnd = hwnd; - arg.idlist = idlist; - - /* Empty box */ - for ( ; SendDlgItemMessage(hwnd, idlist, LB_DELETESTRING, 0, (LONG)0) > 0; ) - { } - do_status(win32_sendit, (void *)&arg); -} - char *bac_status(char *buf, int buf_len) { JCR *njcr; - const char *termstat = _("Bacula Idle"); + const char *termstat = _("Bacula Storage: Idle"); struct s_last_job *job; int stat = 0; /* Idle */ @@ -688,7 +639,7 @@ char *bac_status(char *buf, int buf_len) foreach_jcr(njcr) { if (njcr->JobId != 0) { stat = JS_Running; - termstat = _("Bacula Running"); + termstat = _("Bacula Storage: Running"); break; } } @@ -702,15 +653,15 @@ char *bac_status(char *buf, int buf_len) stat = job->JobStatus; switch (job->JobStatus) { case JS_Canceled: - termstat = _("Last Job Canceled"); + termstat = _("Bacula Storage: Last Job Canceled"); break; case JS_ErrorTerminated: case JS_FatalError: - termstat = _("Last Job Failed"); + termstat = _("Bacula Storage: Last Job Failed"); break; default: if (job->Errors) { - termstat = _("Last Job had Warnings"); + termstat = _("Bacula Storage: Last Job had Warnings"); } break; } diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index a9d910f150..caac62b55f 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -9,6 +9,14 @@ kes Add back code to open tape device nonblocking, but if rewind fails release file descriptor. kes Modify acquire.c to first try autoloading the device. Also, ask operator to mount tape if drive cannot be opened. +rbn Made Windows service tray status windows resizable. +rbn Fixed horizontal scrolling of text in status window. +rbn Preserve horizontal and vertical scroll position while + updating. This prevents the display being reset to the + top line every 5 seconds. +rbn Fix Windows cross-compile compatibilty problems with + *nix variants such as OS X without the zic command. +rbn Eliminate dependency on man2html. 25Sep06 kes Update src/win32/dll/bacula.def for change in BPIPE definition for Win32 build. @@ -20,6 +28,11 @@ kes Update the README.mingw32 kes Add new version of upgrade-win32-client.txt to examples directory. Submitted by Michel Meyers. kes Print an INFO message in the job report when a Volume is marked Purged. +rbn Fixed handling of external program and script execution + so that the format of the command line is more flexible. + Now executable path names containing spaces are translated + to the equivalent short name automatically. The result is + passed to cmd.exe with the quotes removed. 24Sep06 kes Apply the recycle patch from Richard Mortimer. kes Convert a few if statements in dev.c to switch statements. @@ -119,6 +132,12 @@ kes Disable normal data spooling for DVD writing which uses a different spooling mechanism. kes Apply patch from Richard Mortimer to ensure that the number of DVD parts is correctly updated. +rbn Save installer details log in the Bacula directory as + install.log. +rbn Add installer generation of client and storage templates + suitable for @inclusion on the director. +rbn Mark previously installed components read-only since + deselection doesn't do anything. Version 1.39.22 beta released: 08Sep06 @@ -165,6 +184,24 @@ kes Manual updates. kes Update examples directory. kes Remove unused variable in winservice.cpp kes Make Win32 make command build installer. +rbn Add new Install Type page, used to select between Automatic + and Custom installs. Automatic installs only prompt for + configuration items that can't be reasonably defaulted. +rbn Added Bacula logo to page headers. +rbn Added Upgrade support + - Configuration and component selection are migrated from + pre-1.39 installs. + - Configuration of upgraded components is preserved and + not prompted for + - Configuration of new components is handled according to + the Automatic / Custom selection. + - Component selection is defaulted to previously selected + components. +rbn Installation of Server components is disabled on + Windows 95, 98 and ME. +rbn Added URLs for support, info and upgrades to Bacula entry + in Add/Remove Programs. +rbn Added Version info to Bacula entry in Add/Remove Programs. 04Sep06 kes Correct dvd code that breaks tape labeling. kes Implement Enabled on update slots. @@ -186,16 +223,22 @@ kes Tweak so that debug level 20 shows only DVD commands. kes Correct spooled_part flag in dev.c close() so that it is cleared when the spool file is deleted or does not exist. kes Print part number in read_records when eof hit (restore). +rbn Installer default changed to start services on new install. 31Aug06 --es Make find with no args in tree restore return error rather than +kes Make find with no args in tree restore return error rather than stopping the selection. Fixes bug #665 kes Rework DVD writing to ensure that the last part is written on open_next_part when dealing with a spool file. kes Correct the lseek_dev() routine to handle end point correctly (bug introduced by me). kes Allow part number to exceed num_dvd_parts in lseek_dev(). +rbn Change make_session_key on Windows to use WIN32 APIs to produce + a better seed. +rbn Add new tool scsilist.exe which displays the changer, tape and + CD/DVD (1394, SCSI, SATA, ATAPI) devices and the information required + to add them to bacula-sd.conf. 30Aug06 -kes Apply dvd-handler patch from Richard Mortimer. +kes Apply dvd-handler patch from Richard Mortimer. kes Apply dvd error check patch from Richard Mortimer. kes Apply bpipe race patch from Richard Mortimer. kes Rework how DVD labels are handled and set append only @@ -266,7 +309,23 @@ kes When not descending into a directory, print the File= name that triggered it -- makes why not descending a bit clearer. kes Do not unload autochanger when doing a list command -- basic code from Eric Bollengier. -07Aug06 +12Aug06 +rbn Reworked the MinGW32 build-dependencies script, it has been renamed + to build-depkgs-mingw32. It now handles two options -h to display + help and -C to reextract the source and apply the patches. The -C + option is useful for updating the source after new patches are + released. +rbn Moved the 3rd party package URLs to a separate file External-mingw32. + This allows updating to new versions without having to modify the + script and makes it easier to figure out which packages and which + versions are used. +rbn Added a new script build-depkgs-msvc.cmd which does the same thing + as build-depkgs-mingw32 except they are built using Microsoft Visual C + and placed in the depkgs-msvc directory. There is also an + External-msvc file to describe the packages. +08Aug06 +rbn Fix Windows cross-compile compatibilty problems with FreeBSD. +07Aug06 kes Fix bug #462 incorrect error message printed when client script called from File= was not found. kes Fix bug #558 (waiting for feedback) where Bacula needs too much time to