From: Kern Sibbald Date: Fri, 27 Mar 2009 17:59:16 +0000 (+0000) Subject: Implement installation of bat help files X-Git-Tag: Release-3.0.0~89 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=60480cabaa0a4bf7a3365ecac19729a936d1e0b2;p=bacula%2Fbacula Implement installation of bat help files The help files are installed in the htmldoc dir and can be set by --htmldoc=xxx on the ./configure. Default is: /usr/share/doc/bacula-version/html git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8614 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/Makefile.in b/bacula/Makefile.in index f53148cf68..46c9818a6a 100755 --- a/bacula/Makefile.in +++ b/bacula/Makefile.in @@ -189,6 +189,8 @@ Makefiles: chmod 755 create_@DB_TYPE@_database update_@DB_TYPE@_tables make_@DB_TYPE@_tables; \ chmod 755 grant_@DB_TYPE@_privileges drop_@DB_TYPE@_tables drop_@DB_TYPE@_database; \ chmod 755 make_catalog_backup delete_catalog_backup) + (cd src/qt-console; \ + chmod 755 install_conf_file build-depkgs-qt-console) clean: @for I in ${all_subdirs} ; \ diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 5b64a3cbaf..2a0fb04578 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -212,11 +212,6 @@ dnl Suppport for gettext (translations) dnl By default, $datarootdir is ${prefix}/share dnl -------------------------------------------------- AM_GNU_GETTEXT([external]) -if test x${prefix} = xNONE ; then - if test `eval echo ${datarootdir}` = NONE/share ; then - datarootdir=/usr/share - fi -fi dnl ------------------------------------------------------------------ dnl If the user has not set --prefix, we set our default to nothing. @@ -243,6 +238,9 @@ if test x${prefix} = xNONE ; then includedir=/usr/include fi + if test `eval echo ${datarootdir}` = NONE/share ; then + datarootdir=/usr/share + fi prefix= fi @@ -255,6 +253,8 @@ fi sysconfdir=`eval echo ${sysconfdir}` datarootdir=`eval echo ${datarootdir}` +docdir=`eval echo ${docdir}` +htmldir=`eval echo ${htmldir}` libdir=`eval echo ${libdir}` includedir=`eval echo ${includedir}` localedir=`eval echo ${datarootdir}/locale` @@ -275,6 +275,23 @@ dnl ------------------------------------------------------------------------- if test x$mandir = x'${prefix}/man' ; then mandir=/usr/share/man fi + +dnl ------------------------------------------------------------------------- +dnl If the user has not set --htmldir, we default to /usr/share/doc/bacula-xx.xx/html +dnl ------------------------------------------------------------------------- +dnl z +if test x$htmldir = x${docdir} ; then + htmldir=`eval echo ${docdir}bacula-${VERSION}/html` +fi + +dnl ------------------------------------------------------------------------- +dnl If the user has not set --docdir, we default to /usr/share/doc/ +dnl ------------------------------------------------------------------------- +dnl z +if test x$docdir = x'/usr/share/doc/' ; then + docdir=`eval echo ${docdir}bacula-${VERSION}` +fi + AC_PATH_PROGS(MSGFMT, msgfmt, no) if test "$MSGFMT" = "no" @@ -2882,7 +2899,6 @@ if test "${support_bat}" = "yes" ; then fi cd src/qt-console - chmod 755 install_conf_file build-depkgs-qt-console echo "Creating bat Makefile" $QMAKEBIN make clean @@ -2898,6 +2914,10 @@ if test X"$GCC" = "Xyes" ; then ${MAKE:-make} depend fi +cd src/qt-console +chmod 755 install_conf_file build-depkgs-qt-console +cd ${BUILD_DIR} + cd scripts chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer chmod 755 dvd-handler dvd-simulator diff --git a/bacula/configure b/bacula/configure index c67a1bce6c..15899f9ed8 100755 --- a/bacula/configure +++ b/bacula/configure @@ -18315,11 +18315,6 @@ _ACEOF -if test x${prefix} = xNONE ; then - if test `eval echo ${datarootdir}` = NONE/share ; then - datarootdir=/usr/share - fi -fi if test x${prefix} = xNONE ; then if test `eval echo ${sysconfdir}` = NONE/etc ; then @@ -18334,6 +18329,9 @@ if test x${prefix} = xNONE ; then includedir=/usr/include fi + if test `eval echo ${datarootdir}` = NONE/share ; then + datarootdir=/usr/share + fi prefix= fi @@ -18343,6 +18341,8 @@ fi sysconfdir=`eval echo ${sysconfdir}` datarootdir=`eval echo ${datarootdir}` +docdir=`eval echo ${docdir}` +htmldir=`eval echo ${htmldir}` libdir=`eval echo ${libdir}` includedir=`eval echo ${includedir}` localedir=`eval echo ${datarootdir}/locale` @@ -18364,6 +18364,15 @@ if test x$mandir = x'${prefix}/man' ; then mandir=/usr/share/man fi +if test x$htmldir = x${docdir} ; then + htmldir=`eval echo ${docdir}bacula-${VERSION}/html` +fi + +if test x$docdir = x'/usr/share/doc/' ; then + docdir=`eval echo ${docdir}bacula-${VERSION}` +fi + + for ac_prog in msgfmt do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -28669,7 +28678,11 @@ echo "${ECHO_T}no" >&6; } echo "$as_me: error: Unable to find mysql in standard locations" >&2;} { (exit 1); exit 1; }; } fi - DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.a + if test -f $SQL_LIBDIR/libmysqlclient_r.so; then + DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.so + else + DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.a + fi ;; "postgresql") db_prog="postgresql" @@ -28709,7 +28722,11 @@ echo "${ECHO_T}no" >&6; } echo "$as_me: error: Unable to find psql in standard locations" >&2;} { (exit 1); exit 1; }; } fi - DB_PROG_LIB=$SQL_LIBDIR/libpq.a + if test -f $SQL_LIBDIR/libpq.so; then + DB_PROG_LIB=$SQL_LIBDIR/libpq.so + else + DB_PROG_LIB=$SQL_LIBDIR/libpq.a + fi ;; "sqlite") db_prog="sqlite" @@ -28741,7 +28758,11 @@ echo "${ECHO_T}no" >&6; } echo "$as_me: error: Unable to find sqlite in standard locations" >&2;} { (exit 1); exit 1; }; } fi - DB_PROG_LIB=$SQL_LIBDIR/libsqlite.a + if test -f $SQL_LIBDIR/libsqlite.so; then + DB_PROG_LIB=$SQL_LIBDIR/libsqlite.so + else + DB_PROG_LIB=$SQL_LIBDIR/libsqlite.a + fi ;; "sqlite3") db_prog="sqlite3" @@ -28773,7 +28794,11 @@ echo "${ECHO_T}no" >&6; } echo "$as_me: error: Unable to find sqlite in standard locations" >&2;} { (exit 1); exit 1; }; } fi - DB_PROG_LIB=$SQL_LIBDIR/libsqlite3.a + if test -f $SQL_LIBDIR/libsqlite3.so; then + DB_PROG_LIB=$SQL_LIBDIR/libsqlite3.so + else + DB_PROG_LIB=$SQL_LIBDIR/libsqlite3.a + fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 @@ -45569,7 +45594,6 @@ if test "${support_bat}" = "yes" ; then fi cd src/qt-console - chmod 755 install_conf_file build-depkgs-qt-console echo "Creating bat Makefile" $QMAKEBIN make clean @@ -45581,6 +45605,10 @@ if test X"$GCC" = "Xyes" ; then ${MAKE:-make} depend fi +cd src/qt-console +chmod 755 install_conf_file build-depkgs-qt-console +cd ${BUILD_DIR} + cd scripts chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer chmod 755 dvd-handler dvd-simulator diff --git a/bacula/projects b/bacula/projects index 60f31e48d4..744589e03f 100644 --- a/bacula/projects +++ b/bacula/projects @@ -1054,93 +1054,133 @@ Why: Because of a couple of reasons. First, it's very hard to implement a especially where there is little available. Item n: Restore from volumes on multiple storage daemons - Origin: Graham Keeling (graham@equiinet.com) - -Date: 12 March 2009 - +Date: 12 March 2009 Status: Proposing -What: The ability to restore from volumes held by multiple storage daemons -would be very useful. +What: The ability to restore from volumes held by multiple storage daemons + would be very useful. -Why: It is useful to be able to backup to any number of different storage -daemons. For example, your first storage daemon may run out of space, so you -switch to your second and carry on. Bacula will currently let you do this. -However, once you come to restore, bacula cannot cope when volumes on different -storage daemons are required. +Why: It is useful to be able to backup to any number of different storage + daemons. For example, your first storage daemon may run out of space, so you + switch to your second and carry on. Bacula will currently let you do this. + However, once you come to restore, bacula cannot cope when volumes on different + storage daemons are required. -Notes: The director knows that more than one storage daemon is needed, as -bconsole outputs something like the following table. + Notes: The director knows that more than one storage daemon is needed, as + bconsole outputs something like the following table. -The job will require the following - Volume(s) Storage(s) SD Device(s) -=========================================================================== - - backup-0001 Disk 1 Disk 1.0 - backup-0002 Disk 2 Disk 2.0 - -However, the bootstrap file that it creates gets sent to the first storage -daemon only, which then stalls for a long time, 'waiting for a mount request' -for the volume that it doesn't have. -The bootstrap file contains no knowledge of the storage daemon. -Under the current design: - - The director connects to the storage daemon, and gets an sd_auth_key. - The director then connects to the file daemon, and gives it the - sd_auth_key with the 'jobcmd'. - (restoring of files happens) - The director does a 'wait_for_storage_daemon_termination()'. + The job will require the following + Volume(s) Storage(s) SD Device(s) + =========================================================================== + + backup-0001 Disk 1 Disk 1.0 + backup-0002 Disk 2 Disk 2.0 + + However, the bootstrap file that it creates gets sent to the first storage + daemon only, which then stalls for a long time, 'waiting for a mount request' + for the volume that it doesn't have. + The bootstrap file contains no knowledge of the storage daemon. + Under the current design: + + The director connects to the storage daemon, and gets an sd_auth_key. + The director then connects to the file daemon, and gives it the + sd_auth_key with the 'jobcmd'. + (restoring of files happens) + The director does a 'wait_for_storage_daemon_termination()'. + The director waits for the file daemon to indicate the end of the job. + + With my idea: + + The director connects to the file daemon. + Then, for each storage daemon in the .bsr file... { + The director connects to the storage daemon, and gets an sd_auth_key. + The director then connects to the file daemon, and gives it the + sd_auth_key with the 'storaddr' command. + (restoring of files happens) + The director does a 'wait_for_storage_daemon_termination()'. + The director waits for the file daemon to indicate the end of the + work on this storage. + } + The director tells the file daemon that there are no more storages to contact. The director waits for the file daemon to indicate the end of the job. -With my idea: - -The director connects to the file daemon. -Then, for each storage daemon in the .bsr file... { - The director connects to the storage daemon, and gets an sd_auth_key. - The director then connects to the file daemon, and gives it the - sd_auth_key with the 'storaddr' command. - (restoring of files happens) - The director does a 'wait_for_storage_daemon_termination()'. - The director waits for the file daemon to indicate the end of the - work on this storage. -} -The director tells the file daemon that there are no more storages to contact. -The director waits for the file daemon to indicate the end of the job. - -As you can see, each restore between the file daemon and storage daemon is -handled in the same way that it is currently handled, using the same method -for authentication, except that the sd_auth_key is moved from the 'jobcmd' to -the 'storaddr' command - where it logically belongs. - -Item n: 'restore' menu: enter a JobId, automatically select dependents + As you can see, each restore between the file daemon and storage daemon is + handled in the same way that it is currently handled, using the same method + for authentication, except that the sd_auth_key is moved from the 'jobcmd' to + the 'storaddr' command - where it logically belongs. +Item n:'restore' menu: enter a JobId, automatically select dependents Origin: Graham Keeling (graham@equiinet.com) - -Date: 13 March 2009 +Date: 13 March 2009 Status: Proposing -What: Add to the bconsole 'restore' menu the ability to select a job -by JobId, and have bacula automatically select all the dependent jobs. - -Why: Currently, you either have to... -a) laboriously type in a date that is greater than the date of the backup that -you want and is less than the subsequent backup (bacula then figures out the -dependent jobs), or -b) manually figure out all the JobIds that you want and laboriously type them -all in. -It would be extremely useful (in a programmatical sense, as well as for humans) -to be able to just give it a single JobId and let bacula do the hard work (work -that it already knows how to do). - -Notes (Kern): I think this should either be modified to have Bacula print -a list of dates that the user can choose from as is done in bwx-console and -bat or the name of this command must be carefully chosen so that the user -clearly understands that the JobId is being used to specify what Job and the -date to which he wishes the restore to happen. - - +What: Add to the bconsole 'restore' menu the ability to select a job + by JobId, and have bacula automatically select all the dependent jobs. + + Why: Currently, you either have to... + a) laboriously type in a date that is greater than the date of the backup that + you want and is less than the subsequent backup (bacula then figures out the + dependent jobs), or + b) manually figure out all the JobIds that you want and laboriously type them + all in. + It would be extremely useful (in a programmatical sense, as well as for humans) + to be able to just give it a single JobId and let bacula do the hard work (work + that it already knows how to do). + + Notes (Kern): I think this should either be modified to have Bacula print + a list of dates that the user can choose from as is done in bwx-console and + bat or the name of this command must be carefully chosen so that the user + clearly understands that the JobId is being used to specify what Job and the + date to which he wishes the restore to happen. + +Item 1: Bacula Dir, FD and SD to support proxies +Origin: Karl Grindley @ MIT Lincoln Laboratory +Date: 25 March 2009 +Status: proposed + +What: Support alternate methods for nailing up a TCP session such + as SOCKS5, SOCKS4 and HTTP (CONNECT) proxies. Such a feature + would allow tunneling of bacula traffic in and out of proxied + networks. + +Why: Currently, bacula is architected to only function on a flat network, with + no barriers or limitations. Due to the large configuration states of + any network and the infinite configuration where file daemons and + storage daemons may sit in relation to one another, bacula often is + not usable on a network where filtered or air-gaped networks exist. + While often solutions such as ACL modifications to firewalls or port + redirection via SNAT or DNAT will solve the issue, often however, + these solutions are not adequate or not allowed by hard policy. + + In an air-gapped network with only a highly locked down proxy services + are provided (SOCKS4/5 and/or HTTP and/or SSH outbound) ACLs or + iptable rules will not work. + +Notes: Director resource tunneling: This configuration option to utilize a + proxy to connect to a client should be specified in the client + resource Client resource tunneling: should be configured in the client + resource in the director config file? Or configured on the bacula-fd + configuration file on the fd host itself? If the ladder, this would + allow only certain clients to use a proxy, where others do not when + establishing the TCP connection to the storage server. Storage + resource tunneling: right now bacula does not initiate TCP session + from the storage resource, however, if Item 2 is implemented, proxy + support would be highly desired here as well. + + Also worth noting, there are other 3rd party, light weight apps that + could be utilized to bootstrap this. Instead of sockifing bacula + itself, use an external program to broker proxy authentication, and + connection to the remote host. OpenSSH does this by using the + "ProxyCommand" syntax in the client configuration and uses stdin and + stdout to the command. Connect.c is a very popular one. + (http://bent.latency.net/bent/darcs/goto-san-connect-1.85/src/connect.html). + One could also possibly use stunnel, netcat, etc. + + + +========= Add new items above this line ================= ============= Empty Feature Request form =========== diff --git a/bacula/src/findlib/find.c b/bacula/src/findlib/find.c index ad40a393f2..872060377f 100644 --- a/bacula/src/findlib/find.c +++ b/bacula/src/findlib/find.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2008 Free Software Foundation Europe e.V. + Copyright (C) 2000-2009 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. diff --git a/bacula/src/host.h.in b/bacula/src/host.h.in index cc465f3881..d3615e9bf6 100644 --- a/bacula/src/host.h.in +++ b/bacula/src/host.h.in @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2008 Free Software Foundation Europe e.V. + Copyright (C) 2000-2009 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. @@ -36,3 +36,4 @@ #define BACULA "@BACULA@" #define DISTNAME "@DISTNAME@" #define DISTVER "@DISTVER@" +#define HELPDIR "@htmldir@" diff --git a/bacula/src/qt-console/bat.pro.in b/bacula/src/qt-console/bat.pro.in index 2a6afb7b5b..b779743e94 100644 --- a/bacula/src/qt-console/bat.pro.in +++ b/bacula/src/qt-console/bat.pro.in @@ -13,6 +13,8 @@ bins.path = /$(DESTDIR)@sbindir@ bins.files = ./bat confs.path = /$(DESTDIR)@sysconfdir@ confs.commands = ./install_conf_file +help.path = /$(DESTDIR)@htmldir@ +help.files = help/*.html images/status.png images/mail-message-new.png TEMPLATE = app TARGET = bat @@ -157,6 +159,7 @@ SOURCES += util/fmtwidgetitem.cpp util/comboutil.cpp INSTALLS += bins INSTALLS += confs +INSTALLS += help QMAKE_EXTRA_TARGETS += depend diff --git a/bacula/src/qt-console/help/console.html b/bacula/src/qt-console/help/console.html index 2de082cbb3..04f2cf24d3 100644 --- a/bacula/src/qt-console/help/console.html +++ b/bacula/src/qt-console/help/console.html @@ -23,10 +23,10 @@ the interface to manually enter any command as with bconsole.

There are 2 icons in the taskbar which are designed to run console commands.

Use the status -icon in the taskbar to run the status dir command. +  icon in the taskbar to run the status dir command.

Use the messages icon in the taskbar to run the messages command. +height="32">   icon in the taskbar to run the messages command.

There will be no attempt to document console commands here. An alphabetic list of the commands can be found on the following web URL diff --git a/bacula/src/qt-console/help/help.cpp b/bacula/src/qt-console/help/help.cpp index 0e280f0a0a..fe6f6662b4 100644 --- a/bacula/src/qt-console/help/help.cpp +++ b/bacula/src/qt-console/help/help.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2007 Free Software Foundation Europe e.V. + Copyright (C) 2007-2009 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. @@ -45,7 +45,7 @@ Help::Help(const QString &path, const QString &file, QWidget *parent) : setupUi(this); /* create window */ - textBrowser->setSearchPaths(QStringList() << path << ":/images"); + textBrowser->setSearchPaths(QStringList() << HELPDIR << path << ":/images"); textBrowser->setSource(file); //textBrowser->setCurrentFont(mainWin->m_consoleHash.values()[0]->get_font()); diff --git a/bacula/src/qt-console/help/help.h b/bacula/src/qt-console/help/help.h index ae75722c9d..fef9607549 100644 --- a/bacula/src/qt-console/help/help.h +++ b/bacula/src/qt-console/help/help.h @@ -4,7 +4,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2007 Free Software Foundation Europe e.V. + Copyright (C) 2007-2009 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. diff --git a/bacula/src/qt-console/storage/storage.cpp b/bacula/src/qt-console/storage/storage.cpp index 4f19a7bd49..285fc6d19d 100644 --- a/bacula/src/qt-console/storage/storage.cpp +++ b/bacula/src/qt-console/storage/storage.cpp @@ -129,7 +129,6 @@ void Storage::populateTree() if (m_console->sql_cmd(query, results)) { QStringList fieldlist; - int cnter = 1; foreach (QString resultline, results) { fieldlist = resultline.split("\t"); storageName = fieldlist.takeFirst(); diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index d420d9a7b7..39887dc3e8 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -2,6 +2,19 @@ General: +27Mar09 +kes Implement installation of bat help files + The help files are installed in the htmldoc dir and can be set + by --htmldoc=xxx on the ./configure. Default is: + /usr/share/doc/bacula-version/html +kes Update projects file +kes Apply patch from Pasi Karkkainen that adds + Previous Job name to migrate job report. +26Mar09 +kes Apply bacula-autoconf-db-m4.patch from Kjetil Torgrim Homme + that doesn't *require* the static libraries + for the SQL database engine. Fixes a build problem if the static + libraries are not loaded. 25Mar09 ebl Update Makefiles to compile win64 using "make WIN64=yes" kes Disable plugin options in ua_run.c