[SCM] BOINC packaging branch, master, updated. debian/7.0.33+dfsg-1-29-g4ad1ad6

Steffen Moeller steffen_moeller at gmx.de
Sat Sep 1 23:03:30 UTC 2012


The following commit has been merged in the master branch:
commit edddf3fcd34bb2b9c70f35c00b9bb2c7e96dcb71
Author: Steffen Moeller <steffen_moeller at gmx.de>
Date:   Sun Sep 2 01:02:09 2012 +0200

    7.0.34-4 and preparation of 7.0.34-5

diff --git a/debian/changelog b/debian/changelog
index de079f3..3040fcb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,19 @@
+boinc (7.0.34+dfsg-5) UNRELEASED; urgency=low
+
+  * Added better error messages for opendir() failures
+
+ -- Steffen Moeller <moeller at debian.org>  Sat, 01 Sep 2012 15:13:26 +0200
+
+boinc (7.0.34+dfsg-4) unstable; urgency=low
+
+  [ Guo Yixuan ]
+  * Fix of debian/patch on pathlength
+  [ Steffen Moeller ]
+  * Corrected handling of memory reallocation in client/stream.cpp
+  * Improved cpptest cleanliness
+
+ -- Steffen Moeller <moeller at debian.org>  Sat, 01 Sep 2012 15:13:26 +0200
+
 boinc (7.0.34+dfsg-3) UNRELEASED; urgency=low
 
   [ Steffen Moeller ]
diff --git a/debian/patches/cppcheck_avoid_redundant_check.patch b/debian/patches/cppcheck_avoid_redundant_check.patch
new file mode 100644
index 0000000..4098234
--- /dev/null
+++ b/debian/patches/cppcheck_avoid_redundant_check.patch
@@ -0,0 +1,38 @@
+Index: boinc/api/gutil.cpp
+===================================================================
+--- boinc.orig/api/gutil.cpp	2012-09-01 19:32:35.497548789 +0200
++++ boinc/api/gutil.cpp	2012-09-01 19:38:05.093079839 +0200
+@@ -767,15 +767,13 @@
+ 	gluBuild2DMipmaps(GL_TEXTURE_2D, 3, pImage->sizeX, pImage->sizeY, GL_RGB, GL_UNSIGNED_BYTE, pImage->data);
+ 	glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);
+ 	glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR_MIPMAP_LINEAR);
+-    xsize = pImage->sizeX;
+-    ysize = pImage->sizeY;
++	xsize = pImage->sizeX;
++	ysize = pImage->sizeY;
+ 
+-	if (pImage) {
+-		if (pImage->data) {
+-			free(pImage->data);
+-		}
+-		free(pImage);
++	if (pImage->data) {
++		free(pImage->data);
+ 	}
++	free(pImage);
+ 	return 0;
+ }
+ 
+Index: boinc/api/make_app_icon_h.cpp
+===================================================================
+--- boinc.orig/api/make_app_icon_h.cpp	2012-03-31 13:44:20.967194213 +0200
++++ boinc/api/make_app_icon_h.cpp	2012-09-01 19:40:17.671280387 +0200
+@@ -39,7 +39,7 @@
+     }
+     
+     outFile = fopen(argv[2], "w");
+-    if (inFile == NULL) {
++    if (outFile == NULL) {
+         printf ("Couldn't create output file %s\n", argv[2]);
+         fclose(inFile);
+         return 0;
diff --git a/debian/patches/opendir_errno.patch b/debian/patches/opendir_errno.patch
new file mode 100644
index 0000000..4a06634
--- /dev/null
+++ b/debian/patches/opendir_errno.patch
@@ -0,0 +1,115 @@
+Index: boinc/lib/filesys.cpp
+===================================================================
+--- boinc.orig/lib/filesys.cpp	2012-09-02 00:06:37.000000000 +0200
++++ boinc/lib/filesys.cpp	2012-09-02 00:09:30.054449395 +0200
+@@ -128,7 +128,7 @@
+     if (!is_dir(p)) return NULL;
+     dirp = (DIR_DESC*) calloc(sizeof(DIR_DESC), 1);
+     if (!dirp) {
+-        fprintf(stderr, "calloc() failed in dir_open()\n");
++        fprintf(stderr, "calloc() failed in lib/filesys.cpp: dir_open()\n");
+         return NULL;
+     }
+     dirp->first = true;
+@@ -136,11 +136,12 @@
+     strcat(dirp->path, "\\*");
+     dirp->handle = INVALID_HANDLE_VALUE;
+ #else
++    errno=0;
+     dirp = opendir(p);
+     if (!dirp) {
+         char whereami[MAXPATHLEN];
+ 	boinc_getcwd(whereami);
+-        fprintf(stderr,"dir_open: Could not open directory '%s' from directory '%s'.\n",p,whereami);
++        fprintf(stderr,"lib/filesys.cpp: Could not open directory '%s' from directory '%s': %s.\n",p,whereami,strerror(errno));
+         return NULL;
+     }
+ #endif
+@@ -230,7 +231,11 @@
+     }
+     dir = path + "\\*";
+ #else
++    errno=0;
+     dirp = opendir(path.c_str());
++    if (NULL == dirp) {
++        fprintf(stderr, "opendir() failed in DirScanner::DirScanner. %s\n", strerror(errno));
++    }
+ #endif
+ }
+ 
+Index: boinc/client/check_security.cpp
+===================================================================
+--- boinc.orig/client/check_security.cpp	2012-09-02 00:06:07.000000000 +0200
++++ boinc/client/check_security.cpp	2012-09-02 00:08:05.219581154 +0200
+@@ -39,9 +39,9 @@
+ bool IsUserInGroupBM();
+ #endif
+ 
+-static int CheckNestedDirectories(char * basepath, int depth, 
++static int CheckNestedDirectories(const char* const basepath, int depth,
+                                     int use_sandbox, int isManager, 
+-                                    char * path_to_error
++                                    const char* const path_to_error
+                                 );
+ 
+ #if (! defined(__WXMAC__) && ! defined(_MAC_INSTALLER))
+@@ -500,9 +500,9 @@
+ }
+ 
+ 
+-static int CheckNestedDirectories(char * basepath, int depth, 
++static int CheckNestedDirectories(const char* const basepath, int depth,
+                                     int use_sandbox, int isManager, 
+-                                    char * path_to_error
++                                    const char* const path_to_error
+                                 ) {
+     int             isDirectory;
+     char            full_path[MAXPATHLEN];
+@@ -512,6 +512,7 @@
+     dirent          *dp;
+     static int      errShown = 0;
+ 
++    errno=0;
+     dirp = opendir(basepath);
+     if (dirp == NULL) {
+         // Ideally, all project-created subdirectories under project or slot 
+@@ -523,6 +524,7 @@
+         if ((depth > 1) && (errno == EACCES)) {
+             return 0;
+         } else {
++	    fprintf(stderr,"Could not open directory %s in client/check_security.cpp: CheckNestedDirectories: %s\n",full_path,strerror(errno));
+             retval = -1200;
+         }
+     }
+Index: boinc/client/cs_platforms.cpp
+===================================================================
+--- boinc.orig/client/cs_platforms.cpp	2012-09-02 00:06:07.000000000 +0200
++++ boinc/client/cs_platforms.cpp	2012-09-02 00:08:05.223581101 +0200
+@@ -45,6 +45,7 @@
+ #include <sys/sysctl.h>
+ #endif
+ 
++#include <cerrno>
+ #include "error_numbers.h"
+ #include "filesys.h"
+ #include "str_util.h"
+@@ -180,9 +181,17 @@
+                 int i;
+                 for (i=0; i < nlibdirs; i++) {
+                     struct dirent *entry;
++		    errno=0;
+                     DIR *a = opendir(libdir[i]);
+-                    // if dir doesn't exist, do to the next one
+-                    if (a == 0) continue;
++                    if (a == 0) {
++		       if (ENOENT==errno) {
++                          // if dir doesn't exist, do to the next one
++                       }
++		       else {
++		          fprintf(stderr,"Unexpected problem with directory '%s': %s\n",libdir[i],strerror(errno));
++		       }
++		       continue;
++		    }
+                     // dir exists. read each entry until you find a 32bit lib
+                     while ((support32 == 0) && ((entry=readdir(a)) != 0)) {
+                         strlcpy(cmdline, file[eno], 256);
diff --git a/debian/patches/series b/debian/patches/series
index 1da3d19..7a49d50 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
 # patches to get Debian going
-#texfont_removal.patch
 libnotify-0.7.patch
 # undisputed patches above
 sched_driver_f_free.patch
@@ -69,3 +68,5 @@ opendir_error_messages.patch
 more_maxpathlen.patch
 slot_dir_source_trace.patch
 ignored_return_value.patch
+cppcheck_avoid_redundant_check.patch
+opendir_errno.patch
diff --git a/debian/patches/stream_memory_leak_fix.patch b/debian/patches/stream_memory_leak_fix.patch
index 0535b75..bf200b5 100644
--- a/debian/patches/stream_memory_leak_fix.patch
+++ b/debian/patches/stream_memory_leak_fix.patch
@@ -2,9 +2,19 @@ Author: Steffen Moeller <moeller at debian.org>
 Description: Freeing memory.
 Index: boinc/client/stream.cpp
 ===================================================================
---- boinc.orig/client/stream.cpp	2012-03-18 13:57:51.000000000 +0100
-+++ boinc/client/stream.cpp	2012-03-18 14:09:11.000000000 +0100
-@@ -221,6 +221,8 @@
+--- boinc.orig/client/stream.cpp	2012-09-01 19:25:32.003274299 +0200
++++ boinc/client/stream.cpp	2012-09-01 19:32:16.905800129 +0200
+@@ -118,7 +118,8 @@
+     double *aa=(double *)realloc(a,(N+OFFSET)*sizeof(double));
+     double *bb=(double *)realloc(b,(N+OFFSET)*sizeof(double));
+     double *cc=(double *)realloc(c,(N+OFFSET)*sizeof(double));
+-    if ( !a || !b || !c ) {
++    if ( !aa || !bb || !cc ) {
++        # either of the three reallocations had failed -> free all and return
+ 	if (aa) free(aa) else free(a);
+ 	if (bb) free(bb) else free(b);
+ 	if (cc) free(cc) else free(c);
+@@ -221,6 +222,8 @@
    /* --- Check Results --- */
    checkSTREAMresults(a,b,c);
  

-- 
BOINC packaging



More information about the pkg-boinc-commits mailing list