1
0
mirror of https://github.com/ceph/ceph synced 2024-12-23 11:54:11 +00:00

Merge pull request from tchaikov/wip-add-ceph-libboost-repo

install-deps,run-make-check: use ceph-libboost repo

Reviewed-by: Alfredo Deza <adeza@redhat.com>
Reviewed-by: Erwan Velu <erwan@redhat.com>
This commit is contained in:
Kefu Chai 2018-09-13 19:40:26 +08:00 committed by GitHub
commit b61afd73e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2175 additions and 3 deletions

View File

@ -629,6 +629,9 @@ if(WITH_SYSTEM_BOOST)
else()
set(Boost_USE_STATIC_LIBS ON)
endif()
if(BOOST_ROOT AND CMAKE_LIBRARY_ARCHITECTURE)
set(BOOST_LIBRARYDIR "${BOOST_ROOT}/lib/${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
find_package(Boost 1.67 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
else()
set(BOOST_J 1 CACHE STRING
@ -637,8 +640,8 @@ else()
include(BuildBoost)
build_boost(1.67
COMPONENTS ${BOOST_COMPONENTS} ${BOOST_HEADER_COMPONENTS})
include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIRS})
endif()
include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIRS})
set(Boost_USE_MULTITHREADED ON)
# dashboard angular2 frontend

File diff suppressed because it is too large Load Diff

View File

@ -12,13 +12,12 @@ fi
mkdir build
cd build
NPROC=${NPROC:-$(nproc)}
if type cmake3 > /dev/null 2>&1 ; then
CMAKE=cmake3
else
CMAKE=cmake
fi
${CMAKE} -DBOOST_J=$NPROC $ARGS "$@" .. || exit 1
${CMAKE} $ARGS "$@" .. || exit 1
# minimal config to find plugins
cat <<EOF > ceph.conf

View File

@ -105,6 +105,28 @@ ENDOFKEY
$SUDO ln -nsf /usr/bin/g++ /usr/bin/$(uname -m)-linux-gnu-g++
}
function install_pkg_on_ubuntu {
local project=$1
shift
local sha1=$1
shift
local codename=$1
shift
local pkgs=$@
local missing_pkgs
for pkg in $pkgs; do
if ! dpkg -s $pkg &> /dev/null; then
missing_pkgs+=" $pkg"
fi
done
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
fi
}
function version_lt {
test $1 != $(echo -e "$1\n$2" | sort -rV | head -n 1)
}
@ -200,6 +222,25 @@ else
;;
*Xenial*)
ensure_decent_gcc_on_ubuntu 7 xenial
install_pkg_on_ubuntu \
ceph-libboost1.67 \
dd38c27740c1f9a9e6719a07eef84a1369dc168b \
xenial \
ceph-libboost-atomic1.67-dev \
ceph-libboost-chrono1.67-dev \
ceph-libboost-container1.67-dev \
ceph-libboost-context1.67-dev \
ceph-libboost-coroutine1.67-dev \
ceph-libboost-date-time1.67-dev \
ceph-libboost-filesystem1.67-dev \
ceph-libboost-iostreams1.67-dev \
ceph-libboost-program-options1.67-dev \
ceph-libboost-python1.67-dev \
ceph-libboost-random1.67-dev \
ceph-libboost-regex1.67-dev \
ceph-libboost-system1.67-dev \
ceph-libboost-thread1.67-dev \
ceph-libboost-timer1.67-dev
;;
*)
$SUDO apt-get install -y gcc

View File

@ -50,6 +50,17 @@ function get_processors() {
fi
}
function detect_ceph_dev_pkgs() {
local cmake_opts
local boost_root=/opt/ceph
if test -f $boost_root/include/boost/config.hpp; then
cmake_opts+=" -DWITH_SYSTEM_BOOST=ON -DBOOST_ROOT=$boost_root"
else
cmake_opts+=" -DBOOST_J=$(get_processors)"
fi
echo "$cmake_opts"
}
function run() {
local install_cmd
local which_pkg="which"
@ -103,6 +114,7 @@ function run() {
if ! type python2 > /dev/null 2>&1 ; then
CMAKE_BUILD_OPTS+=" -DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DMGR_PYTHON_VERSION=3"
fi
CMAKE_BUILD_OPTS+=$(detect_ceph_dev_pkgs)
cat <<EOM
Note that the binaries produced by this script do not contain correct time
and git version information, which may make them unsuitable for debugging