From 8c1281965e64b956f25d69e15d17373492d8483b Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Mon, 10 Oct 2022 10:16:44 -0400 Subject: [PATCH] install-deps: for consistency, reformat tabs to spaces The majority of the install-deps.sh file was already using spaces to indent, convert the remaining hard tabs to 8 spaces. Signed-off-by: John Mulligan --- install-deps.sh | 162 ++++++++++++++++++++++++------------------------ 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/install-deps.sh b/install-deps.sh index b7ddf4a20eed1..0703143d6cf2c 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -53,9 +53,9 @@ function munge_debian_control { local control=$1 case "$version" in *squeeze*|*wheezy*) - control="/tmp/control.$$" - grep -v babeltrace debian/control > $control - ;; + control="/tmp/control.$$" + grep -v babeltrace debian/control > $control + ;; esac echo $control } @@ -68,16 +68,16 @@ function ensure_decent_gcc_on_ubuntu { local new=$1 local codename=$2 if dpkg --compare-versions $old ge ${new}.0; then - return + return fi if [ ! -f /usr/bin/g++-${new} ]; then - $SUDO tee /etc/apt/sources.list.d/ubuntu-toolchain-r.list </dev/null | grep -q installed; then - missing_pkgs+=" $pkg" + for pkg in $pkgs; do + if ! apt -qq list $pkg 2>/dev/null | grep -q installed; then + missing_pkgs+=" $pkg" in_jenkins && echo "CI_DEBUG: missing_pkgs=$missing_pkgs" - fi - done + fi + done fi if test -n "$missing_pkgs"; then - local shaman_url="https://shaman.ceph.com/api/repos/${project}/master/${sha1}/ubuntu/${codename}/repo" - $SUDO curl --silent --location $shaman_url --output /etc/apt/sources.list.d/$project.list - $SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -y -o Acquire::Languages=none -o Acquire::Translation=none || true - $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install --allow-unauthenticated -y $missing_pkgs + local shaman_url="https://shaman.ceph.com/api/repos/${project}/master/${sha1}/ubuntu/${codename}/repo" + $SUDO curl --silent --location $shaman_url --output /etc/apt/sources.list.d/$project.list + $SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -y -o Acquire::Languages=none -o Acquire::Translation=none || true + $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install --allow-unauthenticated -y $missing_pkgs fi } @@ -157,26 +157,26 @@ function install_boost_on_ubuntu { local project=libboost local sha1=892ab89e76b91b505ffbf083f6fb7f2a666d4132 install_pkg_on_ubuntu \ - $project \ - $sha1 \ - $codename \ - check \ - ceph-libboost-atomic$ver-dev \ - ceph-libboost-chrono$ver-dev \ - ceph-libboost-container$ver-dev \ - ceph-libboost-context$ver-dev \ - ceph-libboost-coroutine$ver-dev \ - ceph-libboost-date-time$ver-dev \ - ceph-libboost-filesystem$ver-dev \ - ceph-libboost-iostreams$ver-dev \ - ceph-libboost-program-options$ver-dev \ - ceph-libboost-python$ver-dev \ - ceph-libboost-random$ver-dev \ - ceph-libboost-regex$ver-dev \ - ceph-libboost-system$ver-dev \ - ceph-libboost-test$ver-dev \ - ceph-libboost-thread$ver-dev \ - ceph-libboost-timer$ver-dev + $project \ + $sha1 \ + $codename \ + check \ + ceph-libboost-atomic$ver-dev \ + ceph-libboost-chrono$ver-dev \ + ceph-libboost-container$ver-dev \ + ceph-libboost-context$ver-dev \ + ceph-libboost-coroutine$ver-dev \ + ceph-libboost-date-time$ver-dev \ + ceph-libboost-filesystem$ver-dev \ + ceph-libboost-iostreams$ver-dev \ + ceph-libboost-program-options$ver-dev \ + ceph-libboost-python$ver-dev \ + ceph-libboost-random$ver-dev \ + ceph-libboost-regex$ver-dev \ + ceph-libboost-system$ver-dev \ + ceph-libboost-test$ver-dev \ + ceph-libboost-thread$ver-dev \ + ceph-libboost-timer$ver-dev } function install_libzbd_on_ubuntu { @@ -204,8 +204,8 @@ function install_cortx_motr_on_ubuntu { 39f89fa1c6945040433a913f2687c4b4e6cbeb3f \ jammy \ check \ - cortx-motr \ - cortx-motr-dev + cortx-motr \ + cortx-motr-dev else local deb_arch=$(dpkg --print-architecture) local motr_pkg="cortx-motr_2.0.0.git3252d623_$deb_arch.deb" @@ -233,9 +233,9 @@ function ensure_decent_gcc_on_rh { local old=$(gcc -dumpversion) local dts_ver=$1 if version_lt $old $dts_ver; then - if test -t 1; then - # interactive shell - cat </dev/null|gawk 'tolower($0) ~ /^powertools\s/{print $1}') - dts_ver=11 - # before EPEL8 and PowerTools provide all dependencies, we use sepia for the dependencies + dts_ver=11 + # before EPEL8 and PowerTools provide all dependencies, we use sepia for the dependencies $SUDO dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/8/ $SUDO dnf config-manager --setopt=apt-mirror.front.sepia.ceph.com_lab-extras_8_.gpgcheck=0 --save $SUDO dnf -y module enable javapackages-tools elif test $ID = rhel -a $MAJOR_VERSION = 8 ; then dts_ver=11 $SUDO dnf config-manager --set-enabled "codeready-builder-for-rhel-8-${ARCH}-rpms" - $SUDO dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/8/ - $SUDO dnf config-manager --setopt=apt-mirror.front.sepia.ceph.com_lab-extras_8_.gpgcheck=0 --save - $SUDO dnf -y module enable javapackages-tools + $SUDO dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/8/ + $SUDO dnf config-manager --setopt=apt-mirror.front.sepia.ceph.com_lab-extras_8_.gpgcheck=0 --save + $SUDO dnf -y module enable javapackages-tools fi ;; esac @@ -435,9 +435,9 @@ EOF $SUDO dnf install -y python3-devel $SUDO $builddepcmd $DIR/ceph.spec 2>&1 | tee $DIR/yum-builddep.out [ ${PIPESTATUS[0]} -ne 0 ] && exit 1 - if [ -n "$dts_ver" ]; then + if [ -n "$dts_ver" ]; then ensure_decent_gcc_on_rh $dts_ver - fi + fi IGNORE_YUM_BUILDEP_ERRORS="ValueError: SELinux policy is not managed or store cannot be accessed." sed "/$IGNORE_YUM_BUILDEP_ERRORS/d" $DIR/yum-builddep.out | grep -i "error:" && exit 1 # for rgw motr backend build checks @@ -458,7 +458,7 @@ EOF ;; *) echo "$ID is unknown, dependencies will have to be installed manually." - exit 1 + exit 1 ;; esac fi