For the most part, Bacula is licensed under the GPL version 2
and any code that is Copyright Kern Sibbald and John Walker or
Copyright Kern Sibbald (after November 2004) with the GPL
-indication is so licensed, but with the following four additions:
+indication is so licensed, but with the following five additions:
Linking:
Bacula may be linked with any libraries permitted under the GPL,
Code falling under the above conditions will be marked as follows:
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
+Windows:
+Certain source code used to build the Windows version of the Bacula
+File daemon is copyrighted and or trademarked by Microsoft and may
+contain Microsoft intellectual property (examples: Microsoft VC++, the
+source to the VSS libraries, the Microsoft C runtime libraries). As
+such we cannot and do not distribute that software. The compiler is
+available for purchase, and Microsoft provides a free version of the
+compiler. The source code and libraries are available for download from
+Microsoft public Web servers. We have documented in the src/win32
+directory how we build the Windows File daemon and many users have
+succeeded in doing so themselves. Our intention is to respect as
+closely as possible Open Source practices while maintaining full
+respect for proprietary and copyrighted code.
+
=====================================
The entire GPL is reproduced in the manuals distributed with the
Kern Sibbald
General:
+08Apr06
+- Tweak license to include Microsoft restrictions.
+- Move mysql.reconnect to after real_connect(). Thanks to
+ Frank Sweetser for the patch.
+- Disallow a backslash in a File = directive (Windows junk)
+ unless the string is quoted.
+- Apply Eric's patch to ua_label.c so that daemon protocol
+ is not translated.
+- Add NT_ definition for strings that should not be translated.
+- Apply NT_() to ua_label.c
+
- Remove timed wait for VSS on Win2K3 as it is not yet
implemented.
- Correct bacula.in script to reference bacula-ctl-xx in the
--- /dev/null
+
+This patch (thanks to Frank Sweetser) should fix the timeout problem
+users are experiencing with MySQL versions greater than 5.0.13.
+It can be applied to Bacula version 1.38.7 (and possibly 1.38.5 and 1.38.6)
+with:
+
+ cd <bacula-source>
+ patch -p0 <1.38.7-mysql.patch
+ make
+ make install
+
+Index: src/cats/mysql.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/cats/mysql.c,v
+retrieving revision 1.37.2.2
+diff -u -r1.37.2.2 mysql.c
+--- src/cats/mysql.c 4 Mar 2006 11:10:17 -0000 1.37.2.2
++++ src/cats/mysql.c 7 Apr 2006 14:10:23 -0000
+@@ -132,7 +132,6 @@
+ mysql_server_init(0, NULL, NULL);
+ #endif
+ mysql_init(&(mdb->mysql));
+- mdb->mysql.reconnect = 1; /* so connection does not timeout */
+ Dmsg0(50, "mysql_init done\n");
+ /* If connection fails, try at 5 sec intervals for 30 seconds. */
+ for (int retry=0; retry < 6; retry++) {
+@@ -153,6 +152,7 @@
+ bmicrosleep(5,0);
+ }
+
++ mdb->mysql.reconnect = 1; /* so connection does not timeout */
+ Dmsg0(50, "mysql_real_connect done\n");
+ Dmsg3(50, "db_user=%s db_name=%s db_password=%s\n", mdb->db_user, mdb->db_name,
+ mdb->db_password==NULL?"(NULL)":mdb->db_password);
#define setlocale(p, d)
#endif
#endif /* ENABLE_NLS */
+/* Use the following for strings not to be translated */
+#define NT_(s) (s)
/* This should go away! ****FIXME***** */
#define MAXSTRING 500
mysql_server_init(0, NULL, NULL);
#endif
mysql_init(&(mdb->mysql));
- mdb->mysql.reconnect = 1; /* so connection does not timeout */
Dmsg0(50, "mysql_init done\n");
/* If connection fails, try at 5 sec intervals for 30 seconds. */
for (int retry=0; retry < 6; retry++) {
bmicrosleep(5,0);
}
+ mdb->mysql.reconnect = 1; /* so connection does not timeout */
Dmsg0(50, "mysql_real_connect done\n");
Dmsg3(50, "db_user=%s db_name=%s db_password=%s\n", mdb->db_user, mdb->db_name,
mdb->db_password==NULL?"(NULL)":mdb->db_password);
/* Pickup Filename string
*/
switch (token) {
- case T_IDENTIFIER:
- case T_UNQUOTED_STRING:
- case T_QUOTED_STRING:
- if (res_all.res_fs.have_MD5) {
- MD5Update(&res_all.res_fs.md5c, (unsigned char *)lc->str, lc->str_len);
- }
- incexe = &res_incexe;
- if (incexe->name_list.size() == 0) {
- incexe->name_list.init(10, true);
- }
- incexe->name_list.append(bstrdup(lc->str));
- Dmsg1(900, "Add to name_list %s\n", lc->str);
- break;
- default:
- scan_err1(lc, _("Expected a filename, got: %s"), lc->str);
+ case T_IDENTIFIER:
+ case T_UNQUOTED_STRING:
+ if (strchr(lc->str, '\\')) {
+ scan_err1(lc, _("Backslash found. Use forward slashes or quote the string.: %s\n"), lc->str);
+ /* NOT REACHED */
+ }
+ case T_QUOTED_STRING:
+ if (res_all.res_fs.have_MD5) {
+ MD5Update(&res_all.res_fs.md5c, (unsigned char *)lc->str, lc->str_len);
+ }
+ incexe = &res_incexe;
+ if (incexe->name_list.size() == 0) {
+ incexe->name_list.init(10, true);
+ }
+ incexe->name_list.append(bstrdup(lc->str));
+ Dmsg1(900, "Add to name_list %s\n", lc->str);
+ break;
+ default:
+ scan_err1(lc, _("Expected a filename, got: %s"), lc->str);
}
}
scan_to_eol(lc);
bstrncpy(dev_name, store->dev_name(), sizeof(dev_name));
bash_spaces(dev_name);
/* Ask for autochanger list of volumes */
- bnet_fsend(sd, _("readlabel %s Slot=%d drive=%d\n"), dev_name, Slot, drive);
+ bnet_fsend(sd, NT_("readlabel %s Slot=%d drive=%d\n"), dev_name, Slot, drive);
Dmsg1(100, "Sent: %s", sd->msg);
/* Get Volume name in this Slot */
while (bnet_recv(sd) >= 0) {
bsendmsg(ua, "%s", sd->msg);
Dmsg1(100, "Got: %s", sd->msg);
- if (strncmp(sd->msg, "3001 Volume=", 12) == 0) {
+ if (strncmp(sd->msg, NT_("3001 Volume="), 12) == 0) {
VolName = (char *)malloc(sd->msglen);
- if (sscanf(sd->msg, "3001 Volume=%s Slot=%d", VolName, &rtn_slot) == 2) {
+ if (sscanf(sd->msg, NT_("3001 Volume=%s Slot=%d"), VolName, &rtn_slot) == 2) {
break;
}
free(VolName);
bstrncpy(dev_name, store->dev_name(), sizeof(dev_name));
bash_spaces(dev_name);
/* Ask for autochanger list of volumes */
- bnet_fsend(sd, _("autochanger list %s \n"), dev_name);
+ bnet_fsend(sd, NT_("autochanger list %s \n"), dev_name);
/* Read and organize list of Volumes */
while (bnet_recv(sd) >= 0) {
bstrncpy(dev_name, store->dev_name(), sizeof(dev_name));
bash_spaces(dev_name);
/* Ask for autochanger number of slots */
- bnet_fsend(sd, _("autochanger slots %s\n"), dev_name);
+ bnet_fsend(sd, NT_("autochanger slots %s\n"), dev_name);
while (bnet_recv(sd) >= 0) {
if (sscanf(sd->msg, "slots=%d\n", &slots) == 1) {
bstrncpy(dev_name, store->dev_name(), sizeof(dev_name));
bash_spaces(dev_name);
/* Ask for autochanger number of slots */
- bnet_fsend(sd, _("autochanger drives %s\n"), dev_name);
+ bnet_fsend(sd, NT_("autochanger drives %s\n"), dev_name);
while (bnet_recv(sd) >= 0) {
- if (sscanf(sd->msg, "drives=%d\n", &drives) == 1) {
+ if (sscanf(sd->msg, NT_("drives=%d\n"), &drives) == 1) {
break;
} else {
bsendmsg(ua, "%s", sd->msg);
/*********************************************************************
*
- * Main Bacula Pool Creation Program
+ * Bacula tape testing program
*
*/
int main(int margc, char *margv[])
*/
#undef VERSION
-#define VERSION "1.39.6"
-#define BDATE "24 March 2006"
-#define LSMDATE "24Mar06"
+#define VERSION "1.39.7"
+#define BDATE "08 April 2006"
+#define LSMDATE "08Apr06"
/* Debug flags */
#undef DEBUG