diff --git a/HISTORY.rst b/HISTORY.rst index 9134a4451..42bf70674 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -43,6 +43,7 @@ Full Change List - Adjusting default frequency filters for "clinvar pathogenic" filter: remove all threshold (#464). - Adding note about difference with upstream Clinvar (#464). - Switching scoring to MutationTaster 85 interface, added back MT 85 link-out alongside MT 2021 link-out (#509). +- Updating ``utility/*.sh`` scripts from "upstream" sodar-server (#531). ------ v1.2.0 diff --git a/utility/install_chrome.sh b/utility/install_chrome.sh index 446c8921d..be44c8bec 100755 --- a/utility/install_chrome.sh +++ b/utility/install_chrome.sh @@ -5,7 +5,7 @@ echo "Installing Chrome + Driver for UI Testing" echo "***********************************************" # Version -CHROME_DRIVER_VERSION=98.0.4758.80 +CHROME_DRIVER_VERSION=$(curl http://chromedriver.storage.googleapis.com/LATEST_RELEASE) # Install dependencies sudo apt-get update diff --git a/utility/install_chrome_gitlab.sh b/utility/install_chrome_gitlab.sh index ee3177213..43eab0897 100644 --- a/utility/install_chrome_gitlab.sh +++ b/utility/install_chrome_gitlab.sh @@ -5,7 +5,7 @@ echo "Installing Chrome + Driver for UI Testing" echo "***********************************************" # Version -CHROME_DRIVER_VERSION=98.0.4758.80 +CHROME_DRIVER_VERSION=$(curl http://chromedriver.storage.googleapis.com/LATEST_RELEASE) # Install dependencies apt-get -y install unzip libgconf-2-4 xvfb gtk2-engines-pixbuf diff --git a/utility/install_ldap_dependencies.sh b/utility/install_ldap_dependencies.sh index c04f6eaaa..e38e7a690 100644 --- a/utility/install_ldap_dependencies.sh +++ b/utility/install_ldap_dependencies.sh @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + echo "***********************************************" echo "Installing LDAP/AD dependencies" echo "***********************************************" diff --git a/utility/install_os_dependencies.sh b/utility/install_os_dependencies.sh index ec9372fd8..68812c593 100644 --- a/utility/install_os_dependencies.sh +++ b/utility/install_os_dependencies.sh @@ -1,96 +1,44 @@ -#!/bin/bash - -WORK_DIR="$(dirname "$0")" -DISTRO_NAME=$(lsb_release -sc) -OS_REQUIREMENTS_FILENAME="requirements-$DISTRO_NAME.apt" - -cd $WORK_DIR - -# Check if a requirements file exist for the current distribution. -if [ ! -r "$OS_REQUIREMENTS_FILENAME" ]; then - cat <<-EOF >&2 - There is no requirements file for your distribution. - You can see one of the files listed below to help search the equivalent package in your system: - $(find ./ -name "requirements-*.apt" -printf " - %f\n") - EOF - exit 1; -fi - -# Handle call with wrong command -function wrong_command() -{ - echo "${0##*/} - unknown command: '${1}'" >&2 - usage_message -} - -# Print help / script usage -function usage_message() -{ - cat <<-EOF - Usage: $WORK_DIR/${0##*/} - Available commands are: - list Print a list of all packages defined on ${OS_REQUIREMENTS_FILENAME} file - help Print this help - - Commands that require superuser permission: - install Install packages defined on ${OS_REQUIREMENTS_FILENAME} file. Note: This - does not upgrade the packages already installed for new versions, even if - new version is available in the repository. - upgrade Same that install, but upgrade the already installed packages, if new - version is available. - EOF -} - -# Read the requirements.apt file, and remove comments and blank lines -function list_packages(){ - grep -v "#" "${OS_REQUIREMENTS_FILENAME}" | grep -v "^$"; -} - -function install_packages() -{ - list_packages | xargs apt-get --no-upgrade install -y; -} - -function upgrade_packages() -{ - list_packages | xargs apt-get install -y; -} - -function install_or_upgrade() -{ - P=${1} - PARAN=${P:-"install"} - - if [[ $EUID -ne 0 ]]; then - cat <<-EOF >&2 - You must run this script with root privilege - Please do: - sudo $WORK_DIR/${0##*/} $PARAN - EOF - exit 1 - else - - apt-get update - - # Install the basic compilation dependencies and other required libraries of this project - if [ "$PARAN" == "install" ]; then - install_packages; - else - upgrade_packages; - fi - - # cleaning downloaded packages from apt-get cache - apt-get clean - - exit 0 - fi -} - -# Handle command argument -case "$1" in - install) install_or_upgrade;; - upgrade) install_or_upgrade "upgrade";; - list) list_packages;; - help|"") usage_message;; - *) wrong_command "$1";; -esac +#!/usr/bin/env bash + +echo "***********************************************" +echo "Apt-get update" +echo "***********************************************" +apt-get -y update + +echo "***********************************************" +echo "Installing general OS dependencies" +echo "***********************************************" +apt-get -y install build-essential +apt-get -y install python3-dev +apt-get -y install curl + +echo "***********************************************" +echo "Installing Pillow and pylibmc dependencies" +echo "***********************************************" +apt-get -y install zlib1g-dev +apt-get -y install libtiff5-dev +apt-get -y install libjpeg8-dev +apt-get -y install libfreetype6-dev +apt-get -y install liblcms2-dev +apt-get -y install libwebp-dev + +echo "***********************************************" +echo "Installing Postgresql and psycopg2 dependencies" +echo "***********************************************" +apt-get -y install libpq-dev + +echo "***********************************************" +echo "Installing django-extensions dependencies" +echo "***********************************************" +apt-get -y install graphviz-dev + +echo "***********************************************" +echo "Installing SAML dependencies" +echo "***********************************************" +apt-get -y install xmlsec1 + +echo "***********************************************" +echo "Installing lxml dependencies" +echo "***********************************************" +apt-get -y install libxml2-dev +apt-get -y install libxslt-dev diff --git a/utility/install_os_gitlab.sh b/utility/install_os_gitlab.sh index f8ffbcc31..70926a88c 100644 --- a/utility/install_os_gitlab.sh +++ b/utility/install_os_gitlab.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -# Install OS dependencies for Docker image python:3.4 used in Gitlab CI -# TODO: Some of these are up-to-date on image, remove or keep just in case? +# Install OS dependencies for Docker image python:3.6 used in Gitlab CI echo "***********************************************" echo "Apt-get update" @@ -10,9 +9,8 @@ apt-get -y update echo "***********************************************" echo "Installing OS dependencies" echo "***********************************************" +apt-get -y install apt-utils apt-get -y install build-essential -apt-get -y install python3-dev python3-setuptools -apt-get -y install git apt-get -y install supervisor echo "***********************************************" @@ -20,31 +18,11 @@ echo "Installing translation requirements" echo "***********************************************" apt-get -y install gettext -echo "***********************************************" -echo "Installing shared Pillow/pylibmc dependencies" -echo "***********************************************" -apt-get -y install zlib1g-dev - -echo "***********************************************" -echo "Installing Posgresql and psycopg2 dependencies" -echo "***********************************************" -apt-get -y install libpq-dev - -echo "***********************************************" -echo "Installing Pillow dependencies" -echo "***********************************************" -apt-get -y install libtiff5-dev -apt-get -y install libjpeg62-turbo-dev -apt-get -y install libfreetype6-dev -apt-get -y install liblcms2-dev -apt-get -y install libwebp-dev - echo "***********************************************" echo "Installing django-extensions dependencies" echo "***********************************************" apt-get -y install graphviz-dev - echo "***********************************************" echo "Installing LDAP/AD dependencies" echo "***********************************************" @@ -54,5 +32,5 @@ apt-get -y install libldap2-dev echo "***********************************************" echo "Installing Node.js" echo "***********************************************" -curl -sL https://deb.nodesource.com/setup_10.x | bash - +curl -sL https://deb.nodesource.com/setup_12.x | bash - apt-get install -y nodejs diff --git a/utility/install_python_dependencies.sh b/utility/install_python_dependencies.sh index 56ebcc513..ccd1cf25f 100644 --- a/utility/install_python_dependencies.sh +++ b/utility/install_python_dependencies.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash WORK_DIR="$(dirname "$0")" PROJECT_DIR="$(dirname "$WORK_DIR")" @@ -12,15 +12,6 @@ pip --version >/dev/null 2>&1 || { exit 1; } -virtualenv --version >/dev/null 2>&1 || { - echo >&2 -e "\nvirtualenv is required but it's not installed." - echo >&2 -e "You can install it by running the following command:\n" - echo >&2 "sudo -H pip3 install virtualenv" - echo >&2 -e "\n" - echo >&2 -e "\nFor more information, see virtualenv documentation: https://virtualenv.pypa.io/en/latest/" - exit 1; -} - if [ -z "$VIRTUAL_ENV" ]; then echo >&2 -e "\nYou need activate a virtualenv first" echo >&2 -e 'If you do not have a virtualenv created, run the following command to create and automatically activate a new virtualenv named "venv" on current folder:\n' @@ -34,7 +25,8 @@ if [ -z "$VIRTUAL_ENV" ]; then exit 1; else + pip install wheel==0.37.1 pip install -r $PROJECT_DIR/requirements/local.txt pip install -r $PROJECT_DIR/requirements/test.txt -#pip install -r $PROJECT_DIR/requirements.txt + pip install -r $PROJECT_DIR/requirements.txt fi diff --git a/utility/install_vue_dev.sh b/utility/install_vue_dev.sh index f925803e8..3dae6f1c0 100644 --- a/utility/install_vue_dev.sh +++ b/utility/install_vue_dev.sh @@ -3,7 +3,7 @@ echo "***********************************************" echo "Installing Node.js" echo "***********************************************" curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - -sudo apt-get install -y nodejs +apt-get install -y nodejs echo "***********************************************" echo "Installing Vue CLI and Init"