rpms/bacula/FC-6 2.0.3-restore.patch,NONE,1.1 bacula.spec,1.2,1.3
Andreas Thienemann (ixs)
fedora-extras-commits at redhat.com
Thu Sep 13 10:43:01 UTC 2007
Author: ixs
Update of /cvs/pkgs/rpms/bacula/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14262
Modified Files:
bacula.spec
Added Files:
2.0.3-restore.patch
Log Message:
* Thu Sep 13 2007 Andreas Thienemann <andreas at bawue.net> 2.0.3-10
- Applied restore fix to sd. #288981
2.0.3-restore.patch:
--- NEW FILE 2.0.3-restore.patch ---
diff -up bacula-2.0.3/src/stored/dev.h.restore bacula-2.0.3/src/stored/dev.h
--- bacula-2.0.3/src/stored/dev.h.restore 2007-09-13 12:32:46.000000000 +0200
+++ bacula-2.0.3/src/stored/dev.h 2007-09-13 12:34:56.000000000 +0200
@@ -438,6 +438,7 @@ public:
uint32_t StartFile; /* Start write file */
uint32_t StartBlock; /* Start write block */
uint32_t EndBlock; /* Ending block written */
+ int64_t VolMediaId; /* MediaId */
int64_t job_spool_size; /* Current job spool size */
int64_t max_job_spool_size; /* Max job spool size */
char VolumeName[MAX_NAME_LENGTH]; /* Volume name */
diff -up bacula-2.0.3/src/stored/askdir.c.restore bacula-2.0.3/src/stored/askdir.c
--- bacula-2.0.3/src/stored/askdir.c.restore 2007-09-13 12:32:54.000000000 +0200
+++ bacula-2.0.3/src/stored/askdir.c 2007-09-13 12:34:56.000000000 +0200
@@ -391,7 +391,7 @@ bool dir_create_jobmedia_record(DCR *dcr
dcr->StartFile, dcr->EndFile,
dcr->StartBlock, dcr->EndBlock,
dcr->Copy, dcr->Stripe,
- edit_uint64(dcr->dev->VolCatInfo.VolMediaId, ed1));
+ edit_uint64(dcr->VolMediaId, ed1));
Dmsg1(100, ">dird: %s", dir->msg);
if (bnet_recv(dir) <= 0) {
Dmsg0(190, "create_jobmedia error bnet_recv\n");
diff -up bacula-2.0.3/src/stored/bscan.c.restore bacula-2.0.3/src/stored/bscan.c
--- bacula-2.0.3/src/stored/bscan.c.restore 2007-09-13 12:32:36.000000000 +0200
+++ bacula-2.0.3/src/stored/bscan.c 2007-09-13 12:34:56.000000000 +0200
@@ -328,6 +328,7 @@ static bool bscan_mount_next_read_volume
// mdcr->EndBlock = (uint32_t)dcr->file_addr;
// mdcr->EndFile = (uint32_t)(dcr->file_addr >> 32);
}
+ mdcr->VolMediaId = dcr->VolMediaId;
mjcr->read_dcr->VolLastIndex = dcr->VolLastIndex;
if (!create_jobmedia_record(db, mjcr)) {
Pmsg2(000, _("Could not create JobMedia record for Volume=%s Job=%s\n"),
@@ -472,6 +473,7 @@ static bool record_cb(DCR *dcr, DEV_RECO
dcr->VolFirstIndex = dcr->FileIndex = 0;
dcr->StartBlock = dcr->EndBlock = 0;
dcr->StartFile = dcr->EndFile = 0;
+ dcr->VolMediaId = 0;
}
Pmsg1(000, _("VOL_LABEL: OK for Volume: %s\n"), mr.VolumeName);
@@ -1174,6 +1176,7 @@ static int create_jobmedia_record(B_DB *
dcr->EndFile = (uint32_t)(dev->file_addr >> 32);
#endif
}
+ dcr->VolMediaId = dev->VolCatInfo.VolMediaId;
memset(&jmr, 0, sizeof(jmr));
jmr.JobId = mjcr->JobId;
diff -up bacula-2.0.3/src/stored/block.c.restore bacula-2.0.3/src/stored/block.c
--- bacula-2.0.3/src/stored/block.c.restore 2007-09-13 12:32:42.000000000 +0200
+++ bacula-2.0.3/src/stored/block.c 2007-09-13 12:34:56.000000000 +0200
@@ -612,6 +612,7 @@ bool write_block_to_dev(DCR *dcr)
dev->block_num = dcr->EndBlock;
dev->file = dcr->EndFile;
}
+ dcr->VolMediaId = dev->VolCatInfo.VolMediaId;
if (dcr->VolFirstIndex == 0 && block->FirstIndex > 0) {
dcr->VolFirstIndex = block->FirstIndex;
}
@@ -1107,6 +1108,7 @@ reread:
dev->block_num = dcr->EndBlock;
dev->file = dcr->EndFile;
}
+ dcr->VolMediaId = dev->VolCatInfo.VolMediaId;
dev->file_addr += block->read_len;
dev->file_size += block->read_len;
Index: bacula.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bacula/FC-6/bacula.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- bacula.spec 25 Jul 2007 15:28:28 -0000 1.2
+++ bacula.spec 13 Sep 2007 10:42:27 -0000 1.3
@@ -8,7 +8,7 @@
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
Name: bacula
Version: 2.0.3
-Release: 9%{?dist}
+Release: 10%{?dist}
License: GPL
Group: System Environment/Daemons
Source0: http://download.sourceforge.net/bacula/bacula-%{version}.tar.gz
@@ -33,6 +33,7 @@
Patch7: 2.0.3-scheduler-next-hour.patch
Patch8: 2.0.3-verify.patch
Patch9: 2.0.3-tls-disconnect.patch
+Patch10: 2.0.3-restore.patch
#Patch10: bacula-web-smarty.patch
URL: http://www.bacula.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -330,6 +331,7 @@
%patch7 -p0
%patch8 -p0
%patch9 -p0
+%patch10 -p1
# Remove execution permissions from files we're packaging as docs later on
find examples -type f | xargs chmod -x
@@ -919,6 +921,9 @@
%changelog
+* Thu Sep 13 2007 Andreas Thienemann <andreas at bawue.net> 2.0.3-10
+- Applied restore fix to sd. #288981
+
* Wed Jul 25 2007 Andreas Thienemann <andreas at bawue.net> 2.0.3-9
- Corrected the %%post alternatives calls. Fixing #249560.
More information about the fedora-extras-commits
mailing list