Removed old unused patches
This commit is contained in:
parent
e51227f6cf
commit
6067dbf962
@ -1,86 +0,0 @@
|
|||||||
This patch should resolve some problems with handling of am/pm
|
|
||||||
in schedules as reported by bug #808.
|
|
||||||
|
|
||||||
According to the NIST (US National Institute of Standards and Technology),
|
|
||||||
12am and 12pm are ambiguous and can be defined to anything. However,
|
|
||||||
12:01am is the same as 00:01 and 12:01pm is the same as 12:01, so Bacula
|
|
||||||
defines 12am as 00:00 (midnight) and 12pm as 12:00 (noon). You can avoid
|
|
||||||
this abiguity (confusion) by using 24 hour time specifications (i.e. no
|
|
||||||
am/pm). This is the definition in Bacula version 2.0.3 and later.
|
|
||||||
|
|
||||||
Apply it to version 2.0.3 with:
|
|
||||||
|
|
||||||
cd <bacula-source>
|
|
||||||
patch -p0 <2.0.3-ampm.patch
|
|
||||||
make
|
|
||||||
...
|
|
||||||
make install
|
|
||||||
|
|
||||||
Index: src/dird/run_conf.c
|
|
||||||
===================================================================
|
|
||||||
--- src/dird/run_conf.c (revision 4349)
|
|
||||||
+++ src/dird/run_conf.c (working copy)
|
|
||||||
@@ -339,6 +339,7 @@
|
|
||||||
for ( ; token != T_EOL; (token = lex_get_token(lc, T_ALL))) {
|
|
||||||
int len;
|
|
||||||
bool pm = false;
|
|
||||||
+ bool am = false;
|
|
||||||
switch (token) {
|
|
||||||
case T_NUMBER:
|
|
||||||
state = s_mday;
|
|
||||||
@@ -434,6 +435,7 @@
|
|
||||||
if (!have_hour) {
|
|
||||||
clear_bits(0, 23, lrun.hour);
|
|
||||||
}
|
|
||||||
+// Dmsg1(000, "s_time=%s\n", lc->str);
|
|
||||||
p = strchr(lc->str, ':');
|
|
||||||
if (!p) {
|
|
||||||
scan_err0(lc, _("Time logic error.\n"));
|
|
||||||
@@ -441,20 +443,19 @@
|
|
||||||
}
|
|
||||||
*p++ = 0; /* separate two halves */
|
|
||||||
code = atoi(lc->str); /* pick up hour */
|
|
||||||
+ code2 = atoi(p); /* pick up minutes */
|
|
||||||
len = strlen(p);
|
|
||||||
- if (len > 2 && p[len-1] == 'm') {
|
|
||||||
- if (p[len-2] == 'a') {
|
|
||||||
- pm = false;
|
|
||||||
- } else if (p[len-2] == 'p') {
|
|
||||||
- pm = true;
|
|
||||||
- } else {
|
|
||||||
- scan_err0(lc, _("Bad time specification."));
|
|
||||||
- /* NOT REACHED */
|
|
||||||
- }
|
|
||||||
- } else {
|
|
||||||
- pm = false;
|
|
||||||
+ if (len >= 2) {
|
|
||||||
+ p += 2;
|
|
||||||
}
|
|
||||||
- code2 = atoi(p); /* pick up minutes */
|
|
||||||
+ if (strcasecmp(p, "pm") == 0) {
|
|
||||||
+ pm = true;
|
|
||||||
+ } else if (strcasecmp(p, "am") == 0) {
|
|
||||||
+ am = true;
|
|
||||||
+ } else if (len != 2) {
|
|
||||||
+ scan_err0(lc, _("Bad time specification."));
|
|
||||||
+ /* NOT REACHED */
|
|
||||||
+ }
|
|
||||||
/*
|
|
||||||
* Note, according to NIST, 12am and 12pm are ambiguous and
|
|
||||||
* can be defined to anything. However, 12:01am is the same
|
|
||||||
@@ -467,13 +468,14 @@
|
|
||||||
code += 12;
|
|
||||||
}
|
|
||||||
/* am */
|
|
||||||
- } else if (code == 12) {
|
|
||||||
+ } else if (am && code == 12) {
|
|
||||||
code -= 12;
|
|
||||||
}
|
|
||||||
if (code < 0 || code > 23 || code2 < 0 || code2 > 59) {
|
|
||||||
scan_err0(lc, _("Bad time specification."));
|
|
||||||
/* NOT REACHED */
|
|
||||||
}
|
|
||||||
+// Dmsg2(000, "hour=%d min=%d\n", code, code2);
|
|
||||||
set_bit(code, lrun.hour);
|
|
||||||
lrun.minute = code2;
|
|
||||||
have_hour = true;
|
|
@ -1,32 +0,0 @@
|
|||||||
|
|
||||||
This patch adds the MaxVolBytes to the output of a "show pools" command.
|
|
||||||
It fixes bug #814. Apply it to Bacula version 2.0.3 with:
|
|
||||||
|
|
||||||
cd <bacula-source>
|
|
||||||
patch -p0 <2.0.3-maxbyteslist.patch
|
|
||||||
make
|
|
||||||
...
|
|
||||||
make install
|
|
||||||
|
|
||||||
|
|
||||||
Index: src/dird/dird_conf.c
|
|
||||||
===================================================================
|
|
||||||
--- src/dird/dird_conf.c (revision 4349)
|
|
||||||
+++ src/dird/dird_conf.c (working copy)
|
|
||||||
@@ -844,10 +844,13 @@
|
|
||||||
NPRT(res->res_pool.label_format));
|
|
||||||
sendit(sock, _(" CleaningPrefix=%s LabelType=%d\n"),
|
|
||||||
NPRT(res->res_pool.cleaning_prefix), res->res_pool.LabelType);
|
|
||||||
- sendit(sock, _(" RecyleOldest=%d PurgeOldest=%d MaxVolJobs=%d MaxVolFiles=%d\n"),
|
|
||||||
+ sendit(sock, _(" RecyleOldest=%d PurgeOldest=%d\n"),
|
|
||||||
res->res_pool.recycle_oldest_volume,
|
|
||||||
- res->res_pool.purge_oldest_volume,
|
|
||||||
- res->res_pool.MaxVolJobs, res->res_pool.MaxVolFiles);
|
|
||||||
+ res->res_pool.purge_oldest_volume);
|
|
||||||
+ sendit(sock, _(" MaxVolJobs=%d MaxVolFiles=%d MaxVolBytes=%s\n"),
|
|
||||||
+ res->res_pool.MaxVolJobs,
|
|
||||||
+ res->res_pool.MaxVolFiles,
|
|
||||||
+ edit_uint64(res->res_pool.MaxVolFiles, ed1));
|
|
||||||
sendit(sock, _(" MigTime=%s MigHiBytes=%s MigLoBytes=%s\n"),
|
|
||||||
edit_utime(res->res_pool.MigrationTime, ed1, sizeof(ed1)),
|
|
||||||
edit_uint64(res->res_pool.MigrationHighBytes, ed2),
|
|
@ -1,137 +0,0 @@
|
|||||||
|
|
||||||
This patch should fix the logic error in checking for the MaxWaitTime of
|
|
||||||
a job in src/dird/job.c. It fixes bug #802.
|
|
||||||
|
|
||||||
Apply it to Bacula version 2.0.3 with:
|
|
||||||
|
|
||||||
cd <bacula-source>
|
|
||||||
patch -p0 <2.0.3-maxwaittime.patch
|
|
||||||
make
|
|
||||||
...
|
|
||||||
make install
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Index: src/dird/job.c
|
|
||||||
===================================================================
|
|
||||||
--- src/dird/job.c (revision 4349)
|
|
||||||
+++ src/dird/job.c (working copy)
|
|
||||||
@@ -481,7 +481,6 @@
|
|
||||||
static bool job_check_maxwaittime(JCR *control_jcr, JCR *jcr)
|
|
||||||
{
|
|
||||||
bool cancel = false;
|
|
||||||
- bool ok_to_cancel = false;
|
|
||||||
JOB *job = jcr->job;
|
|
||||||
|
|
||||||
if (job_canceled(jcr)) {
|
|
||||||
@@ -493,69 +492,18 @@
|
|
||||||
}
|
|
||||||
if (jcr->JobLevel == L_FULL && job->FullMaxWaitTime != 0 &&
|
|
||||||
(watchdog_time - jcr->start_time) >= job->FullMaxWaitTime) {
|
|
||||||
- ok_to_cancel = true;
|
|
||||||
+ cancel = true;
|
|
||||||
} else if (jcr->JobLevel == L_DIFFERENTIAL && job->DiffMaxWaitTime != 0 &&
|
|
||||||
(watchdog_time - jcr->start_time) >= job->DiffMaxWaitTime) {
|
|
||||||
- ok_to_cancel = true;
|
|
||||||
+ cancel = true;
|
|
||||||
} else if (jcr->JobLevel == L_INCREMENTAL && job->IncMaxWaitTime != 0 &&
|
|
||||||
(watchdog_time - jcr->start_time) >= job->IncMaxWaitTime) {
|
|
||||||
- ok_to_cancel = true;
|
|
||||||
+ cancel = true;
|
|
||||||
} else if (job->MaxWaitTime != 0 &&
|
|
||||||
(watchdog_time - jcr->start_time) >= job->MaxWaitTime) {
|
|
||||||
- ok_to_cancel = true;
|
|
||||||
- }
|
|
||||||
- if (!ok_to_cancel) {
|
|
||||||
- return false;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * I don't see the need for all this -- kes 17Dec06
|
|
||||||
- */
|
|
||||||
-#ifdef xxx
|
|
||||||
- Dmsg3(800, "Job %d (%s): MaxWaitTime of %d seconds exceeded, "
|
|
||||||
- "checking status\n",
|
|
||||||
- jcr->JobId, jcr->Job, job->MaxWaitTime);
|
|
||||||
- switch (jcr->JobStatus) {
|
|
||||||
- case JS_Created:
|
|
||||||
- case JS_Blocked:
|
|
||||||
- case JS_WaitFD:
|
|
||||||
- case JS_WaitSD:
|
|
||||||
- case JS_WaitStoreRes:
|
|
||||||
- case JS_WaitClientRes:
|
|
||||||
- case JS_WaitJobRes:
|
|
||||||
- case JS_WaitPriority:
|
|
||||||
- case JS_WaitMaxJobs:
|
|
||||||
- case JS_WaitStartTime:
|
|
||||||
cancel = true;
|
|
||||||
- Dmsg0(200, "JCR blocked in #1\n");
|
|
||||||
- break;
|
|
||||||
- case JS_Running:
|
|
||||||
- Dmsg0(800, "JCR running, checking SD status\n");
|
|
||||||
- switch (jcr->SDJobStatus) {
|
|
||||||
- case JS_WaitMount:
|
|
||||||
- case JS_WaitMedia:
|
|
||||||
- case JS_WaitFD:
|
|
||||||
- cancel = true;
|
|
||||||
- Dmsg0(800, "JCR blocked in #2\n");
|
|
||||||
- break;
|
|
||||||
- default:
|
|
||||||
- Dmsg0(800, "JCR not blocked in #2\n");
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
- break;
|
|
||||||
- case JS_Terminated:
|
|
||||||
- case JS_ErrorTerminated:
|
|
||||||
- case JS_Canceled:
|
|
||||||
- case JS_FatalError:
|
|
||||||
- Dmsg0(800, "JCR already dead in #3\n");
|
|
||||||
- break;
|
|
||||||
- default:
|
|
||||||
- Jmsg1(jcr, M_ERROR, 0, _("Unhandled job status code %d\n"),
|
|
||||||
- jcr->JobStatus);
|
|
||||||
}
|
|
||||||
- Dmsg3(800, "MaxWaitTime result: %scancel JCR %p (%s)\n",
|
|
||||||
- cancel ? "" : "do not ", jcr, jcr->Job);
|
|
||||||
-#endif
|
|
||||||
+
|
|
||||||
return cancel;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -574,36 +522,6 @@
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef xxx
|
|
||||||
- switch (jcr->JobStatus) {
|
|
||||||
- case JS_Created:
|
|
||||||
- case JS_Running:
|
|
||||||
- case JS_Blocked:
|
|
||||||
- case JS_WaitFD:
|
|
||||||
- case JS_WaitSD:
|
|
||||||
- case JS_WaitStoreRes:
|
|
||||||
- case JS_WaitClientRes:
|
|
||||||
- case JS_WaitJobRes:
|
|
||||||
- case JS_WaitPriority:
|
|
||||||
- case JS_WaitMaxJobs:
|
|
||||||
- case JS_WaitStartTime:
|
|
||||||
- case JS_Differences:
|
|
||||||
- cancel = true;
|
|
||||||
- break;
|
|
||||||
- case JS_Terminated:
|
|
||||||
- case JS_ErrorTerminated:
|
|
||||||
- case JS_Canceled:
|
|
||||||
- case JS_FatalError:
|
|
||||||
- cancel = false;
|
|
||||||
- break;
|
|
||||||
- default:
|
|
||||||
- Jmsg1(jcr, M_ERROR, 0, _("Unhandled job status code %d\n"),
|
|
||||||
- jcr->JobStatus);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- Dmsg3(200, "MaxRunTime result: %scancel JCR %p (%s)\n",
|
|
||||||
- cancel ? "" : "do not ", jcr, jcr->Job);
|
|
||||||
-#endif
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,88 +0,0 @@
|
|||||||
|
|
||||||
This patch should fix bug #812 where the DST time shift was
|
|
||||||
incorrectly handled. This patch was submitted by Martin Simmons.
|
|
||||||
Apply it to Bacula version 2.0.3 with:
|
|
||||||
|
|
||||||
cd <bacula-source>
|
|
||||||
patch -p0 <2.0.3-scheduler-next-hour.patch
|
|
||||||
make
|
|
||||||
...
|
|
||||||
make install
|
|
||||||
|
|
||||||
Index: src/dird/scheduler.c
|
|
||||||
===================================================================
|
|
||||||
--- src/dird/scheduler.c (revision 4445)
|
|
||||||
+++ src/dird/scheduler.c (working copy)
|
|
||||||
@@ -175,11 +175,11 @@
|
|
||||||
}
|
|
||||||
/* Recheck at least once per minute */
|
|
||||||
bmicrosleep((next_check_secs < twait)?next_check_secs:twait, 0);
|
|
||||||
- /* Attempt to handle clock shift from/to daylight savings time
|
|
||||||
+ /* Attempt to handle clock shift (but not daylight savings time changes)
|
|
||||||
* we allow a skew of 10 seconds before invalidating everything.
|
|
||||||
*/
|
|
||||||
now = time(NULL);
|
|
||||||
- if (now < prev+10 || now > (prev+next_check_secs+10)) {
|
|
||||||
+ if (now < prev-10 || now > (prev+next_check_secs+10)) {
|
|
||||||
schedules_invalidated = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -284,6 +284,9 @@
|
|
||||||
wom = mday / 7;
|
|
||||||
woy = tm_woy(now); /* get week of year */
|
|
||||||
|
|
||||||
+ Dmsg7(dbglvl, "now = %x: h=%d m=%d md=%d wd=%d wom=%d woy=%d\n",
|
|
||||||
+ now, hour, month, mday, wday, wom, woy);
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Compute values for next hour from now.
|
|
||||||
* We do this to be sure we don't miss a job while
|
|
||||||
@@ -299,6 +302,9 @@
|
|
||||||
nh_wom = nh_mday / 7;
|
|
||||||
nh_woy = tm_woy(now); /* get week of year */
|
|
||||||
|
|
||||||
+ Dmsg7(dbglvl, "nh = %x: h=%d m=%d md=%d wd=%d wom=%d woy=%d\n",
|
|
||||||
+ next_hour, nh_hour, nh_month, nh_mday, nh_wday, nh_wom, nh_woy);
|
|
||||||
+
|
|
||||||
/* Loop through all jobs */
|
|
||||||
LockRes();
|
|
||||||
foreach_res(job, R_JOB) {
|
|
||||||
@@ -351,24 +357,20 @@
|
|
||||||
|
|
||||||
Dmsg3(dbglvl, "run@%p: run_now=%d run_nh=%d\n", run, run_now, run_nh);
|
|
||||||
|
|
||||||
- /* find time (time_t) job is to be run */
|
|
||||||
- (void)localtime_r(&now, &tm); /* reset tm structure */
|
|
||||||
- tm.tm_min = run->minute; /* set run minute */
|
|
||||||
- tm.tm_sec = 0; /* zero secs */
|
|
||||||
- if (run_now) {
|
|
||||||
- runtime = mktime(&tm);
|
|
||||||
- add_job(job, run, now, runtime);
|
|
||||||
- }
|
|
||||||
- /* If job is to be run in the next hour schedule it */
|
|
||||||
- if (run_nh) {
|
|
||||||
- /* Set correct values */
|
|
||||||
- tm.tm_hour = nh_hour;
|
|
||||||
- tm.tm_mday = nh_mday + 1; /* fixup because we biased for tests above */
|
|
||||||
- tm.tm_mon = nh_month;
|
|
||||||
- tm.tm_year = nh_year;
|
|
||||||
- runtime = mktime(&tm);
|
|
||||||
- add_job(job, run, now, runtime);
|
|
||||||
- }
|
|
||||||
+ if (run_now || run_nh) {
|
|
||||||
+ /* find time (time_t) job is to be run */
|
|
||||||
+ (void)localtime_r(&now, &tm); /* reset tm structure */
|
|
||||||
+ tm.tm_min = run->minute; /* set run minute */
|
|
||||||
+ tm.tm_sec = 0; /* zero secs */
|
|
||||||
+ runtime = mktime(&tm);
|
|
||||||
+ if (run_now) {
|
|
||||||
+ add_job(job, run, now, runtime);
|
|
||||||
+ }
|
|
||||||
+ /* If job is to be run in the next hour schedule it */
|
|
||||||
+ if (run_nh) {
|
|
||||||
+ add_job(job, run, now, runtime + 3600);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UnlockRes();
|
|
@ -1,50 +0,0 @@
|
|||||||
|
|
||||||
This patch should fix the spurious connection drops that fail jobs
|
|
||||||
as reported in bug #888.
|
|
||||||
Apply it to version 2.0.3 (possibly earlier versions of 2.0) with:
|
|
||||||
|
|
||||||
cd <bacula-source>
|
|
||||||
patch -p0 <2.0.3-tls-disconnect.patch
|
|
||||||
make
|
|
||||||
...
|
|
||||||
make install
|
|
||||||
|
|
||||||
Index: src/lib/tls.c
|
|
||||||
===================================================================
|
|
||||||
--- src/lib/tls.c (revision 4668)
|
|
||||||
+++ src/lib/tls.c (working copy)
|
|
||||||
@@ -540,14 +540,6 @@
|
|
||||||
* The first time to initiate the shutdown handshake, and the second to
|
|
||||||
* receive the peer's reply.
|
|
||||||
*
|
|
||||||
- * However, it is valid to close the SSL connection after the initial
|
|
||||||
- * shutdown notification is sent to the peer, without waiting for the
|
|
||||||
- * peer's reply, as long as you do not plan to re-use that particular
|
|
||||||
- * SSL connection object.
|
|
||||||
- *
|
|
||||||
- * Because we do not re-use SSL connection objects, I do not bother
|
|
||||||
- * calling SSL_shutdown a second time.
|
|
||||||
- *
|
|
||||||
* In addition, if the underlying socket is blocking, SSL_shutdown()
|
|
||||||
* will not return until the current stage of the shutdown process has
|
|
||||||
* completed or an error has occured. By setting the socket blocking
|
|
||||||
@@ -560,6 +552,10 @@
|
|
||||||
flags = bnet_set_blocking(bsock);
|
|
||||||
|
|
||||||
err = SSL_shutdown(bsock->tls->openssl);
|
|
||||||
+ if (err == 0) {
|
|
||||||
+ /* Finish up the closing */
|
|
||||||
+ err = SSL_shutdown(bsock->tls->openssl);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
switch (SSL_get_error(bsock->tls->openssl, err)) {
|
|
||||||
case SSL_ERROR_NONE:
|
|
||||||
@@ -574,8 +570,6 @@
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* Restore saved flags */
|
|
||||||
- bnet_restore_blocking(bsock, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Does all the manual labor for tls_bsock_readn() and tls_bsock_writen() */
|
|
@ -1,117 +0,0 @@
|
|||||||
This patch should fix the problem reported in bug #803 where a Verify
|
|
||||||
job select the JobId to verified at schedule time rather than at runtime.
|
|
||||||
This makes it difficult or impossible to schedule a verify just after
|
|
||||||
a backup.
|
|
||||||
|
|
||||||
Apply this patch to Bacula version 2.0.3 (probably 2.0.2 as well) with:
|
|
||||||
|
|
||||||
cd <bacula-source>
|
|
||||||
patch -p0 <2.0.3-verify.patch
|
|
||||||
make
|
|
||||||
...
|
|
||||||
make install
|
|
||||||
|
|
||||||
Index: src/dird/verify.c
|
|
||||||
===================================================================
|
|
||||||
--- src/dird/verify.c (revision 4353)
|
|
||||||
+++ src/dird/verify.c (working copy)
|
|
||||||
@@ -40,6 +25,21 @@
|
|
||||||
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
|
|
||||||
Switzerland, email:ftf@fsfeurope.org.
|
|
||||||
*/
|
|
||||||
+/*
|
|
||||||
+ *
|
|
||||||
+ * Bacula Director -- verify.c -- responsible for running file verification
|
|
||||||
+ *
|
|
||||||
+ * Kern Sibbald, October MM
|
|
||||||
+ *
|
|
||||||
+ * Basic tasks done here:
|
|
||||||
+ * Open DB
|
|
||||||
+ * Open connection with File daemon and pass him commands
|
|
||||||
+ * to do the verify.
|
|
||||||
+ * When the File daemon sends the attributes, compare them to
|
|
||||||
+ * what is in the DB.
|
|
||||||
+ *
|
|
||||||
+ * Version $Id$
|
|
||||||
+ */
|
|
||||||
|
|
||||||
|
|
||||||
#include "bacula.h"
|
|
||||||
@@ -66,6 +66,22 @@
|
|
||||||
*/
|
|
||||||
bool do_verify_init(JCR *jcr)
|
|
||||||
{
|
|
||||||
+ return true;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Do a verification of the specified files against the Catlaog
|
|
||||||
+ *
|
|
||||||
+ * Returns: false on failure
|
|
||||||
+ * true on success
|
|
||||||
+ */
|
|
||||||
+bool do_verify(JCR *jcr)
|
|
||||||
+{
|
|
||||||
+ const char *level;
|
|
||||||
+ BSOCK *fd;
|
|
||||||
+ int stat;
|
|
||||||
+ char ed1[100];
|
|
||||||
JOB_DBR jr;
|
|
||||||
JobId_t verify_jobid = 0;
|
|
||||||
const char *Name;
|
|
||||||
@@ -74,12 +90,16 @@
|
|
||||||
|
|
||||||
memset(&jcr->previous_jr, 0, sizeof(jcr->previous_jr));
|
|
||||||
|
|
||||||
- Dmsg1(9, "bdird: created client %s record\n", jcr->client->hdr.name);
|
|
||||||
-
|
|
||||||
/*
|
|
||||||
- * Find JobId of last job that ran. E.g.
|
|
||||||
- * for VERIFY_CATALOG we want the JobId of the last INIT.
|
|
||||||
- * for VERIFY_VOLUME_TO_CATALOG, we want the JobId of the
|
|
||||||
+ * Find JobId of last job that ran. Note, we do this when
|
|
||||||
+ * the job actually starts running, not at schedule time,
|
|
||||||
+ * so that we find the last job that terminated before
|
|
||||||
+ * this job runs rather than before it is scheduled. This
|
|
||||||
+ * permits scheduling a Backup and Verify at the same time,
|
|
||||||
+ * but with the Verify at a lower priority.
|
|
||||||
+ *
|
|
||||||
+ * For VERIFY_CATALOG we want the JobId of the last INIT.
|
|
||||||
+ * For VERIFY_VOLUME_TO_CATALOG, we want the JobId of the
|
|
||||||
* last backup Job.
|
|
||||||
*/
|
|
||||||
if (jcr->JobLevel == L_VERIFY_CATALOG ||
|
|
||||||
@@ -89,7 +109,7 @@
|
|
||||||
if (jcr->verify_job &&
|
|
||||||
(jcr->JobLevel == L_VERIFY_VOLUME_TO_CATALOG ||
|
|
||||||
jcr->JobLevel == L_VERIFY_DISK_TO_CATALOG)) {
|
|
||||||
- Name = jcr->verify_job->hdr.name;
|
|
||||||
+ Name = jcr->verify_job->name();
|
|
||||||
} else {
|
|
||||||
Name = NULL;
|
|
||||||
}
|
|
||||||
@@ -149,23 +169,7 @@
|
|
||||||
jcr->fileset = jcr->verify_job->fileset;
|
|
||||||
}
|
|
||||||
Dmsg2(100, "ClientId=%u JobLevel=%c\n", jcr->previous_jr.ClientId, jcr->JobLevel);
|
|
||||||
- return true;
|
|
||||||
-}
|
|
||||||
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Do a verification of the specified files against the Catlaog
|
|
||||||
- *
|
|
||||||
- * Returns: false on failure
|
|
||||||
- * true on success
|
|
||||||
- */
|
|
||||||
-bool do_verify(JCR *jcr)
|
|
||||||
-{
|
|
||||||
- const char *level;
|
|
||||||
- BSOCK *fd;
|
|
||||||
- int stat;
|
|
||||||
- char ed1[100];
|
|
||||||
-
|
|
||||||
if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) {
|
|
||||||
Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
|
|
||||||
return false;
|
|
@ -1,24 +0,0 @@
|
|||||||
|
|
||||||
This patch fixes a case of orphaned jobs (and possible deadlock)
|
|
||||||
during pruning.
|
|
||||||
Apply it to Bacula 2.4.3 (possibly earlier versions) with:
|
|
||||||
|
|
||||||
cd <bacula-source>
|
|
||||||
patch -p0 <2.4.3-orphaned-jobs.patch
|
|
||||||
./configure <your-options>
|
|
||||||
make
|
|
||||||
...
|
|
||||||
make install
|
|
||||||
|
|
||||||
Index: src/dird/ua_prune.c
|
|
||||||
===================================================================
|
|
||||||
--- src/dird/ua_prune.c (revision 7949)
|
|
||||||
+++ src/dird/ua_prune.c (working copy)
|
|
||||||
@@ -468,6 +468,7 @@
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ endeach_jcr(jcr);
|
|
||||||
if (skip) {
|
|
||||||
continue;
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
--- autoconf/configure.in.orig 2008-12-15 14:45:18.000000000 -0600
|
|
||||||
+++ autoconf/configure.in 2008-12-15 14:45:19.000000000 -0600
|
|
||||||
@@ -726 +726 @@
|
|
||||||
- for ver in python2.2 python2.3 python2.4 python2.5; do
|
|
||||||
+ for ver in python2.2 python2.3 python2.4 python2.5 python2.6; do
|
|
||||||
--- configure.orig 2008-12-15 14:46:32.000000000 -0600
|
|
||||||
+++ configure 2008-12-15 14:46:32.000000000 -0600
|
|
||||||
@@ -15624 +15624 @@
|
|
||||||
- for ver in python2.2 python2.3 python2.4 python2.5; do
|
|
||||||
+ for ver in python2.2 python2.3 python2.4 python2.5 python2.6; do
|
|
@ -1,41 +0,0 @@
|
|||||||
diff -up bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c.openssl bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c
|
|
||||||
--- bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c.openssl 2008-11-06 20:10:08.000000000 +0100
|
|
||||||
+++ bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c 2009-08-22 12:48:20.000000000 +0200
|
|
||||||
@@ -309,7 +309,11 @@ typedef struct PEM_CB_Context {
|
|
||||||
*/
|
|
||||||
static ASN1_OCTET_STRING *openssl_cert_keyid(X509 *cert) {
|
|
||||||
X509_EXTENSION *ext;
|
|
||||||
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
|
|
||||||
X509V3_EXT_METHOD *method;
|
|
||||||
+#else
|
|
||||||
+ const X509V3_EXT_METHOD *method;
|
|
||||||
+#endif
|
|
||||||
ASN1_OCTET_STRING *keyid;
|
|
||||||
int i;
|
|
||||||
#if (OPENSSL_VERSION_NUMBER >= 0x0090800FL)
|
|
||||||
@@ -973,6 +977,10 @@ void crypto_sign_free(SIGNATURE *sig)
|
|
||||||
free (sig);
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
|
||||||
+#define EVP_PKEY_decrypt EVP_PKEY_decrypt_old
|
|
||||||
+#define EVP_PKEY_encrypt EVP_PKEY_encrypt_old
|
|
||||||
+#endif
|
|
||||||
/*
|
|
||||||
* Create a new encryption session.
|
|
||||||
* Returns: A pointer to a CRYPTO_SESSION object on success.
|
|
||||||
diff -up bacula-3.0.2/bacula-3.0.2/src/lib/tls.c.openssl bacula-3.0.2/bacula-3.0.2/src/lib/tls.c
|
|
||||||
--- bacula-3.0.2/bacula-3.0.2/src/lib/tls.c.openssl 2008-11-22 19:36:12.000000000 +0100
|
|
||||||
+++ bacula-3.0.2/bacula-3.0.2/src/lib/tls.c 2009-08-22 15:24:30.000000000 +0200
|
|
||||||
@@ -315,7 +315,11 @@ bool tls_postconnect_verify_host(JCR *jc
|
|
||||||
extname = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext)));
|
|
||||||
|
|
||||||
if (strcmp(extname, "subjectAltName") == 0) {
|
|
||||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
|
|
||||||
+ const X509V3_EXT_METHOD *method;
|
|
||||||
+#else
|
|
||||||
X509V3_EXT_METHOD *method;
|
|
||||||
+#endif
|
|
||||||
STACK_OF(CONF_VALUE) *val;
|
|
||||||
CONF_VALUE *nval;
|
|
||||||
void *extstr = NULL;
|
|
Loading…
Reference in New Issue
Block a user