summaryrefslogtreecommitdiffstats
path: root/coin/provisioning/qtci-linux-SLES-15-x86_64
diff options
context:
space:
mode:
authorDimitrios Apostolou <jimis@qt.io>2020-02-05 10:21:27 +0100
committerDimitrios Apostolou <jimis@qt.io>2020-02-15 07:39:02 +0100
commit5d431ecc974f9d010dce17bdd4cd15e46a56622a (patch)
tree27c4b97aaf33cbf5f18cfb51ae19f52e6786e867 /coin/provisioning/qtci-linux-SLES-15-x86_64
parentb2d3df3553edec087cbe063813b591b8fed0061a (diff)
Refactor python3 installation in SLES-15 provisioning
+ Use DownloadURL to download from local cache + Verify download SHA + Silence the tarball extraction + Install some generic packages in 02-zypper.sh + Use some other generic facilities from common.sourced.sh + Other minor changes Task-number: QTQAINFRA-3528 Change-Id: Ic085d43381e220a0a4a52ef6d5bb0cf8a9bf7032 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Diffstat (limited to 'coin/provisioning/qtci-linux-SLES-15-x86_64')
-rwxr-xr-xcoin/provisioning/qtci-linux-SLES-15-x86_64/02-zypperpackages.sh3
-rwxr-xr-xcoin/provisioning/qtci-linux-SLES-15-x86_64/08-pythondev.sh26
2 files changed, 19 insertions, 10 deletions
diff --git a/coin/provisioning/qtci-linux-SLES-15-x86_64/02-zypperpackages.sh b/coin/provisioning/qtci-linux-SLES-15-x86_64/02-zypperpackages.sh
index 12f3a673..3ea67ef0 100755
--- a/coin/provisioning/qtci-linux-SLES-15-x86_64/02-zypperpackages.sh
+++ b/coin/provisioning/qtci-linux-SLES-15-x86_64/02-zypperpackages.sh
@@ -35,10 +35,9 @@
set -ex
-
sudo zypper -nq install elfutils binutils
-sudo zypper -nq install git gcc gcc-c++
+sudo zypper -nq install git gcc gcc-c++ make patch wget tar
sudo zypper -nq install bison flex gperf \
zlib-devel \
diff --git a/coin/provisioning/qtci-linux-SLES-15-x86_64/08-pythondev.sh b/coin/provisioning/qtci-linux-SLES-15-x86_64/08-pythondev.sh
index ab35a009..8211dd96 100755
--- a/coin/provisioning/qtci-linux-SLES-15-x86_64/08-pythondev.sh
+++ b/coin/provisioning/qtci-linux-SLES-15-x86_64/08-pythondev.sh
@@ -39,21 +39,31 @@
set -ex
-sudo zypper -nq install python-devel
+PROVISIONING_DIR="$(dirname "$0")/../"
+. "$PROVISIONING_DIR"/common/unix/common.sourced.sh
+. "$PROVISIONING_DIR"/common/unix/DownloadURL.sh
+
+
+# Python 2
+$CMD_PKG_INSTALL python-devel
# Selected installation instructions coming from:
# https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Python3/build_python3.sh
export PACKAGE_NAME="python"
export PACKAGE_VERSION="3.7.2"
+export PACKAGE_SHA=d83fe8ce51b1bb48bbcf0550fd265b9a75cdfdfa93f916f9e700aef8444bf1bb
(
- sudo zypper install -y gcc gcc-c++ make ncurses patch wget tar zlib-devel zlib libffi-devel libopenssl-devel
+ $CMD_PKG_INSTALL ncurses zlib-devel libffi-devel libopenssl-devel
- printf -- 'Configuration and Installation started \n'
+ echo 'Configuration and Installation started'
- #Downloading Source code
- wget "https://www.python.org/ftp/${PACKAGE_NAME}/${PACKAGE_VERSION}/Python-${PACKAGE_VERSION}.tar.xz"
- tar -xvf "Python-${PACKAGE_VERSION}.tar.xz"
+ #Download Source code
+ DownloadURL \
+ http://ci-files01-hki.intra.qt.io/input/python/Python-${PACKAGE_VERSION}.tar.xz \
+ https://www.python.org/ftp/${PACKAGE_NAME}/${PACKAGE_VERSION}/Python-${PACKAGE_VERSION}.tar.xz \
+ $PACKAGE_SHA
+ tar -xf "Python-${PACKAGE_VERSION}.tar.xz"
#Configure and Build
cd "Python-${PACKAGE_VERSION}"
@@ -61,14 +71,14 @@ export PACKAGE_VERSION="3.7.2"
make
sudo make install
- export PATH="/usr/local/bin:${PATH}"
- printf -- '\nInstalled python successfully \n'
+ echo 'Installed python successfully'
#Cleanup
cd -
rm "Python-${PACKAGE_VERSION}.tar.xz"
#Verify python installation
+ export PATH="/usr/local/bin:${PATH}"
if command -V "$PACKAGE_NAME"${PACKAGE_VERSION:0:1} >/dev/null
then
printf -- "%s installation completed. Please check the Usage to start the service.\n" "$PACKAGE_NAME"