Skip to content

Commit

Permalink
[Core] Add sles15 build script and removing 'bc' cmd logic
Browse files Browse the repository at this point in the history
  • Loading branch information
agl29 committed Jul 25, 2023
1 parent 03510df commit 1ed1eaa
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tools/cloudera/build_hue_cloudera.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ function install_prerequisite() {
elif [[ $1 == "sles12" ]]; then
sles12_install
export PATH=/usr/lib/mit/bin:$PATH
elif [[ $1 == "sles15" ]]; then
sles15_install
export PATH=/usr/lib/mit/bin:$PATH
elif [[ $1 == "ubuntu18" ]]; then
ubuntu18_install
elif [[ $1 == "ubuntu20" ]]; then
Expand Down
29 changes: 29 additions & 0 deletions tools/cloudera/build_hue_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,35 @@ function sles12_install() {
fi
}

function sles15_install() {
if [[ $FORCEINSTALL -eq 1 ]]; then
# pre-req install
sudo -- sh -c 'zypper install -y cyrus-sasl-gssapi \
cyrus-sasl-plain \
java-11-openjdk \
java-11-openjdk-devel \
java-11-openjdk-headless \
krb5-client pam_krb5 krb5-plugin-kdb-ldap \
libpcap \
ncurses-devel \
nmap \
xmlsec1 xmlsec1-devel xmlsec1-openssl-devel'
# MySQLdb install
sudo -- sh -c 'zypper install -y libmariadb-devel mariadb-client python3-mysqlclient'
# NODEJS 14 install
sudo -- sh -c 'zypper install -y nodejs18 npm16'
# Pip modules install
sudo pip38_bin=${pip38_bin} -- sh -c '${pip38_bin} install virtualenv virtualenv-make-relocatable mysqlclient==2.1.1'
sudo pip38_bin=${pip38_bin} -- sh -c 'ln -fs ${pip38_bin} $(dirname ${pip38_bin})/pip'
# sqlite3 install
sudo -- sh -c 'curl --insecure -o sqlite-autoconf-3350500.tar.gz https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
tar zxvf sqlite-autoconf-3350500.tar.gz && \
cd sqlite-autoconf-3350500 && \
./configure --prefix=/usr/local/ && make && make install'
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
fi
}

function centos7_install() {
if [[ $FORCEINSTALL -eq 1 ]]; then
# pre-req install
Expand Down
7 changes: 5 additions & 2 deletions tools/relocatable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,17 @@ fi
export PATH=$(dirname $ENV_PYTHON):$PATH

PYVER=$($ENV_PYTHON -V 2>&1 | awk '{print $2}' | cut -d '.' -f 1,2)
MIN_VERSION="3.8"
# Step 1. Fix virtualenv
if [ "$(echo "$PYVER >= 3.8" | bc -l)" -eq 1 ]; then
if [[ $PYVER == $MIN_VERSION || $PYVER == $MIN_VERSION.* || $PYVER > $MIN_VERSION ]]; then
echo "Python version is 3.8 or greater"
pushd .
cd $HUE_ROOT
virtualenv-make-relocatable "build/env"
$ENV_PYTHON $VIRTUAL_BOOTSTRAP --relocatable_pth "build/env"
popd
elif [ "$(echo "$PYVER == 2.7" | bc -l)" -eq 1 ]; then
else
echo "Python version is less than 3.8"
if [ -e "$HUE_ROOT/tools/enable-python27.sh" ]; then
source $HUE_ROOT/tools/enable-python27.sh
fi
Expand Down

0 comments on commit 1ed1eaa

Please sign in to comment.