~ubuntu-branches/ubuntu/maverick/bacula/maverick

« back to all changes in this revision

Viewing changes to patches/2.4.3-migrate.patch

  • Committer: Bazaar Package Importer
  • Author(s): Ante Karamatic
  • Date: 2009-01-10 04:57:41 UTC
  • mfrom: (3.1.4 lenny)
  • Revision ID: james.westby@ubuntu.com-20090110045741-s6k86vdrivghtfyd
Tags: 2.4.4-1ubuntu1
* Upload fixes LP #269251, LP: #308903 and LP: #293515
* debian/rules:
  - added bat_icon.png and bat.desktop for bacula-console-qt (LP: #314746)
  - added bacula-tray-monitor.xpm icon, fix Exec path in .desktop
* debian/bacula-traymonitor.install
  - remove bacula-tray-monitor.xpm, add bacula-tray-monitor.desktop
* Merge from debian unstable, remaining changes:
  * Store sd|fd|director passwords in debconf (LP: #222558)
    - added debian/bacula-common.templates
    - modified debian/bacula-common.postinst:
      + generate random passwords and store them in debconf
    - modified debian/bacula-[sd|fd|director-mysql|director-pgsql].postinst
      + read and set passwords from debconf
  * Daemons listen on all interfaces (LP: #286643)
  * Start daemons on installation
  * Build with generic XXX_*_XXX username, password and database name
    and replace it with dbconfig's settings in postinstall scripts
  * Drop mt-st to suggests. So that bacula goes back to main. (LP: #286528)
  * debian/rules: Disable fortify source since it was causing
    bacula-director to segfault.
  * debian/control:
    - Added libdbi-perl and libdb-mysql-perl to depends for
      bacula-director-mysql
      due to new postinst configuration.
    - Cleaned up bacula-director-pgsql dependenices and recommends.
    - Made mysql the default director to install bacula-director-{mysql|pgsql}
      added database handling to postinstall scripts and templates, modifiied
      postinstall script's sed expressions.
    - Removed libwgtk-2.6-dev as a build dependency; as a result
      bacula-console-wx isn't built anymore.
    - Install gawk if not installed. (LP: #207527)
  * debian/make_catalog_backup_awk.[mysql|pgsql|sqlite3|sqlite]:
    - New scripts for catalog backup. (CVE-2007-5626)
  * debian/bacula-console-wx:
    - Dropped since we are not building them anymore.
  * debian/bacula-director-common.bacula-director.init,
    debian/bacula-fd.init, debian/bacula-sd.init
    - Made more LSB specific.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 This patch should prevent migration jobs from attempting to migrate
 
3
 jobs that failed.  Apply it to Bacula 2.4.3 (possibly earlier versions)
 
4
 with:
 
5
 
 
6
 cd <bacula-source>
 
7
 patch -p0 <2.4.3-migrate.patch
 
8
 ./configure <your-options>
 
9
 make
 
10
 ...
 
11
 make install
 
12
 
 
13
 
 
14
Index: src/dird/migrate.c
 
15
===================================================================
 
16
--- src/dird/migrate.c  (revision 7757)
 
17
+++ src/dird/migrate.c  (working copy)
 
18
@@ -377,7 +377,7 @@
 
19
     * to avoid two threads from using the BSOCK structure at
 
20
     * the same time.
 
21
     */
 
22
-   if (!bnet_fsend(sd, "run")) {
 
23
+   if (!sd->fsend("run")) {
 
24
       return false;
 
25
    }
 
26
 
 
27
@@ -520,6 +520,7 @@
 
28
    "SELECT DISTINCT Job.JobId,Job.StartTime FROM Job,Pool,Client"
 
29
    " WHERE Client.Name='%s' AND Pool.Name='%s' AND Job.PoolId=Pool.PoolId"
 
30
    " AND Job.ClientId=Client.ClientId AND Job.Type='B'"
 
31
+   " AND Job.JobStatus = 'T'"
 
32
    " ORDER by Job.StartTime";
 
33
 
 
34
 /* Get Volume names in Pool */
 
35
@@ -533,9 +534,9 @@
 
36
    "SELECT DISTINCT Job.JobId,Job.StartTime FROM Media,JobMedia,Job"
 
37
    " WHERE Media.VolumeName='%s' AND Media.MediaId=JobMedia.MediaId"
 
38
    " AND JobMedia.JobId=Job.JobId AND Job.Type='B'"
 
39
+   " AND Job.JobStatus = 'T' AND Media.Enabled=1"
 
40
    " ORDER by Job.StartTime";
 
41
 
 
42
-
 
43
 const char *sql_smallest_vol = 
 
44
    "SELECT Media.MediaId FROM Media,Pool,JobMedia WHERE"
 
45
    " Media.MediaId in (SELECT DISTINCT MediaId from JobMedia) AND"
 
46
@@ -570,7 +571,6 @@
 
47
 const char *sql_job_bytes =
 
48
    "SELECT SUM(JobBytes) FROM Job WHERE JobId IN (%s)";
 
49
 
 
50
-
 
51
 /* Get Media Ids in Pool */
 
52
 const char *sql_mediaids =
 
53
    "SELECT MediaId FROM Media,Pool WHERE"