From d642aa10a1a0ffce6e3ed2045808984afca8159f Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 2 Dec 2007 14:19:28 +0000 Subject: [PATCH] This patch prevents the 'status dir' command from trying to use a scratch volume and possibly moving it from one pool to another. This patch fixes bug #1019. + move old patches into subdirectory git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6010 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/patches/2.2.6-scratch.patch | 29 +++++++++++++++++++ .../{ => 2.2.x}/2.2.4-ansi-label.patch | 0 .../{ => 2.2.x}/2.2.4-lost-block.patch | 0 .../{ => 2.2.x}/2.2.4-parse-command.patch | 0 .../{ => 2.2.x}/2.2.4-poll-mount.patch | 0 .../patches/{ => 2.2.x}/2.2.4-replace.patch | 0 .../patches/{ => 2.2.x}/2.2.4-restore.patch | 0 .../{ => 2.2.x}/2.2.4-sd-auth-fail.patch | 0 bacula/patches/{ => 2.2.x}/2.2.4-sql.patch | 0 bacula/patches/{ => 2.2.x}/2.2.4-verify.patch | 0 bacula/patches/{ => 2.2.x}/2.2.5-deamon.patch | 0 bacula/patches/{ => 2.2.x}/2.2.5-hb.patch | 0 .../{ => 2.2.x}/2.2.5-lastwritten.patch | 0 .../patches/{ => 2.2.x}/2.2.5-nextvol.patch | 0 .../{ => 2.2.x}/2.2.5-postgresql-errors.patch | 0 .../{ => 2.2.x}/2.2.5-tray-monitor.patch | 0 .../{ => 2.2.x}/2.2.5-verify-loop.patch | 0 bacula/src/dird/next_vol.c | 2 +- bacula/technotes-2.3 | 4 +++ 19 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 bacula/patches/2.2.6-scratch.patch rename bacula/patches/{ => 2.2.x}/2.2.4-ansi-label.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.4-lost-block.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.4-parse-command.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.4-poll-mount.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.4-replace.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.4-restore.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.4-sd-auth-fail.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.4-sql.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.4-verify.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.5-deamon.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.5-hb.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.5-lastwritten.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.5-nextvol.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.5-postgresql-errors.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.5-tray-monitor.patch (100%) rename bacula/patches/{ => 2.2.x}/2.2.5-verify-loop.patch (100%) diff --git a/bacula/patches/2.2.6-scratch.patch b/bacula/patches/2.2.6-scratch.patch new file mode 100644 index 0000000000..d6da1cd01e --- /dev/null +++ b/bacula/patches/2.2.6-scratch.patch @@ -0,0 +1,29 @@ + + This patch prevents the "status dir" command from trying to use a scratch + volume and possibly moving it from one pool to another. This patch fixes + bug #1019. + + Apply the patch to 2.2.6 (and possibly any 2.2.x version with): + + cd + patch -p0 <2.2.6-scratch.patch + ./configure + make + ... + make install + + + +Index: src/dird/next_vol.c +=================================================================== +--- src/dird/next_vol.c (revision 5999) ++++ src/dird/next_vol.c (working copy) +@@ -97,7 +97,7 @@ + prune_volumes(jcr, InChanger, mr); + } + ok = recycle_oldest_purged_volume(jcr, InChanger, mr); +- if (!ok) { ++ if (!ok && create) { + Dmsg4(050, "after prune volumes_vol ok=%d index=%d InChanger=%d Vstat=%s\n", + ok, index, InChanger, mr->VolStatus); + /* diff --git a/bacula/patches/2.2.4-ansi-label.patch b/bacula/patches/2.2.x/2.2.4-ansi-label.patch similarity index 100% rename from bacula/patches/2.2.4-ansi-label.patch rename to bacula/patches/2.2.x/2.2.4-ansi-label.patch diff --git a/bacula/patches/2.2.4-lost-block.patch b/bacula/patches/2.2.x/2.2.4-lost-block.patch similarity index 100% rename from bacula/patches/2.2.4-lost-block.patch rename to bacula/patches/2.2.x/2.2.4-lost-block.patch diff --git a/bacula/patches/2.2.4-parse-command.patch b/bacula/patches/2.2.x/2.2.4-parse-command.patch similarity index 100% rename from bacula/patches/2.2.4-parse-command.patch rename to bacula/patches/2.2.x/2.2.4-parse-command.patch diff --git a/bacula/patches/2.2.4-poll-mount.patch b/bacula/patches/2.2.x/2.2.4-poll-mount.patch similarity index 100% rename from bacula/patches/2.2.4-poll-mount.patch rename to bacula/patches/2.2.x/2.2.4-poll-mount.patch diff --git a/bacula/patches/2.2.4-replace.patch b/bacula/patches/2.2.x/2.2.4-replace.patch similarity index 100% rename from bacula/patches/2.2.4-replace.patch rename to bacula/patches/2.2.x/2.2.4-replace.patch diff --git a/bacula/patches/2.2.4-restore.patch b/bacula/patches/2.2.x/2.2.4-restore.patch similarity index 100% rename from bacula/patches/2.2.4-restore.patch rename to bacula/patches/2.2.x/2.2.4-restore.patch diff --git a/bacula/patches/2.2.4-sd-auth-fail.patch b/bacula/patches/2.2.x/2.2.4-sd-auth-fail.patch similarity index 100% rename from bacula/patches/2.2.4-sd-auth-fail.patch rename to bacula/patches/2.2.x/2.2.4-sd-auth-fail.patch diff --git a/bacula/patches/2.2.4-sql.patch b/bacula/patches/2.2.x/2.2.4-sql.patch similarity index 100% rename from bacula/patches/2.2.4-sql.patch rename to bacula/patches/2.2.x/2.2.4-sql.patch diff --git a/bacula/patches/2.2.4-verify.patch b/bacula/patches/2.2.x/2.2.4-verify.patch similarity index 100% rename from bacula/patches/2.2.4-verify.patch rename to bacula/patches/2.2.x/2.2.4-verify.patch diff --git a/bacula/patches/2.2.5-deamon.patch b/bacula/patches/2.2.x/2.2.5-deamon.patch similarity index 100% rename from bacula/patches/2.2.5-deamon.patch rename to bacula/patches/2.2.x/2.2.5-deamon.patch diff --git a/bacula/patches/2.2.5-hb.patch b/bacula/patches/2.2.x/2.2.5-hb.patch similarity index 100% rename from bacula/patches/2.2.5-hb.patch rename to bacula/patches/2.2.x/2.2.5-hb.patch diff --git a/bacula/patches/2.2.5-lastwritten.patch b/bacula/patches/2.2.x/2.2.5-lastwritten.patch similarity index 100% rename from bacula/patches/2.2.5-lastwritten.patch rename to bacula/patches/2.2.x/2.2.5-lastwritten.patch diff --git a/bacula/patches/2.2.5-nextvol.patch b/bacula/patches/2.2.x/2.2.5-nextvol.patch similarity index 100% rename from bacula/patches/2.2.5-nextvol.patch rename to bacula/patches/2.2.x/2.2.5-nextvol.patch diff --git a/bacula/patches/2.2.5-postgresql-errors.patch b/bacula/patches/2.2.x/2.2.5-postgresql-errors.patch similarity index 100% rename from bacula/patches/2.2.5-postgresql-errors.patch rename to bacula/patches/2.2.x/2.2.5-postgresql-errors.patch diff --git a/bacula/patches/2.2.5-tray-monitor.patch b/bacula/patches/2.2.x/2.2.5-tray-monitor.patch similarity index 100% rename from bacula/patches/2.2.5-tray-monitor.patch rename to bacula/patches/2.2.x/2.2.5-tray-monitor.patch diff --git a/bacula/patches/2.2.5-verify-loop.patch b/bacula/patches/2.2.x/2.2.5-verify-loop.patch similarity index 100% rename from bacula/patches/2.2.5-verify-loop.patch rename to bacula/patches/2.2.x/2.2.5-verify-loop.patch diff --git a/bacula/src/dird/next_vol.c b/bacula/src/dird/next_vol.c index 6aecf5331d..29a92541b6 100644 --- a/bacula/src/dird/next_vol.c +++ b/bacula/src/dird/next_vol.c @@ -97,7 +97,7 @@ int find_next_volume_for_append(JCR *jcr, MEDIA_DBR *mr, int index, prune_volumes(jcr, InChanger, mr); } ok = recycle_oldest_purged_volume(jcr, InChanger, mr); - if (!ok) { + if (!ok && create) { Dmsg4(050, "after prune volumes_vol ok=%d index=%d InChanger=%d Vstat=%s\n", ok, index, InChanger, mr->VolStatus); /* diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index 5ffc7b6eab..7bae8283cc 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -1,6 +1,10 @@ Technical notes on version 2.3 General: +02Dec07 +kes This patch prevents the 'status dir' command from trying to use a scratch + volume and possibly moving it from one pool to another. This patch fixes + bug #1019. 01Dec07 kes Add new include to cats/postgresql.c suggested by Marc Cousins so that it compiles correctly with pgre version 8.3. -- 2.39.5