[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/amanda/devel amanda-2.5.0-amcheck_badtape.patch, NONE, 1.1 amanda-2.5.0p2-big_holding_disk.patch, NONE, 1.1 amanda-2.5.0p2-error_msg.patch, NONE, 1.1 amanda-2.5.0p2-restore.patch, NONE, 1.1 .cvsignore, 1.11, 1.12 amanda.spec, 1.30, 1.31 sources, 1.11, 1.12 amanda-2.5.0-overflow.patch, 1.1, NONE



Author: fenlason

Update of /cvs/dist/rpms/amanda/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv20934

Modified Files:
	.cvsignore amanda.spec sources 
Added Files:
	amanda-2.5.0-amcheck_badtape.patch 
	amanda-2.5.0p2-big_holding_disk.patch 
	amanda-2.5.0p2-error_msg.patch amanda-2.5.0p2-restore.patch 
Removed Files:
	amanda-2.5.0-overflow.patch 
Log Message:
+- New upstream version
+- Make the BuildRequires on /usr/bin/Mail rather than mailx, because we
+  don't really care where the Mail command comes from.
+- include the amcheck_badtape patch by Paul Bijnens
+  <paul bijnens xplanation com> to fix a problem where amcheck doesn't
+  realize the wrong tape is in the drive.
+- include the error_msg patch from Jean-Louis Martineau <martineau zmanda com>
+  to fix a double-free problem
+- include the restore patch from Jean-Louis Martineau <martineau zmanda com>
+  to fix an error in amrestore
+- include a slightly modified form of the big_holding_disk patch from
+  Andrej Filipcic <andrej filipcic ijs si> to fix a problem with holding
+  disks bigger than 4tb



amanda-2.5.0-amcheck_badtape.patch:
 amcheck.c |    1 +
 1 files changed, 1 insertion(+)

--- NEW FILE amanda-2.5.0-amcheck_badtape.patch ---
--- amanda-2.5.0/server-src/amcheck.c_ORIG	2006-05-04 23:29:26.000000000 +0200
+++ amanda-2.5.0/server-src/amcheck.c	2006-05-08 11:43:32.000000000 +0200
@@ -855,10 +855,11 @@
         if (tape_status < 0) {
 	    tape_t *exptape = lookup_last_reusable_tape(0);
 	    fprintf(outf, "       (expecting ");
 	    if(exptape != NULL) fprintf(outf, "tape %s or ", exptape->label);
 	    fprintf(outf, "a new tape)\n");
+	    tapebad = 1;
 	} else {
             if (overwrite) {
                 char *wrlabel_status;
                 wrlabel_status = tape_wrlabel(tapename, "X", label,
                                               tp->blocksize * 1024);

amanda-2.5.0p2-big_holding_disk.patch:
 statfs.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE amanda-2.5.0p2-big_holding_disk.patch ---
--- amanda-2.5.0p2/common-src/statfs.c.big_holding_disk	2006-03-28 16:09:51.000000000 -0500
+++ amanda-2.5.0p2/common-src/statfs.c	2006-06-09 11:45:06.000000000 -0400
@@ -127,7 +127,7 @@
 # endif
 #endif
 
-#define scale(r,s)	( (r) == -1? -1 : (int)((r)*(double)(s)/1024.0) )
+#define scale(r,s)	( (r) == -1? -1 : (long long)((r)*(double)(s)/1024.0) )
 
 int get_fs_stats(dir, sp)
 char *dir;

amanda-2.5.0p2-error_msg.patch:
 amcheck.c |    8 +++++---
 taper.c   |    3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)

--- NEW FILE amanda-2.5.0p2-error_msg.patch ---
diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.5.0p2.orig/server-src/amcheck.c amanda-2.5.0p2.new/server-src/amcheck.c
--- amanda-2.5.0p2.orig/server-src/amcheck.c	2006-05-12 15:26:12.000000000 -0400
+++ amanda-2.5.0p2.new/server-src/amcheck.c	2006-05-24 08:29:04.000000000 -0400
@@ -810,7 +810,7 @@ int start_server_check(fd, do_localchk, 
 
     if (testtape) {
 	/* check that the tape is a valid amanda tape */
-        char *error_msg;
+        char *error_msg = NULL;
         int tape_status;
 
 	tapedays = getconf_int(CNF_TAPECYCLE);
@@ -824,8 +824,10 @@ int start_server_check(fd, do_localchk, 
 
         tape_status = taper_scan(NULL, &label, &datestamp, &error_msg,
                                  &tapename);
-        fprintf(outf, "%s\n", error_msg);
-        amfree(error_msg);
+	if(error_msg) {
+            fprintf(outf, "%s\n", error_msg);
+            amfree(error_msg);
+	}
         if (tape_status < 0) {
 	    tape_t *exptape = lookup_last_reusable_tape(0);
 	    fprintf(outf, "       (expecting ");
diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.5.0p2.orig/server-src/taper.c amanda-2.5.0p2.new/server-src/taper.c
--- amanda-2.5.0p2.orig/server-src/taper.c	2006-05-04 17:31:15.000000000 -0400
+++ amanda-2.5.0p2.new/server-src/taper.c	2006-05-24 08:33:31.000000000 -0400
@@ -2331,7 +2331,7 @@ int label_tape()
     char *result;
     static int first_call = 1;
     char *timestamp;
-    char *error_msg;
+    char *error_msg = NULL;
     char *s, *r;
     int slot = -1;
 
@@ -2348,6 +2348,7 @@ int label_tape()
 	if(r) {
 	    slot = atoi(r);
 	}
+	amfree(error_msg);
     }
     if((tape_fd = tape_open(tapedev, O_WRONLY)) == -1) {
 	if(errno == EACCES) {

amanda-2.5.0p2-restore.patch:
 common-src/fileheader.c    |    6 +++
 restore-src/.restore.c.swp |only
 restore-src/amrestore.c    |    5 +--
 restore-src/restore.c      |   73 ++++++++++++++++++++++++---------------------
 restore-src/restore.h      |    4 +-
 restore-src/restore1.c     |only
 6 files changed, 49 insertions(+), 39 deletions(-)

--- NEW FILE amanda-2.5.0p2-restore.patch ---
diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.5.1b1.orig/common-src/fileheader.c amanda-2.5.1b1.new.restore/common-src/fileheader.c
--- amanda-2.5.1b1.orig/common-src/fileheader.c	2006-03-09 11:51:41.000000000 -0500
+++ amanda-2.5.1b1.new.restore/common-src/fileheader.c	2006-05-23 09:21:18.000000000 -0400
@@ -262,6 +262,12 @@ parse_file_header(buffer, file, buflen)
 	    amfree(line1);
 	    return;
 	}
+	tok = strtok(NULL, " ");
+	if (tok == NULL) {
+	    amfree(buf);
+	    amfree(line1);
+	    return;
+	}
 	strncpy(file->datestamp, tok, sizeof(file->datestamp) - 1);
 	break;
 
diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.5.1b1.orig/restore-src/amrestore.c amanda-2.5.1b1.new.restore/restore-src/amrestore.c
--- amanda-2.5.1b1.orig/restore-src/amrestore.c	2006-04-07 06:53:51.000000000 -0400
+++ amanda-2.5.1b1.new.restore/restore-src/amrestore.c	2006-05-23 13:44:06.000000000 -0400
@@ -286,7 +286,7 @@ char **argv;
 	error("could not open %s: %s", tapename, strerror(errno));
     }
 
-    read_file_header(&file, tapedev, isafile, rst_flags);
+    read_result = read_file_header(&file, tapedev, isafile, rst_flags);
 
     if(file.type != F_TAPESTART && !isafile && filefsf == -1) {
 	fprintf(stderr, "%s: WARNING: not at start of tape, file numbers will be offset\n",
@@ -294,7 +294,6 @@ char **argv;
     }
 
     count_error=0;
-    read_result = 0;
     while(count_error < 10) {
 	if(file.type == F_TAPEEND) break;
 	found_match = 0;
@@ -363,7 +362,7 @@ char **argv;
 	    count_error=0;
 	}
 	file_number++;
-	read_file_header(&file, tapedev, isafile, rst_flags);
+	read_result = read_file_header(&file, tapedev, isafile, rst_flags);
     }
     if(isafile) {
 	close(tapedev);
Only in amanda-2.5.1b1.new.restore/restore-src: restore1.c
diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.5.1b1.orig/restore-src/restore.c amanda-2.5.1b1.new.restore/restore-src/restore.c
--- amanda-2.5.1b1.orig/restore-src/restore.c	2006-05-12 19:13:11.000000000 -0400
+++ amanda-2.5.1b1.new.restore/restore-src/restore.c	2006-05-23 14:05:32.000000000 -0400
@@ -548,7 +548,7 @@ char *datestamp, *hostname, *diskname, *
 }
 
 
-void read_file_header(file, tapefd, isafile, flags)
+ssize_t read_file_header(file, tapefd, isafile, flags)
 dumpfile_t *file;
 int tapefd;
 int isafile;
@@ -584,6 +584,7 @@ rst_flags_t *flags;
 	parse_file_header(buffer, file, bytes_read);
     }
     amfree(buffer);
+    return bytes_read;
 }
 
 
@@ -1141,7 +1142,7 @@ am_feature_t *their_features;
     tapelist_t *desired_tape = NULL;
     struct sigaction act, oact;
     int newtape = 1;
-    ssize_t bytes_read = 0;
+    ssize_t read_result;
 
     struct seentapes{
 	struct seentapes *next;
@@ -1239,6 +1240,8 @@ am_feature_t *their_features;
 	int wrongtape = 0;
 	int isafile = 0;
 
+	read_result = 0;
+
 	/*
 	 * Deal with instances where we're being asked to restore from a file
 	 */
@@ -1251,7 +1254,7 @@ am_feature_t *their_features;
 	    }
 	    fprintf(stderr, "Reading %s to fd %d\n", desired_tape->label, tapefd);
 
-	    read_file_header(&file, tapefd, 1, flags);
+	    read_result = read_file_header(&file, tapefd, 1, flags);
 	    label = stralloc(desired_tape->label);
 	}
 	/*
@@ -1274,7 +1277,7 @@ am_feature_t *their_features;
 	    }
 
  	    if (!wrongtape) {
- 		read_file_header(&file, tapefd, 0, flags);
+ 		read_result = read_file_header(&file, tapefd, 0, flags);
  		if (file.type != F_TAPESTART) {
  		    fprintf(stderr, "Not an amanda tape\n");
  		    tapefd_close(tapefd);
@@ -1286,7 +1289,6 @@ am_feature_t *their_features;
  	    }
 	} else if(newtape) {
 	  wrongtape = 1; /* nothing loaded */
-	  bytes_read = -1;
 	}
 
 	/*
@@ -1453,7 +1455,7 @@ am_feature_t *their_features;
 		else {
 			filenum = fsf_by;
 		}
-		read_file_header(&file, tapefd, isafile, flags);
+		read_result = read_file_header(&file, tapefd, isafile, flags);
 	    }
 	}
 
@@ -1497,46 +1499,45 @@ am_feature_t *their_features;
 
 	    if(found_match){
 		char *filename = make_filename(&file);
+
 		fprintf(stderr, "%s: %3d: restoring ", get_pname(), filenum);
 		print_header(stderr, &file);
-		bytes_read = restore(&file, filename, tapefd, isafile, flags);
+		read_result = restore(&file, filename, tapefd, isafile, flags);
 		filenum ++;
 		amfree(filename);
 	    }
 
 	    /* advance to the next file, fast-forwarding where reasonable */
-	    if(bytes_read == 0 && !isafile) {
-		tapefd_close(tapefd);
-		if((tapefd = tape_open(cur_tapedev, 0)) < 0) {
-		    error("could not open %s: %s",
-		          cur_tapedev, strerror(errno));
+	    if(!isafile) {
+		if(read_result == 0) {
+		    tapefd_close(tapefd);
+		    if((tapefd = tape_open(cur_tapedev, 0)) < 0) {
+			error("could not open %s: %s",
+			      cur_tapedev, strerror(errno));
+		    }
 		}
-	    } else if(!isafile){
-		/* cheat and jump ahead to where we're going if we can */
-		if (!found_match && flags->fsf) {
-		    drain_file(tapefd, flags);
+		/* if the file is not what we're looking for fsf to next one */
+		else if (!found_match) {
+		    if(tapefd_fsf(tapefd, 1) < 0) {
+			error("could not fsf device %s: %s",
+			      cur_tapedev, strerror(errno));
+			/* NOTREACHED */
+		    }
 		    filenum ++;
-		} else if(tapefile_idx >= 0 && 
-			  tapefile_idx < desired_tape->numfiles &&
-			  flags->fsf){
+		}
+		else if(tapefile_idx >= 0 && 
+			tapefile_idx < desired_tape->numfiles &&
+			flags->fsf){
 		    int fsf_by = desired_tape->files[tapefile_idx] - filenum;
 		    if(fsf_by > 0){
 			if(tapefd_fsf(tapefd, fsf_by) < 0) {
-			    error("Could not fsf device %s by %d: %s", cur_tapedev, fsf_by,
-				  strerror(errno));
+			     error("Could not fsf device %s by %d: %s",
+				   cur_tapedev, fsf_by, strerror(errno));
 			}
-			else filenum = desired_tape->files[tapefile_idx];
-		    }
-		} else if (!found_match && flags->fsf) {
-		    /* ... or fsf by 1, whatever */
-		    if(tapefd_fsf(tapefd, 1) < 0) {
-			error("could not fsf device %s: %s",
-			      cur_tapedev, strerror(errno));
-		    } else {
-			filenum ++;
+			filenum = desired_tape->files[tapefile_idx];
 		    }
 		}
-	    }
+	    } /* !isafile */
 
 
 	    memcpy(&prev_rst_file, &file, sizeof(dumpfile_t));
@@ -1544,15 +1545,19 @@ am_feature_t *their_features;
 	      
 	    if(isafile)
                 break;
-            read_file_header(&file, tapefd, isafile, flags);
+
+            read_result = read_file_header(&file, tapefd, isafile, flags);
 
 	    /* only restore a single dump, if piping to stdout */
 	    if(!headers_equal(&prev_rst_file, &file, 1) &&
-	       flags->pipe_to_fd == fileno(stdout)) break;
+	       flags->pipe_to_fd == fileno(stdout) &&
+	       found_match)
+		break;
+
 	} /* while we keep seeing headers */
 
 	if(!isafile){
-	    if(bytes_read == 0) {
+	    if(read_result == 0) {
 		/* XXX is this dain-bramaged? */
 		aclose(tapefd);
 		if((tapefd = tape_open(cur_tapedev, 0)) < 0) {
Only in amanda-2.5.1b1.new.restore/restore-src: .restore.c.swp
diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.5.1b1.orig/restore-src/restore.h amanda-2.5.1b1.new.restore/restore-src/restore.h
--- amanda-2.5.1b1.orig/restore-src/restore.h	2006-03-14 08:12:01.000000000 -0500
+++ amanda-2.5.1b1.new.restore/restore-src/restore.h	2006-05-23 13:48:18.000000000 -0400
@@ -70,8 +70,8 @@ typedef struct rst_flags_s {
 char *make_filename P((dumpfile_t *file));
 int disk_match P((dumpfile_t *file, char *datestamp,
 		    char *hostname, char *diskname, char *level));
-void read_file_header P((dumpfile_t *file, int tapefd, int isafile,
-			 rst_flags_t *flags));
+ssize_t read_file_header P((dumpfile_t *file, int tapefd, int isafile,
+			rst_flags_t *flags));
 ssize_t restore P((dumpfile_t *file, char *filename, int tapefd, int isafile,
 			rst_flags_t *flags));
 void flush_open_outputs P((int reassemble, dumpfile_t *only_file));


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/amanda/devel/.cvsignore,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- .cvsignore	10 Apr 2006 19:52:13 -0000	1.11
+++ .cvsignore	9 Jun 2006 16:06:40 -0000	1.12
@@ -1 +1 @@
-amanda-2.5.0.tar.gz
+amanda-2.5.0p2.tar.gz


Index: amanda.spec
===================================================================
RCS file: /cvs/dist/rpms/amanda/devel/amanda.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- amanda.spec	22 May 2006 22:18:07 -0000	1.30
+++ amanda.spec	9 Jun 2006 16:06:40 -0000	1.31
@@ -10,8 +10,8 @@
 
 Summary: A network-capable tape backup solution.
 Name: amanda
-Version: 2.5.0
-Release: 3
+Version: 2.5.0p2
+Release: 2
 Source: http://download.sourceforge.net/amanda/amanda-%{version}.tar.gz
 Source1: amanda.crontab
 # Source2: __README_QUICKSETUP__
@@ -22,13 +22,16 @@
 Source8: amandahosts
 Patch0: amanda-2.4.2-bug18322.patch
 Patch1: amanda-2.5.0-pie.patch
-Patch2: amanda-2.5.0-overflow.patch
+Patch2: amanda-2.5.0-amcheck_badtape.patch
+Patch3: amanda-2.5.0p2-error_msg.patch
+Patch4: amanda-2.5.0p2-restore.patch
+Patch5: amanda-2.5.0p2-big_holding_disk.patch
 License: BSD
 Group: Applications/System
 URL: http://www.amanda.org
 Prereq: fileutils grep initscripts
-BuildRequires: dump gnuplot cups samba-client tar grep fileutils mailx
-BuildRequires: libtool automake autoconf gcc-c++ readline-devel
+BuildRequires: dump gnuplot cups samba-client tar grep fileutils
+BuildRequires: libtool automake autoconf gcc-c++ readline-devel /usr/bin/Mail
 Requires: tar /usr/bin/Mail
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 
@@ -84,7 +87,11 @@
 %setup -q
 %patch0 -p1 -b .bug18322
 %patch1 -p1 -b .pie
-%patch2 -p1 -b .overflow
+%patch2 -p1 -b .amcheck_badtape
+%patch3 -p1 -b .error_msg
+%patch4 -p1 -b .restore
+%patch5 -p1 -b .big_holding_disk
+
 libtoolize --copy --force
 aclocal
 automake
@@ -341,6 +348,21 @@
 %{_libdir}/librestore.so
 
 %changelog
+* Thu Jun 8 2006 Jay Fenlason <fenlason redhat com> 2.5.0p2-2
+- New upstream version
+- Make the BuildRequires on /usr/bin/Mail rather than mailx, because we
+  don't really care where the Mail command comes from.
+- include the amcheck_badtape patch by Paul Bijnens
+  <paul bijnens xplanation com> to fix a problem where amcheck doesn't
+  realize the wrong tape is in the drive.
+- include the error_msg patch from Jean-Louis Martineau <martineau zmanda com>
+  to fix a double-free problem
+- include the restore patch from Jean-Louis Martineau <martineau zmanda com>
+  to fix an error in amrestore
+- include a slightly modified form of the big_holding_disk patch from
+  Andrej Filipcic <andrej filipcic ijs si> to fix a problem with holding
+  disks bigger than 4tb
+
 * Mon May 22 2006 Jesse Keating <jkeating redhat com> 2.5.0-3
 - Fix BuildReqs
 


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/amanda/devel/sources,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- sources	10 Apr 2006 19:52:13 -0000	1.11
+++ sources	9 Jun 2006 16:06:40 -0000	1.12
@@ -1 +1 @@
-a720dafd60ff215dd97aa3271d7e0051  amanda-2.5.0.tar.gz
+073828b8b5a5c377a08f8f19b5eccf85  amanda-2.5.0p2.tar.gz


--- amanda-2.5.0-overflow.patch DELETED ---


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]