[boinc_dev] dir_dev redefined error.
Hi boinc developers, the latest boinc doesn't build anymore on linux because of a dir_dev redefined struct http://boinc.berkeley.edu/gitweb/?p=boinc-v2.git;a=commitdiff;h=bfae1032e5c1ac73f2d8d92f93d8383a6cee can anybody please fix that? seems that a typedef should fix the issue, many thanks Gianfranco Sent from Yahoo Mail on Android ___ boinc_dev mailing list boinc_dev@ssl.berkeley.edu http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
Re: [boinc_dev] dir_dev redefined error.
Should be fixed now. - Rom From: Gianfranco Costamagna [mailto:costamagnagianfra...@yahoo.it] Sent: Tuesday, August 26, 2014 2:44 AM To: boinc_dev@ssl berkeley. edu; Rom Walton Subject: dir_dev redefined error. Hi boinc developers, the latest boinc doesn't build anymore on linux because of a dir_dev redefined struct http://boinc.berkeley.edu/gitweb/?p=boinc-v2.git;a=commitdiff;h=bfae1032e5c1ac73f2d8d92f93d8383a6cee can anybody please fix that? seems that a typedef should fix the issue, many thanks Gianfranco Sent from Yahoo Mail on Android https://uk.overview.mail.yahoo.com/mobile/?.src=Android ___ boinc_dev mailing list boinc_dev@ssl.berkeley.edu http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
[boinc_dev] Bug in Boinc server python md5 tools
Hello, I've started writing a custom assimilator/validator duo for my boinc application. I've been looking at the python tools, and it looks like the md5 utilities located in py/Boinc/tools.py are not working properly. Attached is a small patch that seems to work, although the fix is pretty simple and the changes are included below so you don't have to load up the patch to see them. The patch was created from the master branch, cloned 08/26/2014. Thanks, Bill In md5_file (line 35), change lines 43-46 try: checksum = md5() except NameError: checksum = md5.new() to try: checksum = md5.new() except ValueError: checksum = md5.new('md5') and in get_output_file_path (line 75), change line 81 s = md5.new(filename).hexdigest()[1:8] to try: s = md5.new(filename).hexdigest()[1:8] except ValueError: s = md5.new('md5', string=filename).hexdigest()[1:8] From 5c68ebcc2344fed5493d9ffd60cbe874cb7e1cc7 Mon Sep 17 00:00:00 2001 From: Bill Flynn wfly...@gmail.com Date: Tue, 26 Aug 2014 16:02:01 -0400 Subject: [PATCH] Fixed md5 bugs in py/Boinc/tools.py --- py/Boinc/tools.py | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/py/Boinc/tools.py b/py/Boinc/tools.py index fa06c1d..36d77f7 100644 --- a/py/Boinc/tools.py +++ b/py/Boinc/tools.py @@ -35,15 +35,15 @@ def make_uuid(): def md5_file(path): Return a 16-digit MD5 hex digest of a file's contents -Read the file in chunks +Read the file in chunks chunk = 8096 try: -checksum = md5() -except NameError: checksum = md5.new() +except ValueError: +checksum = md5.new('md5') fp = open(path, 'r') while True: @@ -78,6 +78,9 @@ def get_output_file_path(filename): config = configxml.default_config() fanout = long(config.config.uldl_dir_fanout) -s = md5.new(filename).hexdigest()[1:8] +try: +s = md5.new(filename).hexdigest()[1:8] +except ValueError: +s = md5.new('md5', string=filename).hexdigest()[1:8] x = long(s, 16) -return %s/%x/%s % (config.config.upload_dir, x % fanout, filename) +return %s/%x/%s % (config.config.upload_dir, x % fanout, filename) -- 1.9.1 ___ boinc_dev mailing list boinc_dev@ssl.berkeley.edu http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
Re: [boinc_dev] Bug in Boinc server python md5 tools
Apologies, that last patch and changes are wrong, although the original source gives me errors still. The problem is this: Using Boinc.tools.get_output_file_path, md5.new raises a TypeError. The even smaller only adds a try/except there to catch those and produce the correct path. Bill On Tue, Aug 26, 2014 at 4:04 PM, Bill Flynn wfly...@gmail.com wrote: Hello, I've started writing a custom assimilator/validator duo for my boinc application. I've been looking at the python tools, and it looks like the md5 utilities located in py/Boinc/tools.py are not working properly. Attached is a small patch that seems to work, although the fix is pretty simple and the changes are included below so you don't have to load up the patch to see them. The patch was created from the master branch, cloned 08/26/2014. Thanks, Bill In md5_file (line 35), change lines 43-46 try: checksum = md5() except NameError: checksum = md5.new() to try: checksum = md5.new() except ValueError: checksum = md5.new('md5') and in get_output_file_path (line 75), change line 81 s = md5.new(filename).hexdigest()[1:8] to try: s = md5.new(filename).hexdigest()[1:8] except ValueError: s = md5.new('md5', string=filename).hexdigest()[1:8] From a4f6bd4b12b73f40e0876b9a183501befb837e27 Mon Sep 17 00:00:00 2001 From: Bill Flynn wfly...@gmail.com Date: Tue, 26 Aug 2014 16:44:37 -0400 Subject: [PATCH] RE: Fixed md5 bugs in py/Boinc/tools.py --- py/Boinc/tools.py | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/py/Boinc/tools.py b/py/Boinc/tools.py index fa06c1d..3600e24 100644 --- a/py/Boinc/tools.py +++ b/py/Boinc/tools.py @@ -35,14 +35,14 @@ def make_uuid(): def md5_file(path): Return a 16-digit MD5 hex digest of a file's contents -Read the file in chunks +Read the file in chunks chunk = 8096 try: checksum = md5() -except NameError: +except TypeError: checksum = md5.new() fp = open(path, 'r') @@ -78,6 +78,9 @@ def get_output_file_path(filename): config = configxml.default_config() fanout = long(config.config.uldl_dir_fanout) -s = md5.new(filename).hexdigest()[1:8] +try: +s = md5(filename).hexdigest()[1:8] +except TypeError: +s = md5.new(filename).hexdigest()[1:8] x = long(s, 16) -return %s/%x/%s % (config.config.upload_dir, x % fanout, filename) +return %s/%x/%s % (config.config.upload_dir, x % fanout, filename) -- 1.9.1 ___ boinc_dev mailing list boinc_dev@ssl.berkeley.edu http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
Re: [boinc_dev] Bug in Boinc server python md5 tools
Thanks; I committed this. If anyone else is doing validate/assimilate in Python, please test this change. -- David On 26-Aug-2014 1:45 PM, Bill Flynn wrote: Apologies, that last patch and changes are wrong, although the original source gives me errors still. The problem is this: Using Boinc.tools.get_output_file_path, md5.new raises a TypeError. The even smaller only adds a try/except there to catch those and produce the correct path. Bill On Tue, Aug 26, 2014 at 4:04 PM, Bill Flynn wfly...@gmail.com wrote: Hello, I've started writing a custom assimilator/validator duo for my boinc application. I've been looking at the python tools, and it looks like the md5 utilities located in py/Boinc/tools.py are not working properly. Attached is a small patch that seems to work, although the fix is pretty simple and the changes are included below so you don't have to load up the patch to see them. The patch was created from the master branch, cloned 08/26/2014. Thanks, Bill In md5_file (line 35), change lines 43-46 try: checksum = md5() except NameError: checksum = md5.new() to try: checksum = md5.new() except ValueError: checksum = md5.new('md5') and in get_output_file_path (line 75), change line 81 s = md5.new(filename).hexdigest()[1:8] to try: s = md5.new(filename).hexdigest()[1:8] except ValueError: s = md5.new('md5', string=filename).hexdigest()[1:8] ___ boinc_dev mailing list boinc_dev@ssl.berkeley.edu http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address. ___ boinc_dev mailing list boinc_dev@ssl.berkeley.edu http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.