From 54ec3a911798039d20eb82c9e68319866259d6b4 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 20 Mar 2009 20:47:03 +0000 Subject: [PATCH] Update patches git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8565 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 6 +++ bacula/patches/2.4.4-jobname-edit.patch | 26 ++++++++++++ bacula/patches/2.4.4-time_t_64bit.patch | 55 +++++++++++++++++++++++++ bacula/src/dird/job.c | 2 +- bacula/technotes-2.5 | 3 ++ 5 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 bacula/patches/2.4.4-jobname-edit.patch create mode 100644 bacula/patches/2.4.4-time_t_64bit.patch diff --git a/bacula/kernstodo b/bacula/kernstodo index 045169612d..b7ada73079 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -72,6 +72,7 @@ Professional Needs: Priority: ================ + - Why no error message if restore has no permission on the where directory? - Possibly allow manual "purge" to purge a Volume that has not @@ -141,6 +142,11 @@ Priority: its faster to enter the specified directory - Make tree walk routines like cd, ls, ... more user friendly by handling spaces better. +- When doing a restore, if the user does an "update slots" + after the job started in order to add a restore volume, the + values prior to the update slots will be put into the catalog. + Must retrieve catalog record merge it then write it back at the + end of the restore job, if we want to do this right. === rate design jcr->last_rate jcr->last_runtime diff --git a/bacula/patches/2.4.4-jobname-edit.patch b/bacula/patches/2.4.4-jobname-edit.patch new file mode 100644 index 0000000000..240519f7aa --- /dev/null +++ b/bacula/patches/2.4.4-jobname-edit.patch @@ -0,0 +1,26 @@ + + This patch fixes bug #1255 'variable %n changed' + + Apply it to version 2.4.4 with: + + cd + patch -p0 <2.4.4-jobname-edit.patch + ./configure + 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/patches/2.4.4-time_t_64bit.patch b/bacula/patches/2.4.4-time_t_64bit.patch new file mode 100644 index 0000000000..46dd440a11 --- /dev/null +++ b/bacula/patches/2.4.4-time_t_64bit.patch @@ -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 + patch -p0 <2.4.4-time_t_64bit.patch + ./configure + 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/src/dird/job.c b/bacula/src/dird/job.c index e8bf2a2aff..4329a76f2e 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -916,7 +916,7 @@ void create_unique_job_name(JCR *jcr, const char *base_name) 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/technotes-2.5 b/bacula/technotes-2.5 index 9fd223c165..f820150d3f 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -50,6 +50,9 @@ Code to be completed before 3.0.0 is released: General: 20Mar09 +kes Convert seconds.seq separator into seconds_seq so that Bacula + editing of the Job name from the full Job name works. This fixes + bug #1255 'variable %n changed'. kes Second half of proposed fix for bug #1227 that does not mark virtual volumes for unloading. kes Proposed fix for bug #1227 Job and labeling new tape. -- 2.39.5