3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/d1572a4a0f52/
Changeset: d1572a4a0f52
Branch: tool_shed_checksum
User: Bjoern Gruening
Date: 2014-06-29 21:35:02
Summary: With that PR the Tool Shed will be able to get checksums from the Tool Developer.
These checksums will be verified after download and in case of an mismatch an error is thrown.
Currently, md5 and sha256 checksums are supported.
Example:
<package>https://pypi.python.org/packages/source/k/khmer/khmer-1.0.tar.gz#md5=b60639…</package>
Affected #: 1 file
diff -r 7b424e9c2e57ec12eca26f35c8f4259bbcc55cdb -r d1572a4a0f529fb20f2c7036eb7dfed19563ac89 lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
@@ -8,6 +8,7 @@
import time
import urllib2
import zipfile
+import hashlib
from galaxy.util import asbool
from galaxy.util.template import fill_template
@@ -139,10 +140,29 @@
class Download( object ):
def url_download( self, install_dir, downloaded_file_name, download_url, extract=True ):
+ """
+ The given download_url can have an extension like #md5# or #sha256#.
+ This indicates a checksum which will be chekced after download.
+ If the checksum does not match an exception is thrown.
+
+ https://pypi.python.org/packages/source/k/khmer/khmer-1.0.tar.gz#md5#b60639…
+ """
+
file_path = os.path.join( install_dir, downloaded_file_name )
src = None
dst = None
+ checksum = None
+ sha256 = False
+ md5 = False
# Set a timer so we don't sit here forever.
+
+ if '#md5#' in download_url:
+ md5 = True
+ dowonload_url, checksum = download_url.split('#md5#')
+ elif '#sha256#' in download_url:
+ sha256 = True
+ download_url, checksum = download_url.split('#sha256#')
+
start_time = time.time()
try:
src = urllib2.urlopen( download_url )
@@ -166,6 +186,18 @@
src.close()
if dst:
dst.close()
+
+ try:
+ if sha256:
+ downloaded_checksum = hashlib.sha256(open(file_path, 'rb').read()).hexdigest()
+ elif md5:
+ downloaded_checksum = hashlib.md5(open(file_path, 'rb').read()).hexdigest()
+
+ if checksum and downloaded_checksum != checksum:
+ raise Exception( 'Given checksum does not match with the one from the downloaded file (%s).' % (downloaded_checksum) )
+ except Exception, e:
+ raise
+
if extract:
if tarfile.is_tarfile( file_path ) or ( zipfile.is_zipfile( file_path ) and not file_path.endswith( '.jar' ) ):
archive = CompressedFile( file_path )
@@ -174,6 +206,7 @@
extraction_path = os.path.abspath( install_dir )
else:
extraction_path = os.path.abspath( install_dir )
+
return extraction_path
@@ -1421,7 +1454,6 @@
if initial_download:
filtered_actions = actions[ 1: ]
env_shell_file_paths = action_dict.get( 'env_shell_file_paths', None )
- log.debug( '\n%s\n' % env_shell_file_paths )
if env_shell_file_paths is None:
log.debug( 'Missing Python environment, make sure your specified Python installation exists.' )
if initial_download:
https://bitbucket.org/galaxy/galaxy-central/commits/848a727a1141/
Changeset: 848a727a1141
Branch: tool_shed_checksum
User: BjoernGruening
Date: 2014-06-29 22:34:56
Summary: spelling fix
Affected #: 1 file
diff -r d1572a4a0f529fb20f2c7036eb7dfed19563ac89 -r 848a727a1141aa65a0cce41f9c046ff3296bb504 lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
@@ -158,7 +158,7 @@
if '#md5#' in download_url:
md5 = True
- dowonload_url, checksum = download_url.split('#md5#')
+ download_url, checksum = download_url.split('#md5#')
elif '#sha256#' in download_url:
sha256 = True
download_url, checksum = download_url.split('#sha256#')
https://bitbucket.org/galaxy/galaxy-central/commits/b86bab7dad7d/
Changeset: b86bab7dad7d
User: dannon
Date: 2014-07-09 17:39:45
Summary: Merged in BjoernGruening/galaxy-central-bgruening/tool_shed_checksum (pull request #432)
Implement Tool Shed checksums
Affected #: 1 file
diff -r 4411a021a9fad918cef26e00adf6f49e247fb0bd -r b86bab7dad7d744c57f6eebe9f5b390ad083a8f6 lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
@@ -8,6 +8,7 @@
import time
import urllib2
import zipfile
+import hashlib
from galaxy.util import asbool
from galaxy.util.template import fill_template
@@ -139,10 +140,29 @@
class Download( object ):
def url_download( self, install_dir, downloaded_file_name, download_url, extract=True ):
+ """
+ The given download_url can have an extension like #md5# or #sha256#.
+ This indicates a checksum which will be chekced after download.
+ If the checksum does not match an exception is thrown.
+
+ https://pypi.python.org/packages/source/k/khmer/khmer-1.0.tar.gz#md5#b60639…
+ """
+
file_path = os.path.join( install_dir, downloaded_file_name )
src = None
dst = None
+ checksum = None
+ sha256 = False
+ md5 = False
# Set a timer so we don't sit here forever.
+
+ if '#md5#' in download_url:
+ md5 = True
+ download_url, checksum = download_url.split('#md5#')
+ elif '#sha256#' in download_url:
+ sha256 = True
+ download_url, checksum = download_url.split('#sha256#')
+
start_time = time.time()
try:
src = urllib2.urlopen( download_url )
@@ -166,6 +186,18 @@
src.close()
if dst:
dst.close()
+
+ try:
+ if sha256:
+ downloaded_checksum = hashlib.sha256(open(file_path, 'rb').read()).hexdigest()
+ elif md5:
+ downloaded_checksum = hashlib.md5(open(file_path, 'rb').read()).hexdigest()
+
+ if checksum and downloaded_checksum != checksum:
+ raise Exception( 'Given checksum does not match with the one from the downloaded file (%s).' % (downloaded_checksum) )
+ except Exception, e:
+ raise
+
if extract:
if tarfile.is_tarfile( file_path ) or ( zipfile.is_zipfile( file_path ) and not file_path.endswith( '.jar' ) ):
archive = CompressedFile( file_path )
@@ -174,6 +206,7 @@
extraction_path = os.path.abspath( install_dir )
else:
extraction_path = os.path.abspath( install_dir )
+
return extraction_path
@@ -1421,7 +1454,6 @@
if initial_download:
filtered_actions = actions[ 1: ]
env_shell_file_paths = action_dict.get( 'env_shell_file_paths', None )
- log.debug( '\n%s\n' % env_shell_file_paths )
if env_shell_file_paths is None:
log.debug( 'Missing Python environment, make sure your specified Python installation exists.' )
if initial_download:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b86bab7dad7d/
Changeset: b86bab7dad7d
User: dannon
Date: 2014-07-09 17:39:45
Summary: Merged in BjoernGruening/galaxy-central-bgruening/tool_shed_checksum (pull request #432)
Implement Tool Shed checksums
Affected #: 1 file
diff -r 4411a021a9fad918cef26e00adf6f49e247fb0bd -r b86bab7dad7d744c57f6eebe9f5b390ad083a8f6 lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
@@ -8,6 +8,7 @@
import time
import urllib2
import zipfile
+import hashlib
from galaxy.util import asbool
from galaxy.util.template import fill_template
@@ -139,10 +140,29 @@
class Download( object ):
def url_download( self, install_dir, downloaded_file_name, download_url, extract=True ):
+ """
+ The given download_url can have an extension like #md5# or #sha256#.
+ This indicates a checksum which will be chekced after download.
+ If the checksum does not match an exception is thrown.
+
+ https://pypi.python.org/packages/source/k/khmer/khmer-1.0.tar.gz#md5#b60639…
+ """
+
file_path = os.path.join( install_dir, downloaded_file_name )
src = None
dst = None
+ checksum = None
+ sha256 = False
+ md5 = False
# Set a timer so we don't sit here forever.
+
+ if '#md5#' in download_url:
+ md5 = True
+ download_url, checksum = download_url.split('#md5#')
+ elif '#sha256#' in download_url:
+ sha256 = True
+ download_url, checksum = download_url.split('#sha256#')
+
start_time = time.time()
try:
src = urllib2.urlopen( download_url )
@@ -166,6 +186,18 @@
src.close()
if dst:
dst.close()
+
+ try:
+ if sha256:
+ downloaded_checksum = hashlib.sha256(open(file_path, 'rb').read()).hexdigest()
+ elif md5:
+ downloaded_checksum = hashlib.md5(open(file_path, 'rb').read()).hexdigest()
+
+ if checksum and downloaded_checksum != checksum:
+ raise Exception( 'Given checksum does not match with the one from the downloaded file (%s).' % (downloaded_checksum) )
+ except Exception, e:
+ raise
+
if extract:
if tarfile.is_tarfile( file_path ) or ( zipfile.is_zipfile( file_path ) and not file_path.endswith( '.jar' ) ):
archive = CompressedFile( file_path )
@@ -174,6 +206,7 @@
extraction_path = os.path.abspath( install_dir )
else:
extraction_path = os.path.abspath( install_dir )
+
return extraction_path
@@ -1421,7 +1454,6 @@
if initial_download:
filtered_actions = actions[ 1: ]
env_shell_file_paths = action_dict.get( 'env_shell_file_paths', None )
- log.debug( '\n%s\n' % env_shell_file_paths )
if env_shell_file_paths is None:
log.debug( 'Missing Python environment, make sure your specified Python installation exists.' )
if initial_download:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/d1d5fcd5bec6/
Changeset: d1d5fcd5bec6
User: jgoecks
Date: 2014-07-09 16:59:21
Summary: Trackster: fix track name reversion for Backbone view.
Affected #: 1 file
diff -r f7000698a92dd293b24563249cc50f7016b8ffcb -r d1d5fcd5bec6d4d48908f6da58a31ca9242e694e static/scripts/viz/trackster/tracks.js
--- a/static/scripts/viz/trackster/tracks.js
+++ b/static/scripts/viz/trackster/tracks.js
@@ -332,7 +332,6 @@
revert_name: function() {
if (this.old_name) {
this.config.set_value('name', this.old_name);
- this.name_div.text(this.old_name);
}
},
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0b921f6dbfe1/
Changeset: 0b921f6dbfe1
User: hackdna
Date: 2014-07-09 16:32:51
Summary: Update comments related to stopping jobs when history is deleted using the API.
Affected #: 1 file
diff -r e9cef9ca217f8801f7efd72e913424c1cd0ded38 -r 0b921f6dbfe1a02fcd2f153914cfbbb4aa179654 lib/galaxy/webapps/galaxy/api/histories.py
--- a/lib/galaxy/webapps/galaxy/api/histories.py
+++ b/lib/galaxy/webapps/galaxy/api/histories.py
@@ -201,7 +201,7 @@
delete( self, trans, id, **kwd )
* DELETE /api/histories/{id}
delete the history with the given ``id``
- .. note:: Currently does not stop any active jobs in the history.
+ .. note:: Stops all active jobs in the history if purge is set.
:type id: str
:param id: the encoded id of the history to delete
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.