2017-07-20 22:26:42 +00:00
|
|
|
|
#!/usr/bin/env bash
|
2014-11-25 16:25:26 +00:00
|
|
|
|
#
|
|
|
|
|
# Ceph distributed storage system
|
|
|
|
|
#
|
2015-05-02 13:59:12 +00:00
|
|
|
|
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>
|
2014-11-25 16:25:26 +00:00
|
|
|
|
#
|
|
|
|
|
# Author: Loic Dachary <loic@dachary.org>
|
|
|
|
|
#
|
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
#
|
2017-07-20 22:26:42 +00:00
|
|
|
|
set -e
|
2022-10-31 17:52:50 +00:00
|
|
|
|
|
|
|
|
|
if ! [ "${_SOURCED_LIB_BUILD}" = 1 ]; then
|
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
CEPH_ROOT="${SCRIPT_DIR}"
|
|
|
|
|
. "${CEPH_ROOT}/src/script/lib-build.sh" || exit 2
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
2014-11-25 16:25:26 +00:00
|
|
|
|
DIR=/tmp/install-deps.$$
|
|
|
|
|
trap "rm -fr $DIR" EXIT
|
|
|
|
|
mkdir -p $DIR
|
2014-12-20 17:57:59 +00:00
|
|
|
|
if test $(id -u) != 0 ; then
|
|
|
|
|
SUDO=sudo
|
|
|
|
|
fi
|
2022-10-10 14:21:02 +00:00
|
|
|
|
# enable UTF-8 encoding for programs like pip that expect to
|
|
|
|
|
# print more than just ascii chars
|
|
|
|
|
export LC_ALL=C.UTF-8
|
2015-02-03 15:26:17 +00:00
|
|
|
|
|
2018-08-01 10:33:58 +00:00
|
|
|
|
ARCH=$(uname -m)
|
2018-02-14 15:53:47 +00:00
|
|
|
|
|
2022-03-25 21:29:44 +00:00
|
|
|
|
|
2017-06-27 07:45:09 +00:00
|
|
|
|
function munge_ceph_spec_in {
|
2019-06-06 03:10:41 +00:00
|
|
|
|
local with_seastar=$1
|
|
|
|
|
shift
|
2019-02-13 12:47:38 +00:00
|
|
|
|
local for_make_check=$1
|
|
|
|
|
shift
|
2017-06-27 07:45:09 +00:00
|
|
|
|
local OUTFILE=$1
|
2019-02-13 12:47:38 +00:00
|
|
|
|
sed -e 's/@//g' < ceph.spec.in > $OUTFILE
|
|
|
|
|
# http://rpm.org/user_doc/conditional_builds.html
|
2019-06-06 03:10:41 +00:00
|
|
|
|
if $with_seastar; then
|
2018-07-03 09:06:47 +00:00
|
|
|
|
sed -i -e 's/%bcond_with seastar/%bcond_without seastar/g' $OUTFILE
|
|
|
|
|
fi
|
2019-02-13 12:47:38 +00:00
|
|
|
|
if $for_make_check; then
|
|
|
|
|
sed -i -e 's/%bcond_with make_check/%bcond_without make_check/g' $OUTFILE
|
|
|
|
|
fi
|
2017-06-27 07:45:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-02-13 11:56:00 +00:00
|
|
|
|
function munge_debian_control {
|
|
|
|
|
local version=$1
|
|
|
|
|
shift
|
2019-02-13 12:25:21 +00:00
|
|
|
|
local control=$1
|
2019-02-13 11:56:00 +00:00
|
|
|
|
case "$version" in
|
|
|
|
|
*squeeze*|*wheezy*)
|
2022-10-10 14:16:44 +00:00
|
|
|
|
control="/tmp/control.$$"
|
|
|
|
|
grep -v babeltrace debian/control > $control
|
|
|
|
|
;;
|
2019-02-13 11:56:00 +00:00
|
|
|
|
esac
|
|
|
|
|
echo $control
|
2017-06-27 07:45:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-08-01 10:52:45 +00:00
|
|
|
|
function ensure_decent_gcc_on_ubuntu {
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "Start ensure_decent_gcc_on_ubuntu() in install-deps.sh"
|
2017-11-12 05:07:35 +00:00
|
|
|
|
# point gcc to the one offered by g++-7 if the used one is not
|
|
|
|
|
# new enough
|
2018-10-26 06:32:09 +00:00
|
|
|
|
local old=$(gcc -dumpfullversion -dumpversion)
|
2017-12-08 08:34:59 +00:00
|
|
|
|
local new=$1
|
2018-08-01 10:52:45 +00:00
|
|
|
|
local codename=$2
|
2019-05-14 14:37:00 +00:00
|
|
|
|
if dpkg --compare-versions $old ge ${new}.0; then
|
2022-10-10 14:16:44 +00:00
|
|
|
|
return
|
2017-11-12 05:07:35 +00:00
|
|
|
|
fi
|
|
|
|
|
|
2017-12-13 06:22:39 +00:00
|
|
|
|
if [ ! -f /usr/bin/g++-${new} ]; then
|
2022-10-10 14:16:44 +00:00
|
|
|
|
$SUDO tee /etc/apt/sources.list.d/ubuntu-toolchain-r.list <<EOF
|
2018-09-28 03:45:03 +00:00
|
|
|
|
deb [lang=none] http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu $codename main
|
2019-06-07 16:13:04 +00:00
|
|
|
|
deb [arch=amd64 lang=none] http://mirror.nullivex.com/ppa/ubuntu-toolchain-r-test $codename main
|
2017-12-13 06:22:39 +00:00
|
|
|
|
EOF
|
2022-10-10 14:16:44 +00:00
|
|
|
|
# import PPA's signing key into APT's keyring
|
|
|
|
|
cat << ENDOFKEY | $SUDO apt-key add -
|
2018-07-10 12:23:48 +00:00
|
|
|
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
|
|
|
Version: SKS 1.1.6
|
|
|
|
|
Comment: Hostname: keyserver.ubuntu.com
|
|
|
|
|
|
|
|
|
|
mI0ESuBvRwEEAMi4cDba7xlKaaoXjO1n1HX8RKrkW+HEIl79nSOSJyvzysajs7zUow/OzCQp
|
|
|
|
|
9NswqrDmNuH1+lPTTRNAGtK8r2ouq2rnXT1mTl23dpgHZ9spseR73s4ZBGw/ag4bpU5dNUSt
|
|
|
|
|
vfmHhIjVCuiSpNn7cyy1JSSvSs3N2mxteKjXLBf7ABEBAAG0GkxhdW5jaHBhZCBUb29sY2hh
|
|
|
|
|
aW4gYnVpbGRziLYEEwECACAFAkrgb0cCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAe
|
|
|
|
|
k3eiup7yfzGKA/4xzUqNACSlB+k+DxFFHqkwKa/ziFiAlkLQyyhm+iqz80htRZr7Ls/ZRYZl
|
|
|
|
|
0aSU56/hLe0V+TviJ1s8qdN2lamkKdXIAFfavA04nOnTzyIBJ82EAUT3Nh45skMxo4z4iZMN
|
|
|
|
|
msyaQpNl/m/lNtOLhR64v5ZybofB2EWkMxUzX8D/FQ==
|
|
|
|
|
=LcUQ
|
|
|
|
|
-----END PGP PUBLIC KEY BLOCK-----
|
|
|
|
|
ENDOFKEY
|
2022-10-10 14:16:44 +00:00
|
|
|
|
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -y || true
|
|
|
|
|
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get install -y g++-${new}
|
2017-12-09 11:29:58 +00:00
|
|
|
|
fi
|
2017-11-12 05:07:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-06-25 11:54:55 +00:00
|
|
|
|
function ensure_python3_sphinx_on_ubuntu {
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "Running ensure_python3_sphinx_on_ubuntu() in install-deps.sh"
|
2020-06-25 11:54:55 +00:00
|
|
|
|
local sphinx_command=/usr/bin/sphinx-build
|
|
|
|
|
# python-sphinx points $sphinx_command to
|
|
|
|
|
# ../share/sphinx/scripts/python2/sphinx-build when it's installed
|
|
|
|
|
# let's "correct" this
|
|
|
|
|
if test -e $sphinx_command && head -n1 $sphinx_command | grep -q python$; then
|
|
|
|
|
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y remove python-sphinx
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-08 15:06:45 +00:00
|
|
|
|
function install_pkg_on_ubuntu {
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "Running install_pkg_on_ubuntu() in install-deps.sh"
|
2018-09-08 15:06:45 +00:00
|
|
|
|
local project=$1
|
|
|
|
|
shift
|
|
|
|
|
local sha1=$1
|
|
|
|
|
shift
|
|
|
|
|
local codename=$1
|
|
|
|
|
shift
|
2019-08-04 03:41:26 +00:00
|
|
|
|
local force=$1
|
|
|
|
|
shift
|
2018-09-08 15:06:45 +00:00
|
|
|
|
local pkgs=$@
|
|
|
|
|
local missing_pkgs
|
2019-08-04 03:41:26 +00:00
|
|
|
|
if [ $force = "force" ]; then
|
2022-10-10 14:16:44 +00:00
|
|
|
|
missing_pkgs="$@"
|
2019-08-04 03:41:26 +00:00
|
|
|
|
else
|
2022-10-10 14:16:44 +00:00
|
|
|
|
for pkg in $pkgs; do
|
|
|
|
|
if ! apt -qq list $pkg 2>/dev/null | grep -q installed; then
|
|
|
|
|
missing_pkgs+=" $pkg"
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "missing_pkgs=$missing_pkgs"
|
2022-10-10 14:16:44 +00:00
|
|
|
|
fi
|
|
|
|
|
done
|
2019-08-04 03:41:26 +00:00
|
|
|
|
fi
|
2018-09-08 15:06:45 +00:00
|
|
|
|
if test -n "$missing_pkgs"; then
|
2022-10-10 14:16:44 +00:00
|
|
|
|
local shaman_url="https://shaman.ceph.com/api/repos/${project}/master/${sha1}/ubuntu/${codename}/repo"
|
2023-02-06 20:45:39 +00:00
|
|
|
|
in_jenkins && echo -n "CI_DEBUG: Downloading $shaman_url ... "
|
|
|
|
|
$SUDO curl --silent --fail --write-out "%{http_code}" --location $shaman_url --output /etc/apt/sources.list.d/$project.list
|
2022-10-10 14:16:44 +00:00
|
|
|
|
$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
|
2018-09-08 15:06:45 +00:00
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-19 21:12:08 +00:00
|
|
|
|
boost_ver=1.82
|
|
|
|
|
|
|
|
|
|
function clean_boost_on_ubuntu {
|
|
|
|
|
ci_debug "Running clean_boost_on_ubuntu() in install-deps.sh"
|
|
|
|
|
# Find currently installed version. If there are multiple
|
|
|
|
|
# versions, they end up newline separated
|
|
|
|
|
local installed_ver=$(apt -qq list --installed ceph-libboost*-dev 2>/dev/null |
|
|
|
|
|
cut -d' ' -f2 |
|
|
|
|
|
cut -d'.' -f1,2 |
|
|
|
|
|
sort -u)
|
|
|
|
|
# If installed_ver contains whitespace, we can't really count on it,
|
|
|
|
|
# but otherwise, bail out if the version installed is the version
|
|
|
|
|
# we want.
|
|
|
|
|
if test -n "$installed_ver" &&
|
|
|
|
|
echo -n "$installed_ver" | tr '[:space:]' ' ' | grep -v -q ' '; then
|
|
|
|
|
if echo "$installed_ver" | grep -q "^$boost_ver"; then
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Historical packages
|
|
|
|
|
$SUDO rm -f /etc/apt/sources.list.d/ceph-libboost*.list
|
|
|
|
|
# Currently used
|
|
|
|
|
$SUDO rm -f /etc/apt/sources.list.d/libboost.list
|
|
|
|
|
# Refresh package list so things aren't in the available list.
|
|
|
|
|
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -y || true
|
|
|
|
|
# Remove all ceph-libboost packages. We have an early return if
|
|
|
|
|
# the desired version is already (and the only) version installed,
|
|
|
|
|
# so no need to spare it.
|
|
|
|
|
if test -n "$installed_ver"; then
|
|
|
|
|
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y --fix-missing remove "ceph-libboost*"
|
2024-01-19 02:53:04 +00:00
|
|
|
|
# When an error occurs during `apt-get remove ceph-libboost*`, ceph-libboost* packages
|
|
|
|
|
# may be not removed, so use `dpkg` to force remove ceph-libboost*.
|
|
|
|
|
local ceph_libboost_pkgs=$(dpkg -l | grep ceph-libboost* | awk '{print $2}' |
|
|
|
|
|
awk -F: '{print $1}')
|
|
|
|
|
if test -n "$ceph_libboost_pkgs"; then
|
|
|
|
|
ci_debug "Force remove ceph-libboost* packages $ceph_libboost_pkgs"
|
|
|
|
|
$SUDO dpkg --purge --force-all $ceph_libboost_pkgs
|
|
|
|
|
fi
|
2023-07-19 21:12:08 +00:00
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-20 04:43:34 +00:00
|
|
|
|
function install_boost_on_ubuntu {
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "Running install_boost_on_ubuntu() in install-deps.sh"
|
2023-07-19 21:12:08 +00:00
|
|
|
|
# Once we get to this point, clean_boost_on_ubuntu() should ensure
|
|
|
|
|
# that there is no more than one installed version.
|
2021-03-20 05:00:01 +00:00
|
|
|
|
local installed_ver=$(apt -qq list --installed ceph-libboost*-dev 2>/dev/null |
|
|
|
|
|
grep -e 'libboost[0-9].[0-9]\+-dev' |
|
|
|
|
|
cut -d' ' -f2 |
|
|
|
|
|
cut -d'.' -f1,2)
|
|
|
|
|
if test -n "$installed_ver"; then
|
2023-07-19 21:12:08 +00:00
|
|
|
|
if echo "$installed_ver" | grep -q "^$boost_ver"; then
|
2021-03-20 05:00:01 +00:00
|
|
|
|
return
|
|
|
|
|
fi
|
2019-11-14 13:05:55 +00:00
|
|
|
|
fi
|
2021-03-20 05:00:01 +00:00
|
|
|
|
local codename=$1
|
2019-11-14 13:05:55 +00:00
|
|
|
|
local project=libboost
|
2023-05-15 22:31:38 +00:00
|
|
|
|
local sha1=2804368f5b807ba8334b0ccfeb8af191edeb996f
|
2018-11-20 04:43:34 +00:00
|
|
|
|
install_pkg_on_ubuntu \
|
2022-10-10 14:16:44 +00:00
|
|
|
|
$project \
|
|
|
|
|
$sha1 \
|
|
|
|
|
$codename \
|
|
|
|
|
check \
|
2023-07-19 21:12:08 +00:00
|
|
|
|
ceph-libboost-atomic${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-chrono${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-container${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-context${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-coroutine${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-date-time${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-filesystem${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-iostreams${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-program-options${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-python${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-random${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-regex${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-system${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-test${boost_ver}-dev \
|
|
|
|
|
ceph-libboost-thread${boost_ver}-dev \
|
2023-10-27 21:01:35 +00:00
|
|
|
|
ceph-libboost-timer${boost_ver}-dev \
|
|
|
|
|
|| ci_debug "ceph-libboost package unavailable, you can build the submodule"
|
|
|
|
|
|
2018-11-20 04:43:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-08-09 14:46:59 +00:00
|
|
|
|
motr_pkgs_url='https://github.com/Seagate/cortx-motr/releases/download/2.0.0-rgw'
|
|
|
|
|
|
|
|
|
|
function install_cortx_motr_on_ubuntu {
|
|
|
|
|
if dpkg -l cortx-motr-dev &> /dev/null; then
|
|
|
|
|
return
|
|
|
|
|
fi
|
2022-08-09 14:51:37 +00:00
|
|
|
|
if [ "$(lsb_release -sc)" = "jammy" ]; then
|
|
|
|
|
install_pkg_on_ubuntu \
|
|
|
|
|
cortx-motr \
|
|
|
|
|
39f89fa1c6945040433a913f2687c4b4e6cbeb3f \
|
|
|
|
|
jammy \
|
|
|
|
|
check \
|
2022-10-10 14:16:44 +00:00
|
|
|
|
cortx-motr \
|
|
|
|
|
cortx-motr-dev
|
2022-08-09 14:51:37 +00:00
|
|
|
|
else
|
|
|
|
|
local deb_arch=$(dpkg --print-architecture)
|
|
|
|
|
local motr_pkg="cortx-motr_2.0.0.git3252d623_$deb_arch.deb"
|
|
|
|
|
local motr_dev_pkg="cortx-motr-dev_2.0.0.git3252d623_$deb_arch.deb"
|
|
|
|
|
$SUDO curl -sL -o/var/cache/apt/archives/$motr_pkg $motr_pkgs_url/$motr_pkg
|
|
|
|
|
$SUDO curl -sL -o/var/cache/apt/archives/$motr_dev_pkg $motr_pkgs_url/$motr_dev_pkg
|
|
|
|
|
# For some reason libfabric pkg is not available in arm64 version
|
|
|
|
|
# of Ubuntu 20.04 (Focal Fossa), so we borrow it from more recent
|
|
|
|
|
# versions for now.
|
|
|
|
|
if [[ "$deb_arch" == 'arm64' ]]; then
|
|
|
|
|
local lf_pkg='libfabric1_1.11.0-2_arm64.deb'
|
|
|
|
|
$SUDO curl -sL -o/var/cache/apt/archives/$lf_pkg http://ports.ubuntu.com/pool/universe/libf/libfabric/$lf_pkg
|
|
|
|
|
$SUDO apt-get install -y /var/cache/apt/archives/$lf_pkg
|
|
|
|
|
fi
|
|
|
|
|
$SUDO apt-get install -y /var/cache/apt/archives/{$motr_pkg,$motr_dev_pkg}
|
|
|
|
|
$SUDO apt-get install -y libisal-dev
|
2022-08-09 14:46:59 +00:00
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-08 08:34:59 +00:00
|
|
|
|
function version_lt {
|
|
|
|
|
test $1 != $(echo -e "$1\n$2" | sort -rV | head -n 1)
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-24 18:23:12 +00:00
|
|
|
|
function ensure_decent_gcc_on_rh {
|
|
|
|
|
local old=$(gcc -dumpversion)
|
|
|
|
|
local dts_ver=$1
|
2022-08-10 20:35:01 +00:00
|
|
|
|
if version_lt $old $dts_ver; then
|
2022-10-10 14:16:44 +00:00
|
|
|
|
if test -t 1; then
|
|
|
|
|
# interactive shell
|
|
|
|
|
cat <<EOF
|
2022-02-24 18:23:12 +00:00
|
|
|
|
Your GCC is too old. Please run following command to add DTS to your environment:
|
|
|
|
|
|
2022-08-10 20:35:01 +00:00
|
|
|
|
scl enable gcc-toolset-$dts_ver bash
|
2022-02-24 18:23:12 +00:00
|
|
|
|
|
2022-08-10 20:35:01 +00:00
|
|
|
|
Or add the following line to the end of ~/.bashrc and run "source ~/.bashrc" to add it permanently:
|
2022-02-24 18:23:12 +00:00
|
|
|
|
|
2022-08-10 20:35:01 +00:00
|
|
|
|
source scl_source enable gcc-toolset-$dts_ver
|
2022-02-24 18:23:12 +00:00
|
|
|
|
EOF
|
2022-10-10 14:16:44 +00:00
|
|
|
|
else
|
|
|
|
|
# non-interactive shell
|
|
|
|
|
source /opt/rh/gcc-toolset-$dts_ver/enable
|
|
|
|
|
fi
|
2022-02-24 18:23:12 +00:00
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-29 14:34:12 +00:00
|
|
|
|
function populate_wheelhouse() {
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "Running populate_wheelhouse() in install-deps.sh"
|
2022-09-29 14:34:12 +00:00
|
|
|
|
local install=$1
|
|
|
|
|
shift
|
|
|
|
|
|
|
|
|
|
# although pip comes with virtualenv, having a recent version
|
|
|
|
|
# of pip matters when it comes to using wheel packages
|
|
|
|
|
PIP_OPTS="--timeout 300 --exists-action i"
|
|
|
|
|
pip $PIP_OPTS $install \
|
|
|
|
|
'setuptools >= 0.8' 'pip >= 21.0' 'wheel >= 0.24' 'tox >= 2.9.1' || return 1
|
|
|
|
|
if test $# != 0 ; then
|
2023-07-19 14:05:05 +00:00
|
|
|
|
pip $PIP_OPTS $install $@ || return 1
|
2022-09-29 14:34:12 +00:00
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function activate_virtualenv() {
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "Running activate_virtualenv() in install-deps.sh"
|
2022-09-29 14:34:12 +00:00
|
|
|
|
local top_srcdir=$1
|
|
|
|
|
local env_dir=$top_srcdir/install-deps-python3
|
|
|
|
|
|
|
|
|
|
if ! test -d $env_dir ; then
|
|
|
|
|
python3 -m venv ${env_dir}
|
|
|
|
|
. $env_dir/bin/activate
|
|
|
|
|
if ! populate_wheelhouse install ; then
|
|
|
|
|
rm -rf $env_dir
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
. $env_dir/bin/activate
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function preload_wheels_for_tox() {
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "Running preload_wheels_for_tox() in install-deps.sh"
|
2022-09-29 14:34:12 +00:00
|
|
|
|
local ini=$1
|
|
|
|
|
shift
|
|
|
|
|
pushd . > /dev/null
|
|
|
|
|
cd $(dirname $ini)
|
|
|
|
|
local require_files=$(ls *requirements*.txt 2>/dev/null) || true
|
|
|
|
|
local constraint_files=$(ls *constraints*.txt 2>/dev/null) || true
|
|
|
|
|
local require=$(echo -n "$require_files" | sed -e 's/^/-r /')
|
|
|
|
|
local constraint=$(echo -n "$constraint_files" | sed -e 's/^/-c /')
|
|
|
|
|
local md5=wheelhouse/md5
|
|
|
|
|
if test "$require"; then
|
|
|
|
|
if ! test -f $md5 || ! md5sum -c $md5 > /dev/null; then
|
|
|
|
|
rm -rf wheelhouse
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
if test "$require" && ! test -d wheelhouse ; then
|
|
|
|
|
type python3 > /dev/null 2>&1 || continue
|
|
|
|
|
activate_virtualenv $top_srcdir || exit 1
|
|
|
|
|
python3 -m pip install --upgrade pip
|
|
|
|
|
populate_wheelhouse "wheel -w $wip_wheelhouse" $require $constraint || exit 1
|
|
|
|
|
mv $wip_wheelhouse wheelhouse
|
|
|
|
|
md5sum $require_files $constraint_files > $md5
|
|
|
|
|
fi
|
|
|
|
|
popd > /dev/null
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-27 01:22:34 +00:00
|
|
|
|
for_make_check=false
|
|
|
|
|
if tty -s; then
|
|
|
|
|
# interactive
|
|
|
|
|
for_make_check=true
|
|
|
|
|
elif [ $FOR_MAKE_CHECK ]; then
|
|
|
|
|
for_make_check=true
|
|
|
|
|
else
|
|
|
|
|
for_make_check=false
|
|
|
|
|
fi
|
|
|
|
|
|
2018-08-01 10:33:58 +00:00
|
|
|
|
if [ x$(uname)x = xFreeBSDx ]; then
|
2022-10-03 18:43:19 +00:00
|
|
|
|
if [ "$INSTALL_EXTRA_PACKAGES" ]; then
|
|
|
|
|
echo "Installing extra packages not supported on FreeBSD" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2016-03-24 11:48:20 +00:00
|
|
|
|
$SUDO pkg install -yq \
|
2017-07-24 16:20:19 +00:00
|
|
|
|
devel/babeltrace \
|
2019-03-06 22:23:33 +00:00
|
|
|
|
devel/binutils \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
devel/git \
|
2016-08-09 16:28:07 +00:00
|
|
|
|
devel/gperf \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
devel/gmake \
|
2016-10-16 20:10:03 +00:00
|
|
|
|
devel/cmake \
|
2020-10-22 06:41:34 +00:00
|
|
|
|
devel/nasm \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
devel/boost-all \
|
2016-10-16 20:10:03 +00:00
|
|
|
|
devel/boost-python-libs \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
devel/valgrind \
|
|
|
|
|
devel/pkgconf \
|
|
|
|
|
devel/libedit \
|
|
|
|
|
devel/libtool \
|
|
|
|
|
devel/google-perftools \
|
|
|
|
|
lang/cython \
|
2018-09-04 15:39:59 +00:00
|
|
|
|
net/openldap24-client \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
archivers/snappy \
|
2018-04-10 16:32:46 +00:00
|
|
|
|
archivers/liblz4 \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
ftp/curl \
|
|
|
|
|
misc/e2fsprogs-libuuid \
|
2016-10-18 09:33:09 +00:00
|
|
|
|
misc/getopt \
|
2017-07-07 08:13:35 +00:00
|
|
|
|
net/socat \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
textproc/expat2 \
|
2017-03-09 12:42:34 +00:00
|
|
|
|
textproc/gsed \
|
2018-09-06 09:10:32 +00:00
|
|
|
|
lang/gawk \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
textproc/libxml2 \
|
|
|
|
|
textproc/xmlstarlet \
|
2017-07-24 16:20:19 +00:00
|
|
|
|
textproc/jq \
|
|
|
|
|
textproc/py-sphinx \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
emulators/fuse \
|
|
|
|
|
java/junit \
|
2018-11-25 14:06:07 +00:00
|
|
|
|
lang/python36 \
|
2017-07-24 16:20:19 +00:00
|
|
|
|
devel/py-pip \
|
2018-11-25 14:06:07 +00:00
|
|
|
|
devel/py-flake8 \
|
2019-07-30 14:56:01 +00:00
|
|
|
|
devel/py-tox \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
devel/py-argparse \
|
|
|
|
|
devel/py-nose \
|
2017-07-24 16:20:19 +00:00
|
|
|
|
devel/py-prettytable \
|
2021-04-13 08:17:01 +00:00
|
|
|
|
devel/py-yaml \
|
2018-11-25 14:06:07 +00:00
|
|
|
|
www/py-routes \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
www/py-flask \
|
2018-11-25 14:06:07 +00:00
|
|
|
|
www/node \
|
|
|
|
|
www/npm \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
www/fcgi \
|
2018-12-23 20:24:45 +00:00
|
|
|
|
security/nss \
|
2019-05-28 18:05:16 +00:00
|
|
|
|
security/krb5 \
|
2018-11-25 14:06:07 +00:00
|
|
|
|
security/oath-toolkit \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
sysutils/flock \
|
2017-04-02 00:08:51 +00:00
|
|
|
|
sysutils/fusefs-libs \
|
2016-03-24 11:48:20 +00:00
|
|
|
|
|
2022-10-10 14:16:44 +00:00
|
|
|
|
# Now use pip to install some extra python modules
|
|
|
|
|
pip install pecan
|
2017-06-10 10:12:23 +00:00
|
|
|
|
|
2016-03-24 11:48:20 +00:00
|
|
|
|
exit
|
2016-06-29 07:40:07 +00:00
|
|
|
|
else
|
2019-06-06 03:10:41 +00:00
|
|
|
|
[ $WITH_SEASTAR ] && with_seastar=true || with_seastar=false
|
2022-05-13 12:44:53 +00:00
|
|
|
|
[ $WITH_PMEM ] && with_pmem=true || with_pmem=false
|
2021-11-01 21:39:39 +00:00
|
|
|
|
[ $WITH_RADOSGW_MOTR ] && with_rgw_motr=true || with_rgw_motr=false
|
2016-09-05 13:40:33 +00:00
|
|
|
|
source /etc/os-release
|
2019-09-24 19:48:27 +00:00
|
|
|
|
case "$ID" in
|
2021-07-15 11:15:56 +00:00
|
|
|
|
debian|ubuntu|devuan|elementary|softiron)
|
2016-06-29 07:40:07 +00:00
|
|
|
|
echo "Using apt-get to install dependencies"
|
2023-07-19 21:12:08 +00:00
|
|
|
|
# Put this before any other invocation of apt so it can clean
|
|
|
|
|
# up in a broken case.
|
|
|
|
|
clean_boost_on_ubuntu
|
2022-10-03 18:43:19 +00:00
|
|
|
|
if [ "$INSTALL_EXTRA_PACKAGES" ]; then
|
2022-10-03 19:08:30 +00:00
|
|
|
|
if ! $SUDO apt-get install -y $INSTALL_EXTRA_PACKAGES ; then
|
|
|
|
|
# try again. ported over from run-make.sh (orignally e278295)
|
|
|
|
|
# In the case that apt-get is interrupted, like when a jenkins
|
|
|
|
|
# job is cancelled, the package manager will be in an inconsistent
|
|
|
|
|
# state. Run the command again after `dpkg --configure -a` to
|
|
|
|
|
# bring package manager back into a clean state.
|
|
|
|
|
$SUDO dpkg --configure -a
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "trying to install $INSTALL_EXTRA_PACKAGES again"
|
2022-10-03 19:08:30 +00:00
|
|
|
|
$SUDO apt-get install -y $INSTALL_EXTRA_PACKAGES
|
|
|
|
|
fi
|
2022-10-03 18:43:19 +00:00
|
|
|
|
fi
|
2018-08-01 10:52:45 +00:00
|
|
|
|
$SUDO apt-get install -y devscripts equivs
|
2017-11-12 05:07:35 +00:00
|
|
|
|
$SUDO apt-get install -y dpkg-dev
|
2020-06-25 11:54:55 +00:00
|
|
|
|
ensure_python3_sphinx_on_ubuntu
|
2017-11-12 05:07:35 +00:00
|
|
|
|
case "$VERSION" in
|
2018-11-20 04:43:34 +00:00
|
|
|
|
*Bionic*)
|
2019-06-07 16:08:37 +00:00
|
|
|
|
ensure_decent_gcc_on_ubuntu 9 bionic
|
2019-04-24 01:14:51 +00:00
|
|
|
|
[ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu bionic
|
2019-09-16 12:28:06 +00:00
|
|
|
|
;;
|
2021-03-18 11:43:06 +00:00
|
|
|
|
*Focal*)
|
2022-02-23 17:39:16 +00:00
|
|
|
|
ensure_decent_gcc_on_ubuntu 11 focal
|
2021-03-18 11:50:58 +00:00
|
|
|
|
[ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu focal
|
2021-03-18 11:43:06 +00:00
|
|
|
|
;;
|
2022-08-31 18:02:36 +00:00
|
|
|
|
*Jammy*)
|
|
|
|
|
[ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu jammy
|
|
|
|
|
$SUDO apt-get install -y gcc
|
|
|
|
|
;;
|
2017-11-12 05:07:35 +00:00
|
|
|
|
*)
|
|
|
|
|
$SUDO apt-get install -y gcc
|
|
|
|
|
;;
|
|
|
|
|
esac
|
2015-02-05 13:46:41 +00:00
|
|
|
|
if ! test -r debian/control ; then
|
|
|
|
|
echo debian/control is not a readable file
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2014-11-25 16:25:26 +00:00
|
|
|
|
touch $DIR/status
|
2016-03-24 00:43:53 +00:00
|
|
|
|
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "Running munge_debian_control() in install-deps.sh"
|
2022-10-10 14:16:44 +00:00
|
|
|
|
backports=""
|
|
|
|
|
control=$(munge_debian_control "$VERSION" "debian/control")
|
2018-08-01 10:52:45 +00:00
|
|
|
|
case "$VERSION" in
|
|
|
|
|
*squeeze*|*wheezy*)
|
|
|
|
|
backports="-t $codename-backports"
|
2014-11-25 16:25:26 +00:00
|
|
|
|
;;
|
|
|
|
|
esac
|
2016-03-24 00:43:53 +00:00
|
|
|
|
|
2022-10-10 14:16:44 +00:00
|
|
|
|
# make a metapackage that expresses the build dependencies,
|
|
|
|
|
# install it, rm the .deb; then uninstall the package as its
|
|
|
|
|
# work is done
|
|
|
|
|
build_profiles=""
|
|
|
|
|
if $for_make_check; then
|
|
|
|
|
build_profiles+=",pkg.ceph.check"
|
|
|
|
|
fi
|
|
|
|
|
if $with_seastar; then
|
|
|
|
|
build_profiles+=",pkg.ceph.crimson"
|
|
|
|
|
fi
|
|
|
|
|
if $with_pmem; then
|
|
|
|
|
build_profiles+=",pkg.ceph.pmdk"
|
|
|
|
|
fi
|
parquet implementation:
(1) adding arrow/parquet to make(install is missing)
(2) s3select-operation contains 2 flows CSV and Parquet
(3) upon parquet-flow s3select processing engine is calling (via callback) to get-size and range-request, the range-requests are a-sync, thus the caller is waiting until notification.
(4) flow : execute --> s3select --(arrow layer)--> range-request --> GetObj::execute --> send_response_data --> notify-range-request --> (back-to) --> s3select
(5) on parquet flow the s3select is handling the response (using call-backs) because of aws-response-limitation (16mb)
add unique pointer (rgw_api); verify magic number for parquet objects; s3select module update
fix buffer-over-flow (copy range request)
change the range-request flow. now,it needs to use the callback parametrs (ofs & len) and not to use the element length
refactoring. seperate the CSV flow from the parquet flow, a phase before adding conditional build(depend on arrow package installation)
adding arrow/parquet installation to debian/control
align s3select repo with RGW (missing API"s, such as get_error_description)
undefined reference to arrow symbol
fix comment: using optional_yield by value
fix comments; remove future/promise
s3select: a leak fix
s3select: fixing result production
s3select,s3tests : parquet alignments
typo: git-remote --> git_remote
s3select: remove redundant comma(end of projections); bug fix in parquet flow upon aggregation queries
adding arrow/parquet
editorial. remove blank lines
s3select: merged with master(output serialization,presto alignments)
merging(not rebase) master functionlities into parquet branch
(*) a dedicated source-files for s3select operation.
(*) s3select-engine: fix leaks on parquet flows, enabling allocate csv_object and parquet_object on stack
(*) the csv_object and parquet object allocated on stack (no heap allocation)
move data-members from heap to stack allocation, refactoring, separate flows for CSV and parquet. s3select: bug fix
conditional build: upon arrow package is installed the parquet flow become visable, thus enables to process parquet object. in case the package is not installed only CSV is usable
remove redundant try/catch, s3select: fix compile warning
arrow-devel version should be higher than 4.0.0, where arrow::io::AsyncContext become depecrated
missing sudo; wrong url;move the rm -f arrow.list
replace codename with $(lsb_release -sc)
arrow version should be >= 4.0.0; iocontext not exists in namespace on lower versions
RGW points to s3select/master
s3select submodule
sudo --> $SUDO
Signed-off-by: gal salomon <gal.salomon@gmail.com>
2021-04-12 05:54:37 +00:00
|
|
|
|
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "for_make_check=$for_make_check"
|
|
|
|
|
ci_debug "with_seastar=$with_seastar"
|
|
|
|
|
ci_debug "with_jaeger=$with_jaeger"
|
|
|
|
|
ci_debug "build_profiles=$build_profiles"
|
|
|
|
|
ci_debug "Now running 'mk-build-deps' and installing ceph-build-deps package"
|
2022-03-25 21:29:44 +00:00
|
|
|
|
|
2022-10-10 14:16:44 +00:00
|
|
|
|
$SUDO env DEBIAN_FRONTEND=noninteractive mk-build-deps \
|
|
|
|
|
--build-profiles "${build_profiles#,}" \
|
|
|
|
|
--install --remove \
|
|
|
|
|
--tool="apt-get -y --no-install-recommends $backports" $control || exit 1
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "Removing ceph-build-deps"
|
2022-10-10 14:16:44 +00:00
|
|
|
|
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y remove ceph-build-deps
|
|
|
|
|
if [ "$control" != "debian/control" ] ; then rm $control; fi
|
2021-11-01 21:39:39 +00:00
|
|
|
|
|
|
|
|
|
# for rgw motr backend build checks
|
2022-08-11 17:47:39 +00:00
|
|
|
|
if $with_rgw_motr; then
|
2022-08-09 14:46:59 +00:00
|
|
|
|
install_cortx_motr_on_ubuntu
|
2022-01-28 11:33:12 +00:00
|
|
|
|
fi
|
2014-11-25 16:25:26 +00:00
|
|
|
|
;;
|
2021-11-01 21:39:39 +00:00
|
|
|
|
rocky|centos|fedora|rhel|ol|virtuozzo)
|
2019-10-25 05:51:38 +00:00
|
|
|
|
builddepcmd="dnf -y builddep --allowerasing"
|
2020-06-25 11:40:50 +00:00
|
|
|
|
echo "Using dnf to install dependencies"
|
2019-09-24 19:48:27 +00:00
|
|
|
|
case "$ID" in
|
2018-08-01 10:52:45 +00:00
|
|
|
|
fedora)
|
2020-06-25 11:40:50 +00:00
|
|
|
|
$SUDO dnf install -y dnf-utils
|
2014-11-25 16:25:26 +00:00
|
|
|
|
;;
|
2021-11-01 21:39:39 +00:00
|
|
|
|
rocky|centos|rhel|ol|virtuozzo)
|
2019-02-01 00:36:17 +00:00
|
|
|
|
MAJOR_VERSION="$(echo $VERSION_ID | cut -d. -f1)"
|
2022-08-16 15:39:25 +00:00
|
|
|
|
$SUDO dnf install -y dnf-utils selinux-policy-targeted
|
2019-09-27 02:26:54 +00:00
|
|
|
|
rpm --quiet --query epel-release || \
|
2022-10-10 14:16:44 +00:00
|
|
|
|
$SUDO dnf -y install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-$MAJOR_VERSION.noarch.rpm
|
2019-02-01 00:36:17 +00:00
|
|
|
|
$SUDO rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$MAJOR_VERSION
|
2015-03-04 12:47:37 +00:00
|
|
|
|
$SUDO rm -f /etc/yum.repos.d/dl.fedoraproject.org*
|
2022-10-10 14:16:44 +00:00
|
|
|
|
if test $ID = centos -a $MAJOR_VERSION = 8 ; then
|
2020-11-09 23:43:45 +00:00
|
|
|
|
# Enable 'powertools' or 'PowerTools' repo
|
|
|
|
|
$SUDO dnf config-manager --set-enabled $(dnf repolist --all 2>/dev/null|gawk 'tolower($0) ~ /^powertools\s/{print $1}')
|
2022-10-10 14:16:44 +00:00
|
|
|
|
dts_ver=11
|
|
|
|
|
# before EPEL8 and PowerTools provide all dependencies, we use sepia for the dependencies
|
2020-03-12 06:14:28 +00:00
|
|
|
|
$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
|
2020-06-16 12:49:29 +00:00
|
|
|
|
$SUDO dnf -y module enable javapackages-tools
|
2024-01-26 19:50:19 +00:00
|
|
|
|
elif test $ID = centos -a $MAJOR_VERSION = 9 ; then
|
|
|
|
|
$SUDO dnf config-manager --set-enabled crb
|
2020-03-12 06:14:28 +00:00
|
|
|
|
elif test $ID = rhel -a $MAJOR_VERSION = 8 ; then
|
2022-08-10 20:36:11 +00:00
|
|
|
|
dts_ver=11
|
2021-04-03 06:56:42 +00:00
|
|
|
|
$SUDO dnf config-manager --set-enabled "codeready-builder-for-rhel-8-${ARCH}-rpms"
|
2022-10-10 14:16:44 +00:00
|
|
|
|
$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
|
2017-04-03 13:35:49 +00:00
|
|
|
|
fi
|
2015-03-04 12:47:37 +00:00
|
|
|
|
;;
|
2014-11-25 16:25:26 +00:00
|
|
|
|
esac
|
2022-10-03 18:43:19 +00:00
|
|
|
|
if [ "$INSTALL_EXTRA_PACKAGES" ]; then
|
|
|
|
|
$SUDO dnf install -y $INSTALL_EXTRA_PACKAGES
|
|
|
|
|
fi
|
2024-01-04 13:30:31 +00:00
|
|
|
|
munge_ceph_spec_in $with_seastar $for_make_check $DIR/ceph.spec
|
2019-10-10 02:40:53 +00:00
|
|
|
|
# for python3_pkgversion macro defined by python-srpm-macros, which is required by python3-devel
|
2020-06-25 11:40:50 +00:00
|
|
|
|
$SUDO dnf install -y python3-devel
|
2016-09-16 04:29:15 +00:00
|
|
|
|
$SUDO $builddepcmd $DIR/ceph.spec 2>&1 | tee $DIR/yum-builddep.out
|
2018-06-24 01:48:50 +00:00
|
|
|
|
[ ${PIPESTATUS[0]} -ne 0 ] && exit 1
|
2022-10-10 14:16:44 +00:00
|
|
|
|
if [ -n "$dts_ver" ]; then
|
2022-02-24 18:23:12 +00:00
|
|
|
|
ensure_decent_gcc_on_rh $dts_ver
|
2022-10-10 14:16:44 +00:00
|
|
|
|
fi
|
2019-07-30 16:45:44 +00:00
|
|
|
|
IGNORE_YUM_BUILDEP_ERRORS="ValueError: SELinux policy is not managed or store cannot be accessed."
|
2022-08-16 15:39:25 +00:00
|
|
|
|
sed "/$IGNORE_YUM_BUILDEP_ERRORS/d" $DIR/yum-builddep.out | grep -i "error:" && exit 1
|
2021-11-01 21:39:39 +00:00
|
|
|
|
# for rgw motr backend build checks
|
2022-01-28 11:33:12 +00:00
|
|
|
|
if ! rpm --quiet -q cortx-motr-devel &&
|
|
|
|
|
{ [[ $FOR_MAKE_CHECK ]] || $with_rgw_motr; }; then
|
2021-11-01 21:39:39 +00:00
|
|
|
|
$SUDO dnf install -y \
|
|
|
|
|
"$motr_pkgs_url/isa-l-2.30.0-1.el7.${ARCH}.rpm" \
|
|
|
|
|
"$motr_pkgs_url/cortx-motr-2.0.0-1_git3252d623_any.el8.${ARCH}.rpm" \
|
|
|
|
|
"$motr_pkgs_url/cortx-motr-devel-2.0.0-1_git3252d623_any.el8.${ARCH}.rpm"
|
2022-01-28 11:33:12 +00:00
|
|
|
|
fi
|
2014-11-25 16:25:26 +00:00
|
|
|
|
;;
|
2018-07-02 13:23:58 +00:00
|
|
|
|
opensuse*|suse|sles)
|
2016-06-29 07:40:07 +00:00
|
|
|
|
echo "Using zypper to install dependencies"
|
2018-02-14 10:49:03 +00:00
|
|
|
|
zypp_install="zypper --gpg-auto-import-keys --non-interactive install --no-recommends"
|
2019-12-06 14:29:30 +00:00
|
|
|
|
$SUDO $zypp_install systemd-rpm-macros rpm-build || exit 1
|
2022-10-03 18:43:19 +00:00
|
|
|
|
if [ "$INSTALL_EXTRA_PACKAGES" ]; then
|
|
|
|
|
$SUDO $zypp_install $INSTALL_EXTRA_PACKAGES
|
|
|
|
|
fi
|
2022-02-01 11:18:18 +00:00
|
|
|
|
munge_ceph_spec_in $with_seastar false $for_make_check $DIR/ceph.spec
|
2018-02-14 10:49:03 +00:00
|
|
|
|
$SUDO $zypp_install $(rpmspec -q --buildrequires $DIR/ceph.spec) || exit 1
|
2015-03-23 20:28:20 +00:00
|
|
|
|
;;
|
2016-06-29 07:40:07 +00:00
|
|
|
|
*)
|
2016-09-05 13:40:33 +00:00
|
|
|
|
echo "$ID is unknown, dependencies will have to be installed manually."
|
2022-10-10 14:16:44 +00:00
|
|
|
|
exit 1
|
2014-11-25 16:25:26 +00:00
|
|
|
|
;;
|
2016-06-29 07:40:07 +00:00
|
|
|
|
esac
|
|
|
|
|
fi
|
2015-05-02 13:59:12 +00:00
|
|
|
|
|
2015-05-30 08:53:51 +00:00
|
|
|
|
# use pip cache if possible but do not store it outside of the source
|
|
|
|
|
# tree
|
|
|
|
|
# see https://pip.pypa.io/en/stable/reference/pip_install.html#caching
|
2019-08-27 01:22:34 +00:00
|
|
|
|
if $for_make_check; then
|
|
|
|
|
mkdir -p install-deps-cache
|
|
|
|
|
top_srcdir=$(pwd)
|
|
|
|
|
export XDG_CACHE_HOME=$top_srcdir/install-deps-cache
|
|
|
|
|
wip_wheelhouse=wheelhouse-wip
|
|
|
|
|
#
|
|
|
|
|
# preload python modules so that tox can run without network access
|
|
|
|
|
#
|
|
|
|
|
find . -name tox.ini | while read ini ; do
|
|
|
|
|
preload_wheels_for_tox $ini
|
|
|
|
|
done
|
2019-12-18 10:33:24 +00:00
|
|
|
|
rm -rf $top_srcdir/install-deps-python3
|
2019-08-27 01:22:34 +00:00
|
|
|
|
rm -rf $XDG_CACHE_HOME
|
2019-12-18 11:58:04 +00:00
|
|
|
|
type git > /dev/null || (echo "Dashboard uses git to pull dependencies." ; false)
|
2019-08-27 01:22:34 +00:00
|
|
|
|
fi
|
2022-03-25 21:29:44 +00:00
|
|
|
|
|
2022-10-31 19:18:25 +00:00
|
|
|
|
ci_debug "End install-deps.sh" || true
|