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

Gianfranco Costamagna costamagnagianfranco at yahoo.it
Sat Dec 8 11:16:00 UTC 2012


The following commit has been merged in the master branch:
commit a31ea4ac278509f09562e603427c8e649bda8877
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date:   Sat Dec 8 11:25:47 2012 +0100

    Preparing for 7.0.40 patch refresh and deleted some unused patches already applied upstream
    Added some const to slot_dir_source_trace.patch (already declared in .h file)

diff --git a/debian/changelog b/debian/changelog
index b1eeaa8..e123748 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+boinc (7.0.40+dfsg-1) UNRELEASED; urgency=low
+
+  * New upstream version
+  * Dropped mac_addresses_cores_in_kfreebsd.patch (file to patch deleted upstream) and ensure_there_is_no_newline_in_passwd.patch (applied upstream)
+  * Revised slot_dir_source_trace.patch
+  * Removed some old patches
+
+ -- Gianfranco Costamagna <costamagnagianfranco at yahoo.it>  Sat, 08 Dec 2012 01:26:23 +0100
+
 boinc (7.0.39+dfsg-1) UNRELEASED; urgency=low
 
   * New upstram version
diff --git a/debian/patches/boinclib_shared.patch b/debian/patches/boinclib_shared.patch
index 275ba8b..1de8c82 100644
--- a/debian/patches/boinclib_shared.patch
+++ b/debian/patches/boinclib_shared.patch
@@ -1,7 +1,5 @@
-Index: boinc/lib/Makefile.am
-===================================================================
---- boinc.orig/lib/Makefile.am	2012-06-30 22:00:36.063690282 +0200
-+++ boinc/lib/Makefile.am	2012-06-30 22:01:07.023273444 +0200
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
 @@ -146,13 +146,13 @@
  libboinc_la_SOURCES = $(generic_sources) $(mac_sources)
  libboinc_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
@@ -28,11 +26,9 @@ Index: boinc/lib/Makefile.am
 +parse_test_SOURCES = parse_test.cpp
  parse_test_CXXFLAGS = $(PTHREAD_CFLAGS)
  parse_test_LDADD = $(LIBBOINC)
-Index: boinc/client/Makefile.am
-===================================================================
---- boinc.orig/client/Makefile.am	2012-06-30 21:59:09.960849517 +0200
-+++ boinc/client/Makefile.am	2012-06-30 22:01:07.027273390 +0200
-@@ -88,7 +88,7 @@
+--- a/client/Makefile.am
++++ b/client/Makefile.am
+@@ -89,7 +89,7 @@
  if OS_DARWIN
  boinc_client_LDFLAGS += -Wl,-flat_namespace,-undefined,dynamic_lookup
  endif
diff --git a/debian/patches/client_stream_realloc.patch b/debian/patches/client_stream_realloc.patch
deleted file mode 100644
index 467b071..0000000
--- a/debian/patches/client_stream_realloc.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Author: Steffen Moeller <moeller at debian.org>
-Description: Improved handling of realloc errors, which again 
- can need some help.
-Index: boinc/client/stream.cpp
-===================================================================
---- boinc.orig/client/stream.cpp	2012-03-27 18:56:34.504622172 +0200
-+++ boinc/client/stream.cpp	2012-03-30 18:36:08.574177473 +0200
-@@ -95,6 +95,12 @@
-   double  *a=(double *)malloc((N+OFFSET)*sizeof(double));
-   double  *b=(double *)malloc((N+OFFSET)*sizeof(double));
-   double  *c=(double *)malloc((N+OFFSET)*sizeof(double));
-+  if ( !a || !b || !c ) {
-+      if (a) free(a);
-+      if (b) free(b);
-+      if (c) free(c);
-+      return;
-+  }
-   double   quantum=checktick();
-   int   BytesPerWord;
-   register int j, k;
-@@ -109,10 +115,16 @@
-   int check_cache=(cache_size==0);
-   do {
-     N*=2;
--    a=(double *)realloc(a,(N+OFFSET)*sizeof(double));
--    b=(double *)realloc(b,(N+OFFSET)*sizeof(double));
--    c=(double *)realloc(c,(N+OFFSET)*sizeof(double));
--    if ( !a || !b || !c ) return;
-+    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) free(aa) else free(a);
-+	if (bb) free(bb) else free(b);
-+	if (cc) free(cc) else free(c);
-+	return;
-+    }
-+    a=aa; b=bb; c=cc;
- 
-     for (j=0; j<N; j++) {
-       a[j] = 1.0;
diff --git a/debian/patches/ensure_there_is_no_newline_in_passwd.patch b/debian/patches/ensure_there_is_no_newline_in_passwd.patch
deleted file mode 100644
index 368431e..0000000
--- a/debian/patches/ensure_there_is_no_newline_in_passwd.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: boinc/configure.ac
-===================================================================
---- boinc.orig/configure.ac	2012-06-30 22:00:21.975879957 +0200
-+++ boinc/configure.ac	2012-06-30 22:05:20.819855979 +0200
-@@ -894,12 +894,12 @@
- 
- dnl Some info about the person compiling used for making some packages.
- LOGNAME=`${WHOAMI}`
--FULLNAME=`grep ^${LOGNAME}: /etc/passwd | awk -F: '{print $5}'`
-+FULLNAME=`grep ^${LOGNAME}: /etc/passwd | head -n 1 | awk -F: '{print $5}'`
- if test -z "${FULLNAME}" ; then
--  FULLNAME=`ypcat passwd 2>/dev/null | grep ^${LOGNAME}: | awk -F: '{print $5}'`
-+  FULLNAME=`ypcat passwd 2>/dev/null | grep ^${LOGNAME}: | head -n 1 | awk -F: '{print $5}'`
- fi
- if test -z "${FULLNAME}" ; then
--  FULLNAME=`nidump passwd / 2>/dev/null | grep ^${LOGNAME}: | awk -F: '{print $5}'`
-+  FULLNAME=`nidump passwd / 2>/dev/null | grep ^${LOGNAME}: | head -n 1 | awk -F: '{print $5}'`
- fi
- if test -z "${FULLNAME}" ; then
-   FULLNAME=$LOGNAME
diff --git a/debian/patches/improve_opendir_warning.patch b/debian/patches/improve_opendir_warning.patch
index 67dabe7..f44c815 100644
--- a/debian/patches/improve_opendir_warning.patch
+++ b/debian/patches/improve_opendir_warning.patch
@@ -1,11 +1,9 @@
 Author: Steffen Moeller <moeller at debian.org>
 Description: Helping verbosity of error messages.
 
-Index: boinc/lib/filesys.cpp
-===================================================================
---- boinc.orig/lib/filesys.cpp	2012-07-07 21:53:21.100352017 +0800
-+++ boinc/lib/filesys.cpp	2012-07-07 21:54:18.016352939 +0800
-@@ -137,7 +137,10 @@
+--- a/lib/filesys.cpp
++++ b/lib/filesys.cpp
+@@ -144,7 +144,10 @@
      dirp->handle = INVALID_HANDLE_VALUE;
  #else
      dirp = opendir(p);
diff --git a/debian/patches/libnotify-0.7.patch b/debian/patches/libnotify-0.7.patch
index 417a5ed..2143f5d 100644
--- a/debian/patches/libnotify-0.7.patch
+++ b/debian/patches/libnotify-0.7.patch
@@ -2,11 +2,9 @@ Author: Steffen Moeller <moeller at debian.org>
 Description: Later versions of Debian come with libnotify 0.7.
 Disclaimer: For backports, this patch needs to be disabled.
 
-Index: boinc/clientgui/Makefile.am
-===================================================================
---- boinc.orig/clientgui/Makefile.am	2012-03-31 12:34:56.392088389 +0200
-+++ boinc/clientgui/Makefile.am	2012-03-31 12:38:41.129017444 +0200
-@@ -118,9 +118,13 @@
+--- a/clientgui/Makefile.am
++++ b/clientgui/Makefile.am
+@@ -117,9 +117,13 @@
      ../lib/error_numbers.h \
      locale $(mac_headers)
  
@@ -23,11 +21,9 @@ Index: boinc/clientgui/Makefile.am
  
  win_config.h: $(top_srcdir)/config.h
  	grep '#define.*BOINC.*VERSION' $^ > $@
-Index: boinc/configure.ac
-===================================================================
---- boinc.orig/configure.ac	2012-03-31 12:34:56.944080840 +0200
-+++ boinc/configure.ac	2012-03-31 12:38:41.133017390 +0200
-@@ -695,14 +695,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -725,14 +725,12 @@
  
  dnl ---------- libNotify --------------------------------------------------
  if test "${enable_manager}" = yes ; then
@@ -47,7 +43,7 @@ Index: boinc/configure.ac
  fi
  
  dnl ---------- Sqlite3 ----------------------------------------------------
-@@ -846,7 +844,7 @@
+@@ -876,7 +874,7 @@
     ],
    [enable_wx_debug="no"])
  
diff --git a/debian/patches/mac_addresses_cores_in_kfreebsd.patch b/debian/patches/mac_addresses_cores_in_kfreebsd.patch
deleted file mode 100644
index aeb2e3b..0000000
--- a/debian/patches/mac_addresses_cores_in_kfreebsd.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Author: Steffen Moeller <moeller at debian.org>
-Description: Helping verbosity of error messages.
-
-Index: boinc/lib/mac_address.cpp
-===================================================================
---- boinc.orig/lib/mac_address.cpp	2012-08-01 20:52:26.394691521 +0200
-+++ boinc/lib/mac_address.cpp	2012-08-01 20:52:31.046628633 +0200
-@@ -145,6 +145,10 @@
- 
- bool
- get_mac_addresses(char* addresses) {
-+    if (!addresses) {
-+        perror("get_mac_addresses: 'addresses' parameter was NULL");
-+        return false;
-+    }
- #if defined(_WIN32)
-     IP_ADAPTER_INFO AdapterInfo[16]; // Allocate information for up to 16 NICs
- 	DWORD dwBufLen = sizeof(AdapterInfo); // Save memory size of buffer
-@@ -265,6 +269,10 @@
-         }
-         hw_addr=(struct ether_addr *)&(item->lifr_lifru.lifru_enaddr);  
- #endif
-+        if (!hw_addr) {
-+            perror("get_mac_addresses: Could not determine hw_addr");
-+            return false;
-+        }
-         strcat(addresses, delimiter);
-         delimiter[0] = ':';
-         delimiter[1] = '\0';
diff --git a/debian/patches/more_maxpathlen.patch b/debian/patches/more_maxpathlen.patch
index 2596ae4..c351da7 100644
--- a/debian/patches/more_maxpathlen.patch
+++ b/debian/patches/more_maxpathlen.patch
@@ -1,7 +1,5 @@
-Index: boinc/api/graphics2_util.cpp
-===================================================================
---- boinc.orig/api/graphics2_util.cpp	2012-09-15 18:20:11.920438137 +0200
-+++ boinc/api/graphics2_util.cpp	2012-09-16 21:27:07.961955315 +0200
+--- a/api/graphics2_util.cpp
++++ b/api/graphics2_util.cpp
 @@ -37,7 +37,7 @@
  static key_t get_shmem_name(const char* prog_name) {
      char cwd[MAXPATHLEN], path[MAXPATHLEN];
@@ -20,11 +18,9 @@ Index: boinc/api/graphics2_util.cpp
  }
  #endif
  
-Index: boinc/lib/filesys.cpp
-===================================================================
---- boinc.orig/lib/filesys.cpp	2012-09-16 21:27:07.901956127 +0200
-+++ boinc/lib/filesys.cpp	2012-09-16 21:30:01.147609631 +0200
-@@ -426,7 +426,7 @@
+--- a/lib/filesys.cpp
++++ b/lib/filesys.cpp
+@@ -433,7 +433,7 @@
      while (1) {
          retval = dir_scan(filename, dirp, sizeof(filename));
          if (retval) break;
@@ -33,7 +29,7 @@ Index: boinc/lib/filesys.cpp
  
          if (is_dir(subdir)) {
              if (recurse) {
-@@ -544,8 +544,8 @@
+@@ -551,8 +551,8 @@
      }
      return 0;
  #elif defined(__EMX__)
@@ -44,7 +40,7 @@ Index: boinc/lib/filesys.cpp
      return system(cmd);
  #else
      // POSIX requires that shells run from an application will use the 
-@@ -668,7 +668,7 @@
+@@ -675,7 +675,7 @@
          p = strchr(q, '/');
          if (!p) break;
          *p = 0;
@@ -53,10 +49,8 @@ Index: boinc/lib/filesys.cpp
          retval = boinc_mkdir(newpath);
          if (retval) return retval;
          strcpy(oldpath, newpath);
-Index: boinc/lib/network.cpp
-===================================================================
---- boinc.orig/lib/network.cpp	2012-09-15 18:20:16.860372380 +0200
-+++ boinc/lib/network.cpp	2012-09-16 21:27:07.973955156 +0200
+--- a/lib/network.cpp
++++ b/lib/network.cpp
 @@ -70,7 +70,7 @@
      case WSAENOTSOCK:
          return "not a socket";
diff --git a/debian/patches/opendir_error_messages.patch b/debian/patches/opendir_error_messages.patch
index adda253..eddc472 100644
--- a/debian/patches/opendir_error_messages.patch
+++ b/debian/patches/opendir_error_messages.patch
@@ -1,8 +1,6 @@
-Index: boinc/lib/filesys.cpp
-===================================================================
---- boinc.orig/lib/filesys.cpp	2012-08-17 15:54:07.000000000 +0200
-+++ boinc/lib/filesys.cpp	2012-08-17 16:00:33.580867206 +0200
-@@ -578,9 +582,9 @@
+--- a/lib/filesys.cpp
++++ b/lib/filesys.cpp
+@@ -585,9 +585,9 @@
      fclose(src);
      fclose(dst);
      // Copy file's ownership, permissions to the extent we are allowed
@@ -15,10 +13,8 @@ Index: boinc/lib/filesys.cpp
      return retval;
  #endif
  }
-Index: boinc/lib/diagnostics.cpp
-===================================================================
---- boinc.orig/lib/diagnostics.cpp	2012-08-17 15:47:19.767548254 +0200
-+++ boinc/lib/diagnostics.cpp	2012-08-17 15:54:07.000000000 +0200
+--- a/lib/diagnostics.cpp
++++ b/lib/diagnostics.cpp
 @@ -75,14 +75,14 @@
  
  static int         diagnostics_initialized = false;
@@ -66,10 +62,8 @@ Index: boinc/lib/diagnostics.cpp
  				else if (parse_int(buf, "<http_server_port>", proxy_port)) continue;
  			}
  			fclose(p);
-Index: boinc/client/sandbox.cpp
-===================================================================
---- boinc.orig/client/sandbox.cpp	2012-08-17 15:47:19.771548200 +0200
-+++ boinc/client/sandbox.cpp	2012-08-17 15:54:07.000000000 +0200
+--- a/client/sandbox.cpp
++++ b/client/sandbox.cpp
 @@ -207,7 +207,7 @@
          strcpy(filename, "");
          retval = dir_scan(filename, dirp, sizeof(filename));
diff --git a/debian/patches/series b/debian/patches/series
index c7673ac..dc2ae07 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,7 +4,6 @@ libnotify-0.7.patch
 sched_driver_f_free.patch
 improve_opendir_warning.patch
 termios_is_everywhere.patch
-mac_addresses_cores_in_kfreebsd.patch
 stripchart_debian.patch
 upstream_sztaki_configureEval.patch
 generate_less.patch
@@ -17,14 +16,11 @@ stripchart_security.patch
 #andYetMorePatches04.patch
 #convinceDavid#cwd_handling.patch
 parse_issues.patch
-#client_stream_realloc.patch #stream.cpp has been deleted in .38 release
 # --- A
 #convinceDavid# bug672328  MoreInformativeAppStartFailure.patch
 #send to David#
-#stream_memory_leak_fix.patch #stream.cpp has been deleted in .38 release
 #SETIprobCandidate#app_ipc_uninitialised_A_reorder.patch
 #SETIprobCandidate#app_ipc_uninitialised_B_buffer.patch
-#uninitialised_client_states.patch # this variable has been removed between 36 and 38 release 
 # --- B 
 #tmpA# add_init_to_client_state_constructor.patch
 #convinceDavid# client_path_char_array_length.patch
@@ -52,7 +48,6 @@ opendir_error_messages.patch
 sched_driver_char_buffers.patch
 csh2tcsh.patch
 #socklenBuildFixByDavid.patch
-ensure_there_is_no_newline_in_passwd.patch
 add_hardening_flags.patch
 cmath_missing.patch
 investigate_boinc_api.patch
diff --git a/debian/patches/slot_dir_source_trace.patch b/debian/patches/slot_dir_source_trace.patch
index da5b145..4780cd3 100644
--- a/debian/patches/slot_dir_source_trace.patch
+++ b/debian/patches/slot_dir_source_trace.patch
@@ -126,8 +126,15 @@
      struct stat sbuf;
  #ifdef _WIN32
      int retval = stat(path, &sbuf);
-@@ -106,7 +106,7 @@
-     return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFDIR));
+@@ -108,19 +108,19 @@
+ 
+ #ifndef _WIN32
+ 
+-int is_file_follow_symlinks(const char* path) {
++int is_file_follow_symlinks(const char* const path) {
+     struct stat sbuf;
+     int retval = stat(path, &sbuf);
+     return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFREG));
  }
  
 -int is_dir_follow_symlinks(const char* path) {
@@ -135,16 +142,14 @@
      struct stat sbuf;
      int retval = stat(path, &sbuf);
      return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFDIR));
-@@ -113,7 +113,7 @@
  }
  
- #ifndef _WIN32
 -int is_symlink(const char* path) {
 +int is_symlink(const char* const path) {
      struct stat sbuf;
      int retval = lstat(path, &sbuf);
      return (!retval && S_ISLNK(sbuf.st_mode));
-@@ -122,13 +122,13 @@
+@@ -129,7 +129,7 @@
  
  // Open a directory
  //
@@ -153,28 +158,7 @@
      DIRREF dirp;
  #ifdef _WIN32
      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,9 +136,12 @@
-     strcat(dirp->path, "\\*");
-     dirp->handle = INVALID_HANDLE_VALUE;
- #else
-+    errno=0;
-     dirp = opendir(p);
-     if (!dirp) {
--        fprintf(stderr,"dir_open: Could not open directory '%s'.\n",p);
-+        char whereami[MAXPATHLEN];
-+	boinc_getcwd(whereami);
-+        fprintf(stderr,"lib/filesys.cpp: Could not open directory '%s' from directory '%s': %s.\n",p,whereami,strerror(errno));
-         return NULL;
-     }
- #endif
-@@ -208,7 +211,7 @@
+@@ -215,7 +215,7 @@
  #endif
  }
  
@@ -183,19 +167,43 @@
      char file[MAXPATHLEN];
  
      DIRREF dir = dir_open(p);
-@@ -228,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));
-+    }
+@@ -295,7 +295,7 @@
  #endif
  }
  
-@@ -362,7 +369,7 @@
+-static int boinc_delete_file_aux(const char* path) {
++static int boinc_delete_file_aux(const char* const path) {
+ #ifdef _WIN32
+     if (!DeleteFileA(path)) {
+         return ERR_UNLINK;
+@@ -309,7 +309,7 @@
+ 
+ // Delete the file located at path
+ //
+-int boinc_delete_file(const char* path) {
++int boinc_delete_file(const char* const path) {
+     int retval = 0;
+ 
+     if (!boinc_file_exists(path)) {
+@@ -333,7 +333,7 @@
+ 
+ // get file size
+ //
+-int file_size(const char* path, double& size) {
++int file_size(const char* const path, double& size) {
+     int retval;
+ 
+ #if defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__MINGW32__)
+@@ -348,7 +348,7 @@
+     return 0;
+ }
+ 
+-int boinc_truncate(const char* path, double size) {
++int boinc_truncate(const char* const path, double size) {
+     int retval;
+ #if defined(_WIN32) && !defined(__CYGWIN32__)
+     // the usual Windows nightmare.
+@@ -369,7 +369,7 @@
  
  // remove everything from specified directory
  //
@@ -204,7 +212,52 @@
      char filename[MAXPATHLEN], path[MAXPATHLEN];
      int retval;
      DIRREF dirp;
-@@ -613,7 +620,7 @@
+@@ -397,7 +397,7 @@
+ // Win: use special version because stat() is slow, can be avoided
+ // Unix: follow symbolic links
+ //
+-int dir_size(const char* dirpath, double& size, bool recurse) {
++int dir_size(const char* const dirpath, double& size, bool recurse) {
+ #ifdef WIN32
+     char path2[_MAX_PATH];
+     sprintf(path2, "%s/*", dirpath);
+@@ -452,7 +452,7 @@
+     return 0;
+ }
+ 
+-FILE* boinc_fopen(const char* path, const char* mode) {
++FILE* boinc_fopen(const char* const path, const char* mode) {
+     // if opening for read, and file isn't there,
+     // leave now (avoid 5-second delay!!)
+     //
+@@ -503,7 +503,7 @@
+ }
+ 
+ 
+-int boinc_file_exists(const char* path) {
++int boinc_file_exists(const char* const path) {
+     struct stat buf;
+     if (stat(path, &buf)) {
+         return false;     // stat() returns zero on success
+@@ -513,7 +513,7 @@
+ 
+ // same, but doesn't traverse symlinks
+ //
+-int boinc_file_or_symlink_exists(const char* path) {
++int boinc_file_or_symlink_exists(const char* const path) {
+     struct stat buf;
+ #ifdef _WIN32
+     if (stat(path, &buf)) {
+@@ -527,7 +527,7 @@
+ 
+ // returns zero on success, nonzero if didn't touch file
+ //
+-int boinc_touch_file(const char *path) {
++int boinc_touch_file(const char* const path) {
+ 
+     if (boinc_file_exists(path)) {
+         return 0;
+@@ -620,7 +620,7 @@
  
  // make a dir that's owner and group RWX
  //
@@ -213,7 +266,7 @@
      if (is_dir(path)) return 0;
  #ifdef _WIN32
      if (!CreateDirectoryA(path, NULL)) {
-@@ -628,7 +635,7 @@
+@@ -635,7 +635,7 @@
      return 0;
  }
  
@@ -222,16 +275,16 @@
  #ifdef _WIN32
      if (!RemoveDirectoryA(name)) {
          return ERR_RMDIR;
-@@ -641,7 +648,7 @@
+@@ -648,7 +648,7 @@
  }
  
  #ifndef _WIN32
 -int boinc_chown(const char* path, gid_t gid) {
-+int boinc_chown(const char* const path, const gid_t gid) {
++int boinc_chown(const char* const path, gid_t gid) {
      if (gid) {
          if (chown(path, (uid_t)-1, gid)) {
              return ERR_CHOWN;
-@@ -654,7 +661,7 @@
+@@ -661,7 +661,7 @@
  // if "filepath" is of the form a/b/c,
  // create directories dirpath/a, dirpath/a/b etc.
  //
@@ -240,16 +293,7 @@
      char buf[MAXPATHLEN], oldpath[MAXPATHLEN], newpath[MAXPATHLEN];
      int retval;
      char *p, *q;
-@@ -721,7 +728,7 @@
-     return 0;
- }
- 
--int FILE_LOCK::unlock(const char* filename) {
-+int FILE_LOCK::unlock(const char* const filename) {
- #if defined(_WIN32) && !defined(__CYGWIN32__)
-     CloseHandle(handle);
- #else
-@@ -733,7 +740,7 @@
+@@ -740,7 +740,7 @@
      return 0;
  }
  
@@ -258,7 +302,7 @@
  #ifdef _WIN32
      getcwd(path, MAXPATHLEN);
  #else
-@@ -745,7 +752,7 @@
+@@ -752,7 +752,7 @@
  #endif
  }
  
@@ -267,16 +311,16 @@
      boinc_getcwd(path);
      if (strlen(relname)) {
          strcat(path, "/");
-@@ -756,7 +763,7 @@
+@@ -763,7 +763,7 @@
  // get total and free space on current filesystem (in bytes)
  //
- #ifdef _WIN32
--int get_filesystem_info(double &total_space, double &free_space, char*) {
-+int get_filesystem_info(double &total_space, double &free_space, const char* const) {
-     char cwd[MAXPATHLEN];
-     boinc_getcwd(cwd);
-     FreeFn pGetDiskFreeSpaceEx;
-@@ -789,7 +796,7 @@
+ #if defined(_WIN32) && !(defined(WXDEBUG) || defined(WXNDEBUG))
+-int boinc_allocate_file(const char* path, double size) {
++int boinc_allocate_file(const char* const path, double size) {
+     int retval = 0;
+     HANDLE h = CreateFile(
+         path,
+@@ -823,7 +823,7 @@
          total_space = (double)dwTotalClusters * dwSectPerClust * dwBytesPerSect;
      }
  #else
@@ -287,13 +331,24 @@
  
 --- a/lib/filesys.h
 +++ b/lib/filesys.h
-@@ -47,19 +47,19 @@
-   extern FILE* boinc_fopen(const char* path, const char* mode);
+@@ -42,30 +42,30 @@
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+-  extern int boinc_delete_file(const char*);
+-  extern int boinc_touch_file(const char *path);
+-  extern FILE* boinc_fopen(const char* path, const char* mode);
++  extern int boinc_delete_file(const char* const);
++  extern int boinc_touch_file(const char* const path);
++  extern FILE* boinc_fopen(const char* const path, const char* mode);
    extern int boinc_copy(const char* orig, const char* newf);
    extern int boinc_rename(const char* old, const char* newf);
 -  extern int boinc_mkdir(const char*);
 +  extern int boinc_mkdir(const char* const);
- #ifndef _WIN32
+ #ifdef _WIN32
+-  extern int boinc_allocate_file(const char*, double size);
++  extern int boinc_allocate_file(const char* const, double size);
+ #else
 -  extern int boinc_chown(const char*, gid_t);
 +  extern int boinc_chown(const char* const, const gid_t);
  #endif
@@ -303,21 +358,29 @@
 -  extern int boinc_make_dirs(const char*, const char*);
 +  extern int boinc_rmdir(const char* const);
 +  extern void boinc_getcwd(/* not const*/ char* const);
-+  extern void relative_to_absolute(const char* const relname, char* const path);
++  extern void relative_to_absolute(const char* const relname, /* not const*/ char* const path);
 +  extern int boinc_make_dirs(const char* const, const char* const);
    extern char boinc_failed_file[MAXPATHLEN];
 -  extern int is_file(const char* path);
 -  extern int is_dir(const char* path);
+-  extern int is_file_follow_symlinks(const char* path);
 -  extern int is_dir_follow_symlinks(const char* path);
 -  extern int is_symlink(const char* path);
+-  extern int boinc_truncate(const char*, double);
+-  extern int boinc_file_exists(const char* path);
+-  extern int boinc_file_or_symlink_exists(const char* path);
 +  extern int is_file(const char* const path);
 +  extern int is_dir(const char* const path);
++  extern int is_file_follow_symlinks(const char* const path);
 +  extern int is_dir_follow_symlinks(const char* const path);
 +  extern int is_symlink(const char* const path);
-   extern int boinc_truncate(const char*, double);
-   extern int boinc_file_exists(const char* path);
-   extern int boinc_file_or_symlink_exists(const char* path);
-@@ -71,10 +71,10 @@
++  extern int boinc_truncate(const char* const, double);
++  extern int boinc_file_exists(const char* const path);
++  extern int boinc_file_or_symlink_exists(const char* const path);
+ 
+ #ifdef __cplusplus
+ }
+@@ -74,10 +74,10 @@
  /* C++ specific prototypes/defines follow here */
  #ifdef __cplusplus
  
@@ -332,7 +395,7 @@
  
  // TODO TODO TODO
  // remove this code - the DirScanner class does the same thing.
-@@ -96,7 +96,7 @@
+@@ -99,7 +99,7 @@
  extern int dir_scan(std::string&, DIRREF);
  extern void dir_close(DIRREF);
  
diff --git a/debian/patches/stream_memory_leak_fix.patch b/debian/patches/stream_memory_leak_fix.patch
deleted file mode 100644
index bf200b5..0000000
--- a/debian/patches/stream_memory_leak_fix.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Author: Steffen Moeller <moeller at debian.org>
-Description: Freeing memory.
-Index: boinc/client/stream.cpp
-===================================================================
---- 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);
- 
-+  /* --- Release prior allocated memory --- */
-+  free(a); free(b); free(c);
- }
- 
- # define M 20
diff --git a/debian/patches/uninitialised_client_states.patch b/debian/patches/uninitialised_client_states.patch
deleted file mode 100644
index d67f9d4..0000000
--- a/debian/patches/uninitialised_client_states.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Author: Steffen Moeller <moeller at debian.org>
-Description: Valgrind indicated some values for a jump not to be initialised. This addresses it.
-Index: boinc/client/client_state.cpp
-===================================================================
---- boinc.orig/client/client_state.cpp	2012-08-01 20:52:04.530987091 +0200
-+++ boinc/client/client_state.cpp	2012-08-01 20:52:48.338394869 +0200
-@@ -142,7 +142,7 @@
- #endif
-     launched_by_manager = false;
-     initialized = false;
--    last_wakeup_time = dtime();
-+    client_start_time = now = last_wakeup_time = dtime();
- }
- 
- void CLIENT_STATE::show_host_info() {
diff --git a/debian/patches/upstream_sztaki_configureEval.patch b/debian/patches/upstream_sztaki_configureEval.patch
index b71ab1e..2111582 100644
--- a/debian/patches/upstream_sztaki_configureEval.patch
+++ b/debian/patches/upstream_sztaki_configureEval.patch
@@ -1,9 +1,7 @@
 Author: Unknown
-Index: boinc/configure.ac
-===================================================================
---- boinc.orig/configure.ac	2011-07-24 22:44:11.000000000 +0200
-+++ boinc/configure.ac	2011-07-24 22:44:26.000000000 +0200
-@@ -277,6 +277,20 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -282,6 +282,20 @@
  
  AC_SUBST([TOP_BUILD_DIR], [`pwd`])
  
@@ -24,10 +22,8 @@ Index: boinc/configure.ac
  ## commented this out to turn all maintainer-mode features ON by default,
  ## such as automatic reconfiguring on changes in Makefile.am's and configure.ac
  ## AM_MAINTAINER_MODE
-Index: boinc/tools/update_versions
-===================================================================
---- boinc.orig/tools/update_versions	2011-07-24 22:45:22.000000000 +0200
-+++ boinc/tools/update_versions	2011-07-24 22:45:46.000000000 +0200
+--- a/tools/update_versions
++++ b/tools/update_versions
 @@ -1,4 +1,4 @@
 -#! /usr/bin/env php
 +#!/usr/bin/php

-- 
BOINC packaging



More information about the pkg-boinc-commits mailing list