mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Always use the python hashlib for verifying the virtualenv download in
common_startup.sh rather than attempting to use sha256sum. Older versions of coreutils (such as in RHEL 6) did not include the --strict argument to sha256sum.
This commit is contained in:
@@ -101,11 +101,7 @@ if [ $SET_VENV -eq 1 -a $CREATE_VENV -eq 1 ]; then
|
||||
python -c "import urllib; urllib.urlretrieve('$vurl', '$vsrc')"
|
||||
fi
|
||||
echo "Verifying $vsrc checksum is $vsha"
|
||||
if command -v sha256sum >/dev/null; then
|
||||
echo "$vsha $vsrc" | sha256sum -c --strict
|
||||
else
|
||||
python -c "import hashlib; assert hashlib.sha256(open('$vsrc', 'rb').read()).hexdigest() == '$vsha', '$vsrc: invalid checksum'"
|
||||
fi
|
||||
python -c "import hashlib; assert hashlib.sha256(open('$vsrc', 'rb').read()).hexdigest() == '$vsha', '$vsrc: invalid checksum'"
|
||||
tar zxf $vsrc -C $vtmp
|
||||
python $vtmp/virtualenv-$vvers/virtualenv.py "$GALAXY_VIRTUAL_ENV"
|
||||
rm -rf $vtmp
|
||||
|
||||
Reference in New Issue
Block a user