Skip to content

Commit

Permalink
Merge pull request #19645 from tchaikov/wip-install-deps
Browse files Browse the repository at this point in the history
install-deps: use DTS-7 on aarch64 and only download mirrored package indexes

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
  • Loading branch information
liewegas committed Jan 2, 2018
2 parents afdea9f + 7bb8f66 commit 089e287
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 32 deletions.
18 changes: 0 additions & 18 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,7 @@ BuildRequires: fuse-devel
%if 0%{?rhel} == 7
# devtoolset offers newer make and valgrind-devel, but the old ones are good
# enough.
%ifarch x86_64
BuildRequires: devtoolset-7-gcc-c++
%endif
%ifarch aarch64
%if 0%{?centos}
BuildRequires: devtoolset-6-gcc-c++
%else
BuildRequires: devtoolset-7-gcc-c++
%endif
%endif
%else
BuildRequires: gcc-c++
%endif
Expand Down Expand Up @@ -798,17 +789,8 @@ python-rbd, python-rgw or python-cephfs instead.
%build

%if 0%{?rhel} == 7
%ifarch x86_64
. /opt/rh/devtoolset-7/enable
%endif
%ifarch aarch64
%if 0%{?centos}
. /opt/rh/devtoolset-6/enable
%else
. /opt/rh/devtoolset-7/enable
%endif
%endif
%endif

%if 0%{with cephfs_java}
# Find jni.h
Expand Down
25 changes: 11 additions & 14 deletions install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ function ensure_decent_gcc_on_deb {
if [ ! -f /usr/bin/g++-${new} ]; then
$SUDO tee /etc/apt/sources.list.d/ubuntu-toolchain-r.list <<EOF
deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu $dist main
deb http://mirror.cs.uchicago.edu/ubuntu-toolchain-r $dist main
deb http://mirror.yandex.ru/mirrors/launchpad/ubuntu-toolchain-r $dist main
deb [arch=amd64] http://mirror.cs.uchicago.edu/ubuntu-toolchain-r $dist main
deb [arch=amd64,i386] http://mirror.yandex.ru/mirrors/launchpad/ubuntu-toolchain-r $dist main
EOF
# import PPA's signing key into APT's keyring
$SUDO apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F
$SUDO apt-get update
$SUDO apt-get -y update -o Acquire::Languages=none -o Acquire::Translation=none || true
$SUDO apt-get install -y g++-7
fi

Expand Down Expand Up @@ -80,10 +80,9 @@ function ensure_decent_gcc_on_rh {
local expected=5.1
local dts_ver=$1
if version_lt $old $expected; then
case $- in
*i*)
# interactive shell
cat <<EOF
if test -t 1; then
# interactive shell
cat <<EOF
Your GCC is too old. Please run following command to add DTS to your environment:
scl enable devtoolset-7 bash
Expand All @@ -94,12 +93,10 @@ source scl_source enable devtoolset-7
see https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/ for more details.
EOF
;;
*)
# non-interactive shell
source /opt/rh/devtoolset-$dts_ver/enable
;;
esac
else
# non-interactive shell
source /opt/rh/devtoolset-$dts_ver/enable
fi
fi
}

Expand Down Expand Up @@ -232,7 +229,7 @@ else
$SUDO yum -y install centos-release-scl-rh
$SUDO yum-config-manager --disable centos-sclo-rh
$SUDO yum-config-manager --enable centos-sclo-rh-testing
dts_ver=6
dts_ver=7
;;
esac
elif test $(lsb_release -si) = RedHatEnterpriseServer -a $MAJOR_VERSION = 7 ; then
Expand Down

0 comments on commit 089e287

Please sign in to comment.