1 |
wschlich 08/04/29 10:00:50 |
2 |
|
3 |
Added: 2.2.8-bacula-conf.patch 2.2.8-jobmedia.patch |
4 |
2.2.8-strip-path.patch 2.2.8-pool-source.patch |
5 |
2.2.8-jobmedia-fix.patch |
6 |
Log: |
7 |
incorporate upstream release patches |
8 |
(Portage version: 2.1.5_rc4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 app-backup/bacula/files/2.2.8/2.2.8-bacula-conf.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-backup/bacula/files/2.2.8/2.2.8-bacula-conf.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-backup/bacula/files/2.2.8/2.2.8-bacula-conf.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: 2.2.8-bacula-conf.patch |
17 |
=================================================================== |
18 |
|
19 |
This patch automatically adds the Bacula database and user name to |
20 |
the default make_catalog_backup Run script call line in the bacula-dir.conf |
21 |
file. |
22 |
|
23 |
Apply it to version 2.2.8 or earlier with: |
24 |
|
25 |
cd <bacula-source> |
26 |
patch -p0 <2.2.8-bacula-conf.patch |
27 |
./configure <your-options> |
28 |
make |
29 |
... |
30 |
make install |
31 |
|
32 |
|
33 |
Index: src/dird/bacula-dir.conf.in |
34 |
=================================================================== |
35 |
--- src/dird/bacula-dir.conf.in (revision 6327) |
36 |
+++ src/dird/bacula-dir.conf.in (working copy) |
37 |
@@ -61,7 +61,11 @@ |
38 |
FileSet="Catalog" |
39 |
Schedule = "WeeklyCycleAfterBackup" |
40 |
# This creates an ASCII copy of the catalog |
41 |
- RunBeforeJob = "@scriptdir@/make_catalog_backup bacula bacula" |
42 |
+ # WARNING!!! Passing the password via the command line is insecure. |
43 |
+ # see comments in make_catalog_backup for details. |
44 |
+ # Arguments to make_catalog_backup are: |
45 |
+ # make_catalog_backup <database-name> <user-name> <password> <host> |
46 |
+ RunBeforeJob = "@scriptdir@/make_catalog_backup @db_name@ @db_user@" |
47 |
# This deletes the copy of the catalog |
48 |
RunAfterJob = "@scriptdir@/delete_catalog_backup" |
49 |
Write Bootstrap = "@working_dir@/BackupCatalog.bsr" |
50 |
|
51 |
|
52 |
|
53 |
1.1 app-backup/bacula/files/2.2.8/2.2.8-jobmedia.patch |
54 |
|
55 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-backup/bacula/files/2.2.8/2.2.8-jobmedia.patch?rev=1.1&view=markup |
56 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-backup/bacula/files/2.2.8/2.2.8-jobmedia.patch?rev=1.1&content-type=text/plain |
57 |
|
58 |
Index: 2.2.8-jobmedia.patch |
59 |
=================================================================== |
60 |
|
61 |
This patch fixes a migration bug that always has a zero index entry |
62 |
(JobMedia record) as the first entry. This causes Bacula to search |
63 |
for the first record during a restore rather than seek directly to |
64 |
it. |
65 |
|
66 |
You have to apply 2.2.8-jobmedia-fix.patch too. |
67 |
|
68 |
Apply this patch to Bacula 2.2.8 (and possibly any prior 2.2.x version) with: |
69 |
|
70 |
cd <bacula-source> |
71 |
patch -p0 <2.2.8-jobmedia.patch |
72 |
patch -p0 <2.2.8-jobmedia-fix.patch |
73 |
./configure <your-options> |
74 |
make |
75 |
... |
76 |
make install |
77 |
|
78 |
|
79 |
Index: src/stored/device.c |
80 |
=================================================================== |
81 |
--- src/stored/device.c (revision 6391) |
82 |
+++ src/stored/device.c (working copy) |
83 |
@@ -200,6 +200,19 @@ |
84 |
return ok; /* device locked */ |
85 |
} |
86 |
|
87 |
+void set_start_vol_position(DCR *dcr) |
88 |
+{ |
89 |
+ DEVICE *dev = dcr->dev; |
90 |
+ /* Set new start position */ |
91 |
+ if (dev->is_tape()) { |
92 |
+ dcr->StartBlock = dev->block_num; |
93 |
+ dcr->StartFile = dev->file; |
94 |
+ } else { |
95 |
+ dcr->StartBlock = (uint32_t)dev->file_addr; |
96 |
+ dcr->StartFile = (uint32_t)(dev->file_addr >> 32); |
97 |
+ } |
98 |
+} |
99 |
+ |
100 |
/* |
101 |
* We have a new Volume mounted, so reset the Volume parameters |
102 |
* concerning this job. The global changes were made earlier |
103 |
@@ -208,24 +221,11 @@ |
104 |
void set_new_volume_parameters(DCR *dcr) |
105 |
{ |
106 |
JCR *jcr = dcr->jcr; |
107 |
- DEVICE *dev = dcr->dev; |
108 |
if (dcr->NewVol && !dir_get_volume_info(dcr, GET_VOL_INFO_FOR_WRITE)) { |
109 |
Jmsg1(jcr, M_ERROR, 0, "%s", jcr->errmsg); |
110 |
} |
111 |
- /* Set new start/end positions */ |
112 |
- if (dev->is_tape()) { |
113 |
- dcr->StartBlock = dev->block_num; |
114 |
- dcr->StartFile = dev->file; |
115 |
- } else { |
116 |
- dcr->StartBlock = (uint32_t)dev->file_addr; |
117 |
- dcr->StartFile = (uint32_t)(dev->file_addr >> 32); |
118 |
- } |
119 |
- /* Reset indicies */ |
120 |
- dcr->VolFirstIndex = 0; |
121 |
- dcr->VolLastIndex = 0; |
122 |
+ set_new_file_parameters(dcr); |
123 |
jcr->NumWriteVolumes++; |
124 |
- dcr->NewVol = false; |
125 |
- dcr->WroteVol = false; |
126 |
} |
127 |
|
128 |
/* |
129 |
@@ -235,16 +235,8 @@ |
130 |
*/ |
131 |
void set_new_file_parameters(DCR *dcr) |
132 |
{ |
133 |
- DEVICE *dev = dcr->dev; |
134 |
+ set_start_vol_position(dcr); |
135 |
|
136 |
- /* Set new start/end positions */ |
137 |
- if (dev->is_tape()) { |
138 |
- dcr->StartBlock = dev->block_num; |
139 |
- dcr->StartFile = dev->file; |
140 |
- } else { |
141 |
- dcr->StartBlock = (uint32_t)dev->file_addr; |
142 |
- dcr->StartFile = (uint32_t)(dev->file_addr >> 32); |
143 |
- } |
144 |
/* Reset indicies */ |
145 |
dcr->VolFirstIndex = 0; |
146 |
dcr->VolLastIndex = 0; |
147 |
Index: src/stored/mac.c |
148 |
=================================================================== |
149 |
--- src/stored/mac.c (revision 6391) |
150 |
+++ src/stored/mac.c (working copy) |
151 |
@@ -108,6 +108,7 @@ |
152 |
|
153 |
jcr->dcr->VolFirstIndex = jcr->dcr->VolLastIndex = 0; |
154 |
jcr->run_time = time(NULL); |
155 |
+ set_start_vol_position(jcr->dcr); |
156 |
|
157 |
ok = read_records(jcr->read_dcr, record_cb, mount_next_read_volume); |
158 |
goto ok_out; |
159 |
Index: src/stored/protos.h |
160 |
=================================================================== |
161 |
--- src/stored/protos.h (revision 6391) |
162 |
+++ src/stored/protos.h (working copy) |
163 |
@@ -126,6 +126,7 @@ |
164 |
bool open_device(DCR *dcr); |
165 |
bool first_open_device(DCR *dcr); |
166 |
bool fixup_device_block_write_error(DCR *dcr); |
167 |
+void set_start_vol_position(DCR *dcr); |
168 |
void set_new_volume_parameters(DCR *dcr); |
169 |
void set_new_file_parameters(DCR *dcr); |
170 |
bool is_device_unmounted(DEVICE *dev); |
171 |
|
172 |
|
173 |
|
174 |
1.1 app-backup/bacula/files/2.2.8/2.2.8-strip-path.patch |
175 |
|
176 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-backup/bacula/files/2.2.8/2.2.8-strip-path.patch?rev=1.1&view=markup |
177 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-backup/bacula/files/2.2.8/2.2.8-strip-path.patch?rev=1.1&content-type=text/plain |
178 |
|
179 |
Index: 2.2.8-strip-path.patch |
180 |
=================================================================== |
181 |
|
182 |
This patch should fix bug #1047 -- heap corruption when using |
183 |
strippath on certain directories. |
184 |
|
185 |
Apply it to 2.2.8 (probably prior versions) with: |
186 |
|
187 |
cd <bacula-source> |
188 |
patch -p0 <2.2.8-strip-path.patch |
189 |
./configure <your-options> |
190 |
make |
191 |
... |
192 |
make install |
193 |
|
194 |
|
195 |
Index: src/filed/backup.c |
196 |
=================================================================== |
197 |
--- src/filed/backup.c (revision 6390) |
198 |
+++ src/filed/backup.c (revision 6391) |
199 |
@@ -1146,20 +1146,21 @@ |
200 |
/* |
201 |
* Strip path. If it doesn't succeed put it back. If |
202 |
* it does, and there is a different link string, |
203 |
- * attempt to strip the link. If it fails, but them |
204 |
+ * attempt to strip the link. If it fails, back them |
205 |
* both back. |
206 |
+ * Don't strip symlinks. |
207 |
* I.e. if either stripping fails don't strip anything. |
208 |
*/ |
209 |
if (do_strip(ff_pkt->strip_path, ff_pkt->fname)) { |
210 |
- if (ff_pkt->fname != ff_pkt->link) { |
211 |
+ if (ff_pkt->type != FT_LNK && ff_pkt->fname != ff_pkt->link) { |
212 |
pm_strcpy(ff_pkt->link_save, ff_pkt->link); |
213 |
if (!do_strip(ff_pkt->strip_path, ff_pkt->link)) { |
214 |
- strcpy(ff_pkt->link, ff_pkt->link_save); |
215 |
- strcpy(ff_pkt->fname, ff_pkt->fname_save); |
216 |
+ pm_strcpy(ff_pkt->link, ff_pkt->link_save); |
217 |
+ pm_strcpy(ff_pkt->fname, ff_pkt->fname_save); |
218 |
} |
219 |
} |
220 |
} else { |
221 |
- strcpy(ff_pkt->fname, ff_pkt->fname_save); |
222 |
+ pm_strcpy(ff_pkt->fname, ff_pkt->fname_save); |
223 |
} |
224 |
Dmsg2(200, "fname=%s stripped=%s\n", ff_pkt->fname_save, ff_pkt->fname); |
225 |
} |
226 |
@@ -1169,8 +1170,8 @@ |
227 |
if (!(ff_pkt->flags & FO_STRIPPATH) || ff_pkt->strip_path <= 0) { |
228 |
return; |
229 |
} |
230 |
- strcpy(ff_pkt->fname, ff_pkt->fname_save); |
231 |
- if (ff_pkt->fname != ff_pkt->link) { |
232 |
- strcpy(ff_pkt->link, ff_pkt->link_save); |
233 |
+ pm_strcpy(ff_pkt->fname, ff_pkt->fname_save); |
234 |
+ if (ff_pkt->type != FT_LNK && ff_pkt->fname != ff_pkt->link) { |
235 |
+ pm_strcpy(ff_pkt->link, ff_pkt->link_save); |
236 |
} |
237 |
} |
238 |
|
239 |
|
240 |
|
241 |
1.1 app-backup/bacula/files/2.2.8/2.2.8-pool-source.patch |
242 |
|
243 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-backup/bacula/files/2.2.8/2.2.8-pool-source.patch?rev=1.1&view=markup |
244 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-backup/bacula/files/2.2.8/2.2.8-pool-source.patch?rev=1.1&content-type=text/plain |
245 |
|
246 |
Index: 2.2.8-pool-source.patch |
247 |
=================================================================== |
248 |
|
249 |
This patch fixes bug #1031 about wrong pool source information |
250 |
in job report. |
251 |
|
252 |
Apply the patch to 2.2.8 (and possibly any 2.2.x version with): |
253 |
|
254 |
cd <bacula-source> |
255 |
patch -p0 <2.2.8-pool-source.patch |
256 |
./configure <your-options> |
257 |
make |
258 |
... |
259 |
make install |
260 |
|
261 |
|
262 |
|
263 |
Index: src/dird/ua_run.c |
264 |
=================================================================== |
265 |
--- src/dird/ua_run.c (révision 6388) |
266 |
+++ src/dird/ua_run.c (copie de travail) |
267 |
@@ -122,6 +122,9 @@ |
268 |
jcr->verify_job = rc.verify_job; |
269 |
jcr->previous_job = rc.previous_job; |
270 |
jcr->pool = rc.pool; |
271 |
+ if (jcr->pool != jcr->job->pool) { |
272 |
+ pm_strcpy(jcr->pool_source, _("User input")); |
273 |
+ } |
274 |
set_rwstorage(jcr, rc.store); |
275 |
jcr->client = rc.client; |
276 |
pm_strcpy(jcr->client_name, rc.client->name()); |
277 |
|
278 |
|
279 |
|
280 |
1.1 app-backup/bacula/files/2.2.8/2.2.8-jobmedia-fix.patch |
281 |
|
282 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-backup/bacula/files/2.2.8/2.2.8-jobmedia-fix.patch?rev=1.1&view=markup |
283 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-backup/bacula/files/2.2.8/2.2.8-jobmedia-fix.patch?rev=1.1&content-type=text/plain |
284 |
|
285 |
Index: 2.2.8-jobmedia-fix.patch |
286 |
=================================================================== |
287 |
|
288 |
This patch fixes a bug that cause storage to create JOBMEDIA records |
289 |
for every block written to tape. |
290 |
|
291 |
This Patch works with 2.2.8-jobmedia.patch |
292 |
|
293 |
Apply this patch to Bacula 2.2.8 (and possibly any prior 2.2.x version) with: |
294 |
|
295 |
cd <bacula-source> |
296 |
patch -p0 <2.2.8-jobmedia-fix.patch |
297 |
./configure <your-options> |
298 |
make |
299 |
... |
300 |
make install |
301 |
|
302 |
|
303 |
Index: src/stored/block.c |
304 |
=================================================================== |
305 |
--- src/stored/block.c (revision 6531) |
306 |
+++ src/stored/block.c (working copy) |
307 |
@@ -374,7 +374,6 @@ |
308 |
if (dcr->NewVol) { |
309 |
/* Note, setting a new volume also handles any pending new file */ |
310 |
set_new_volume_parameters(dcr); |
311 |
- dcr->NewFile = false; /* this handled for new file too */ |
312 |
} else { |
313 |
set_new_file_parameters(dcr); |
314 |
} |
315 |
Index: src/stored/device.c |
316 |
=================================================================== |
317 |
--- src/stored/device.c (revision 6531) |
318 |
+++ src/stored/device.c (working copy) |
319 |
@@ -226,6 +226,7 @@ |
320 |
} |
321 |
set_new_file_parameters(dcr); |
322 |
jcr->NumWriteVolumes++; |
323 |
+ dcr->NewVol = false; |
324 |
} |
325 |
|
326 |
/* |
327 |
|
328 |
|
329 |
|
330 |
-- |
331 |
gentoo-commits@l.g.o mailing list |