]> git.pld-linux.org Git - packages/bacula.git/commitdiff
- official bacula patches for 2.4.4
authorAndrzej Zawadzki <zawadaa@gmail.com>
Thu, 9 Apr 2009 15:05:20 +0000 (15:05 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bacula-2.4.4-bat-install.patch -> 1.1
    bacula-2.4.4-fortify.patch -> 1.1
    bacula-2.4.4-jobname-edit.patch -> 1.1
    bacula-2.4.4-label-failure.patch -> 1.1
    bacula-2.4.4-reload.patch -> 1.1
    bacula-2.4.4-sd-deadlock.patch -> 1.1
    bacula-2.4.4-time_t_64bit.patch -> 1.1
    bacula-2.4.4-tray-sizing.patch -> 1.1

bacula-2.4.4-bat-install.patch [new file with mode: 0644]
bacula-2.4.4-fortify.patch [new file with mode: 0644]
bacula-2.4.4-jobname-edit.patch [new file with mode: 0644]
bacula-2.4.4-label-failure.patch [new file with mode: 0644]
bacula-2.4.4-reload.patch [new file with mode: 0644]
bacula-2.4.4-sd-deadlock.patch [new file with mode: 0644]
bacula-2.4.4-time_t_64bit.patch [new file with mode: 0644]
bacula-2.4.4-tray-sizing.patch [new file with mode: 0644]

diff --git a/bacula-2.4.4-bat-install.patch b/bacula-2.4.4-bat-install.patch
new file mode 100644 (file)
index 0000000..a3e95fa
--- /dev/null
@@ -0,0 +1,29 @@
+
+ This patch fixes bat.pro.in so that bat will install correctly.
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-bat-install.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/qt-console/bat.pro.in
+===================================================================
+--- src/qt-console/bat.pro.in  (revision 8326)
++++ src/qt-console/bat.pro.in  (working copy)
+@@ -9,9 +9,9 @@
+ #    
+ CONFIG += qt debug @QWT@
+-bins.path = /$(DESTDIR)@sbindir@
++bins.path = $(DESTDIR)@sbindir@
+ bins.files = ./bat
+-confs.path = /$(DESTDIR)@sysconfdir@
++confs.path = $(DESTDIR)@sysconfdir@
+ confs.commands = ./install_conf_file   
+ TEMPLATE     = app
diff --git a/bacula-2.4.4-fortify.patch b/bacula-2.4.4-fortify.patch
new file mode 100644 (file)
index 0000000..c51e25f
--- /dev/null
@@ -0,0 +1,33 @@
+
+ This patch permit to disable the _FORTIFY_SOURCE flag that is
+ added by some distributions.
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-fortify.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+
+Index: src/bacula.h
+===================================================================
+--- src/bacula.h       (révision 8436)
++++ src/bacula.h       (copie de travail)
+@@ -34,6 +34,13 @@
+ #ifndef _BACULA_H
+ #define _BACULA_H 1
++/* Disable FORTIFY_SOURCE, because bacula uses is own memory
++ * manager
++ */
++#ifdef _FORTIFY_SOURCE
++#undef _FORTIFY_SOURCE
++#endif
++
+ #ifdef __cplusplus
+ /* Workaround for SGI IRIX 6.5 */
+ #define _LANGUAGE_C_PLUS_PLUS 1
diff --git a/bacula-2.4.4-jobname-edit.patch b/bacula-2.4.4-jobname-edit.patch
new file mode 100644 (file)
index 0000000..240519f
--- /dev/null
@@ -0,0 +1,26 @@
+
+ This patch fixes bug #1255 'variable %n changed'
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-jobname-edit.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/dird/job.c
+===================================================================
+--- src/dird/job.c     (revision 8455)
++++ src/dird/job.c     (working copy)
+@@ -787,7 +787,7 @@
+    len = strlen(dt) + 5;   /* dt + .%02d EOS */
+    bstrncpy(name, base_name, sizeof(name));
+    name[sizeof(name)-len] = 0;          /* truncate if too long */
+-   bsnprintf(jcr->Job, sizeof(jcr->Job), "%s.%s.%02d", name, dt, seq); /* add date & time */
++   bsnprintf(jcr->Job, sizeof(jcr->Job), "%s.%s_%02d", name, dt, seq); /* add date & time */
+    /* Convert spaces into underscores */
+    for (p=jcr->Job; *p; p++) {
+       if (*p == ' ') {
diff --git a/bacula-2.4.4-label-failure.patch b/bacula-2.4.4-label-failure.patch
new file mode 100644 (file)
index 0000000..3dc1157
--- /dev/null
@@ -0,0 +1,85 @@
+                                                             [label-failure.patch] IQ
+ This patch should fix the problems labeling a tape while
+ Bacula is requesting you to mount or label a new tape.
+ It should also fix problems where Bacula will not recognize
+ that a new tape is inserted or created and it keeps asking for
+ a different tape. It fixes bug #1227.
+
+ Apply it to 2.4.4 (possibly earlier versions) with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-label-failure.patch
+ ./configure <your-options>
+ make
+ ...
+ make install
+ ...
+
+
+
+Index: src/stored/wait.c
+===================================================================
+--- src/stored/wait.c  (revision 8605)
++++ src/stored/wait.c  (working copy)
+@@ -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.
+@@ -20,7 +20,7 @@
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA.
+-   Bacula® is a registered trademark of John Walker.
++   Bacula® is a registered trademark of Kern Sibbald.
+    The licensor of Bacula is the Free Software Foundation Europe
+    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+    Switzerland, email:ftf@fsfeurope.org.
+@@ -62,8 +62,14 @@
+    dev->dlock();  
+    Dmsg1(dbglvl, "Enter blocked=%s\n", dev->print_blocked());
++
++   /*
++    * Since we want to mount a tape, make sure current one is
++    *  not marked as using this drive.
++    */
++   volume_unused(dcr);
++
+    unmounted = is_device_unmounted(dev);
+-
+    dev->poll = false;
+    /*
+     * Wait requested time (dev->rem_wait_sec).  However, we also wake up every
+Index: src/stored/reserve.c
+===================================================================
+--- src/stored/reserve.c       (revision 8605)
++++ src/stored/reserve.c       (working copy)
+@@ -20,7 +20,7 @@
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA.
+-   Bacula® is a registered trademark of John Walker.
++   Bacula® is a registered trademark of Kern Sibbald.
+    The licensor of Bacula is the Free Software Foundation Europe
+    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+    Switzerland, email:ftf@fsfeurope.org.
+@@ -346,8 +346,12 @@
+             goto get_out;
+          }
+          Dmsg3(dbglvl, "jid=%u reserve_vol free vol=%s at %p\n", jid(), vol->vol_name, vol->vol_name);
+-         free_volume(dev);
+-         dev->set_unload();             /* have to unload current volume */
++         /* If old Volume is still mounted, must unload it */
++         if (strcmp(vol->vol_name, dev->VolHdr.VolumeName) == 0) {
++            Dmsg0(50, "set_unload\n");
++            dev->set_unload();          /* have to unload current volume */
++         }
++         free_volume(dev);              /* Release old volume entry */
+          debug_list_volumes("reserve_vol free");
+       }
+    }
diff --git a/bacula-2.4.4-reload.patch b/bacula-2.4.4-reload.patch
new file mode 100644 (file)
index 0000000..367a0d6
--- /dev/null
@@ -0,0 +1,165 @@
+
+ This patch fixes bug #1211 crash during reload with bad dird.conf file.
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-reload.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/lib/parse_conf.c
+===================================================================
+--- src/lib/parse_conf.c       (revision 8393)
++++ src/lib/parse_conf.c       (working copy)
+@@ -284,6 +284,7 @@
+             }
+             if (token != T_EQUALS) {
+                scan_err1(lc, _("expected an =, got: %s"), lc->str);
++               return;
+             }
+             break;
+          }
+@@ -304,6 +305,7 @@
+          Dmsg1(900, "store_msgs dest=%s:\n", NPRT(dest));
+          if (token != T_EQUALS) {
+             scan_err1(lc, _("expected an =, got: %s"), lc->str);
++            return;
+          }
+          scan_types(lc, (MSGS *)(item->value), item->code, dest, NULL);
+          free_pool_memory(dest);
+@@ -312,7 +314,7 @@
+       default:
+          scan_err1(lc, _("Unknown item code: %d\n"), item->code);
+-         break;
++         return;
+       }
+    }
+    scan_to_eol(lc);
+@@ -352,7 +354,7 @@
+       }
+       if (!found) {
+          scan_err1(lc, _("message type: %s not found"), str);
+-         /* NOT REACHED */
++         return;
+       }
+       if (msg_type == M_MAX+1) {         /* all? */
+@@ -384,12 +386,14 @@
+    lex_get_token(lc, T_NAME);
+    if (!is_name_valid(lc->str, &msg)) {
+       scan_err1(lc, "%s\n", msg);
++      return;
+    }
+    free_pool_memory(msg);
+    /* Store the name both pass 1 and pass 2 */
+    if (*(item->value)) {
+       scan_err2(lc, _("Attempt to redefine name \"%s\" to \"%s\"."),
+          *(item->value), lc->str);
++      return;
+    }
+    *(item->value) = bstrdup(lc->str);
+    scan_to_eol(lc);
+@@ -481,10 +485,12 @@
+       if (res == NULL) {
+          scan_err3(lc, _("Could not find config Resource %s referenced on line %d : %s\n"),
+             lc->str, lc->line_no, lc->line);
++         return;
+       }
+       if (*(item->value)) {
+          scan_err3(lc, _("Attempt to redefine resource \"%s\" referenced on line %d : %s\n"),
+             item->name, lc->line_no, lc->line);
++         return;
+       }
+       *(item->value) = (char *)res;
+    }
+@@ -520,6 +526,7 @@
+          if (i >= count) {
+             scan_err4(lc, _("Too many %s directives. Max. is %d. line %d: %s\n"),
+                lc->str, count, lc->line_no, lc->line);
++            return;
+          }
+          list = New(alist(10, not_owned_by_alist));
+       }
+@@ -530,6 +537,7 @@
+          if (res == NULL) {
+             scan_err3(lc, _("Could not find config Resource \"%s\" referenced on line %d : %s\n"),
+                item->name, lc->line_no, lc->line);
++            return;
+          }
+          Dmsg5(900, "Append %p to alist %p size=%d i=%d %s\n", 
+                res, list, list->size(), i, item->name);
+@@ -592,6 +600,7 @@
+      if (res == NULL) {
+         scan_err3(lc, _("Missing config Resource \"%s\" referenced on line %d : %s\n"),
+            lc->str, lc->line_no, lc->line);
++        return;
+      }
+    }
+    scan_to_eol(lc);
+@@ -655,12 +664,13 @@
+       }
+       if (!size_to_uint64(bsize, strlen(bsize), &uvalue)) {
+          scan_err1(lc, _("expected a size number, got: %s"), lc->str);
++         return;
+       }
+       *(uint64_t *)(item->value) = uvalue;
+       break;
+    default:
+       scan_err1(lc, _("expected a size, got: %s"), lc->str);
+-      break;
++      return;
+    }
+    if (token != T_EOL) {
+       scan_to_eol(lc);
+@@ -697,12 +707,13 @@
+       }
+       if (!duration_to_utime(period, &utime)) {
+          scan_err1(lc, _("expected a time period, got: %s"), period);
++         return;
+       }
+       *(utime_t *)(item->value) = utime;
+       break;
+    default:
+       scan_err1(lc, _("expected a time period, got: %s"), lc->str);
+-      break;
++      return;
+    }
+    if (token != T_EOL) {
+       scan_to_eol(lc);
+@@ -721,6 +732,7 @@
+       *(uint32_t *)(item->value) &= ~(item->code);
+    } else {
+       scan_err2(lc, _("Expect %s, got: %s"), "YES, NO, TRUE, or FALSE", lc->str); /* YES and NO must not be translated */
++      return;
+    }
+    scan_to_eol(lc);
+    set_bit(index, res_all.hdr.item_present);
+@@ -736,6 +748,7 @@
+       *(bool *)(item->value) = false;
+    } else {
+       scan_err2(lc, _("Expect %s, got: %s"), "YES, NO, TRUE, or FALSE", lc->str); /* YES and NO must not be translated */
++      return;
+    }
+    scan_to_eol(lc);
+    set_bit(index, res_all.hdr.item_present);
+@@ -761,6 +774,7 @@
+    }
+    if (i != 0) {
+       scan_err1(lc, _("Expected a Tape Label keyword, got: %s"), lc->str);
++      return;
+    }
+    scan_to_eol(lc);
+    set_bit(index, res_all.hdr.item_present);
+@@ -910,6 +924,7 @@
+                Dmsg0(900, "T_EOB => define new resource\n");
+                if (res_all.hdr.name == NULL) {
+                   scan_err0(lc, _("Name not specified for resource"));
++                  return 0;
+                }
+                save_resource(res_type, items, pass);  /* save resource */
+                break;
diff --git a/bacula-2.4.4-sd-deadlock.patch b/bacula-2.4.4-sd-deadlock.patch
new file mode 100644 (file)
index 0000000..ed60e68
--- /dev/null
@@ -0,0 +1,67 @@
+
+ This patch is backported from the development SVN and should fix
+ bug #1213, which is a deadlock in the SD when a volume is on the
+ wrong drive.
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-sd-deadlock.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/stored/reserve.c
+===================================================================
+--- src/stored/reserve.c       (revision 8426)
++++ src/stored/reserve.c       (working copy)
+@@ -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.
+@@ -498,7 +498,6 @@
+ void DCR::unreserve_device()
+ {
+    lock_volumes();
+-   dev->dlock();
+    if (is_reserved()) {
+       clear_reserved();
+       reserved_volume = false;
+@@ -514,7 +513,6 @@
+          volume_unused(this);
+       }
+    }
+-   dev->dunlock();
+    unlock_volumes();
+ }
+Index: src/stored/acquire.c
+===================================================================
+--- src/stored/acquire.c       (revision 8426)
++++ src/stored/acquire.c       (working copy)
+@@ -1,7 +1,7 @@
+ /*
+    Bacula® - The Network Backup Solution
+-   Copyright (C) 2002-2008 Free Software Foundation Europe e.V.
++   Copyright (C) 2002-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.
+@@ -647,8 +647,8 @@
+    /* Detach this dcr only if attached */
+    if (dcr->attached_to_dev && dev) {
++      dev->dlock();
+       dcr->unreserve_device();
+-      dev->dlock();
+       dcr->dev->attached_dcrs->remove(dcr);  /* detach dcr from device */
+       dcr->attached_to_dev = false;
+ //    remove_dcr_from_dcrs(dcr);      /* remove dcr from jcr list */
diff --git a/bacula-2.4.4-time_t_64bit.patch b/bacula-2.4.4-time_t_64bit.patch
new file mode 100644 (file)
index 0000000..46dd440
--- /dev/null
@@ -0,0 +1,55 @@
+
+ This patch fixes bug #1247 - 64-bit time_t and varargs don't get along in some
+ printf-like formatting
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-time_t_64bit.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/stored/spool.c
+===================================================================
+--- src/stored/spool.c (revision 8455)
++++ src/stored/spool.c (working copy)
+@@ -306,7 +306,7 @@
+    set_new_file_parameters(dcr);
+    /* Subtracting run_time give us elapsed time - wait_time since we started despooling */
+-   time_t despool_elapsed = time(NULL) - despool_start - jcr->run_time;
++   int32_t despool_elapsed = time(NULL) - despool_start - jcr->run_time;
+    if (despool_elapsed <= 0) {
+       despool_elapsed = 1;
+Index: src/stored/append.c
+===================================================================
+--- src/stored/append.c        (revision 8455)
++++ src/stored/append.c        (working copy)
+@@ -270,7 +270,7 @@
+    do_fd_commands(jcr);               /* finish dialog with FD */
+-   time_t job_elapsed = time(NULL) - jcr->run_time;
++   int32_t job_elapsed = time(NULL) - jcr->run_time;
+    if (job_elapsed <= 0) {
+       job_elapsed = 1;
+Index: src/lib/message.c
+===================================================================
+--- src/lib/message.c  (revision 8455)
++++ src/lib/message.c  (working copy)
+@@ -780,8 +780,8 @@
+              case MD_DIRECTOR:
+                 Dmsg1(850, "DIRECTOR for following msg: %s", msg);
+                 if (jcr && jcr->dir_bsock && !jcr->dir_bsock->errors) {
+-                   bnet_fsend(jcr->dir_bsock, "Jmsg Job=%s type=%d level=%d %s",
+-                      jcr->Job, type, mtime, msg);
++                   bnet_fsend(jcr->dir_bsock, "Jmsg Job=%s type=%d level=%lld %s",
++                      jcr->Job, type, (utime_t)mtime, msg);
+                 }
+                 break;
+              case MD_STDOUT:
diff --git a/bacula-2.4.4-tray-sizing.patch b/bacula-2.4.4-tray-sizing.patch
new file mode 100644 (file)
index 0000000..abeffb7
--- /dev/null
@@ -0,0 +1,59 @@
+
+ This patch fixes a text sizing problem in the tray-monitor.
+ It fixes bug #1219.
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-tray-sizing.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/tray-monitor/tray-monitor.c
+===================================================================
+--- src/tray-monitor/tray-monitor.c    (revision 8393)
++++ src/tray-monitor/tray-monitor.c    (working copy)
+@@ -1,7 +1,7 @@
+ /*
+    Bacula® - The Network Backup Solution
+-   Copyright (C) 2004-2007 Free Software Foundation Europe e.V.
++   Copyright (C) 2004-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.
+@@ -97,6 +97,7 @@
+ static GtkWidget *textview;
+ static GtkTextBuffer *buffer;
+ static GtkWidget *timeoutspinner;
++static GtkWidget *scrolledWindow;
+ char** xpm_generic_var;
+ static gboolean blinkstate = TRUE;
+@@ -409,9 +410,13 @@
+    }
+    gtk_box_pack_start(GTK_BOX(vbox), daemon_table, FALSE, FALSE, 0);
+-
++  
+    textview = gtk_text_view_new();
++   scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
++   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
++   gtk_container_add(GTK_CONTAINER (scrolledWindow), textview);
++   
+    buffer = gtk_text_buffer_new(NULL);
+    gtk_text_buffer_set_text(buffer, "", -1);
+@@ -456,7 +461,7 @@
+    gtk_text_view_set_buffer(GTK_TEXT_VIEW(textview), buffer);
+-   gtk_box_pack_start(GTK_BOX(vbox), textview, TRUE, TRUE, 0);
++   gtk_box_pack_start(GTK_BOX(vbox), scrolledWindow, TRUE, TRUE, 0);
+    GtkWidget* hbox = gtk_hbox_new(FALSE, 10);
This page took 0.04273 seconds and 4 git commands to generate.