From 26a5d7e850c7aea30902f2e19bbd86bfa78e0bf9 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 4 Aug 2019 11:41:26 +0800 Subject: [PATCH] install-deps.sh: use chacra for cmake repo two reasons: - do not rely on kitware repo so we have better control of the cmake3: the `debian` directory is tracked by https://github.com/tchaikov/ceph-cmake - chacra repo also offers aarch64 build of cmake3 Signed-off-by: Kefu Chai --- install-deps.sh | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/install-deps.sh b/install-deps.sh index 80f8861565a..b32c16ddb99 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -125,6 +125,10 @@ ENDOFKEY } function ensure_decent_cmake_on_ubuntu { + # TODO: remove me after a while + # remove Kitware Apt Archive Automatic Signing Key + $SUDO apt-key del 40CD72DA + $SUDO rm -f /etc/apt/sources.list.d/kitware.list local new=$1 if command -v cmake > /dev/null; then local old=$(cmake --version | grep -Po 'version \K[0-9].*') @@ -132,12 +136,12 @@ function ensure_decent_cmake_on_ubuntu { return fi fi - $SUDO curl --silent https://apt.kitware.com/keys/kitware-archive-latest.asc | $SUDO apt-key add - - $SUDO tee /etc/apt/sources.list.d/kitware.list < /dev/null; then - missing_pkgs+=" $pkg" - fi - done + if [ $force = "force" ]; then + missing_pkgs="$@" + else + for pkg in $pkgs; do + if ! dpkg -s $pkg &> /dev/null; then + missing_pkgs+=" $pkg" + 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 @@ -168,6 +178,7 @@ function install_boost_on_ubuntu { ceph-libboost1.67 \ dd38c27740c1f9a9e6719a07eef84a1369dc168b \ $codename \ + check \ ceph-libboost-atomic1.67-dev \ ceph-libboost-chrono1.67-dev \ ceph-libboost-container1.67-dev \ @@ -300,8 +311,8 @@ else ensure_decent_gcc_on_ubuntu 8 trusty ;; *Xenial*) - ensure_decent_cmake_on_ubuntu 3.10.1 ensure_decent_gcc_on_ubuntu 8 xenial + ensure_decent_cmake_on_ubuntu 3.10.1 [ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu xenial ;; *Bionic*) -- 2.39.5