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

« back to all changes in this revision

Viewing changes to patches/2.4.3-unique-inchanger.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 fix the bug #1175 about Slot field
 
3
 that is not reset after update slots.
 
4
 Should work for 2.4.3 with 2.4.3-update-slots.patch
 
5
 
 
6
 cd <bacula-source>
 
7
 patch -p0 <2.4.3-unique-inchanger.patch
 
8
 ./configure <your-options>
 
9
 make
 
10
 ...
 
11
 make install
 
12
 
 
13
Index: src/cats/sql_update.c
 
14
===================================================================
 
15
--- src/cats/sql_update.c       (révision 8063)
 
16
+++ src/cats/sql_update.c       (copie de travail)
 
17
@@ -448,19 +448,19 @@
 
18
    if (mr->InChanger != 0 && mr->Slot != 0 && mr->StorageId != 0) {
 
19
 
 
20
        if (mr->MediaId != 0) {
 
21
-          Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE "
 
22
+          Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE "
 
23
                "Slot=%d AND StorageId=%s AND MediaId!=%s",
 
24
                mr->Slot,
 
25
                edit_int64(mr->StorageId, ed1), edit_int64(mr->MediaId, ed2));
 
26
 
 
27
        } else if (mr->VolumeName[0]) { /* We have a volume name */
 
28
-          Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE "
 
29
+          Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE "
 
30
                "Slot=%d AND StorageId=%s AND VolumeName!='%s'",
 
31
                mr->Slot,
 
32
                edit_int64(mr->StorageId, ed1), mr->VolumeName);
 
33
 
 
34
        } else {  /* used by ua_label to reset all volume with this slot */
 
35
-          Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE "
 
36
+          Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE "
 
37
                "Slot=%d AND StorageId=%s",
 
38
                mr->Slot,
 
39
                edit_int64(mr->StorageId, ed1), mr->VolumeName);