From 25d5122b5538062e8282251c3d7bae0f9792d596 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 3 Jul 2018 17:06:47 +0800 Subject: [PATCH] rpm,install-deps.sh: add --with-seastar option Signed-off-by: Kefu Chai --- ceph.spec.in | 15 ++++++++++++++- install-deps.sh | 19 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/ceph.spec.in b/ceph.spec.in index f155092fbe2b5..f0b79644072d2 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -46,6 +46,7 @@ %endif %endif %endif +%bcond_with seastar %if 0%{?suse_version} >= 1500 %bcond_with python2 %else @@ -174,7 +175,19 @@ BuildRequires: python%{_python_buildid}-tox BuildRequires: python%{_python_buildid}-virtualenv BuildRequires: socat %endif - +%if 0%{with seastar} +BuildRequires: cryptopp-devel +BuildRequires: gnutls-devel +BuildRequires: hwloc-devel +BuildRequires: libpciaccess-devel +BuildRequires: lksctp-tools-devel +BuildRequires: numactl-devel +BuildRequires: protobuf-compiler +BuildRequires: protobuf-devel +BuildRequires: ragel +BuildRequires: systemtap-sdt-devel +BuildRequires: yaml-cpp-devel +%endif ################################################################################# # distro-conditional dependencies ################################################################################# diff --git a/install-deps.sh b/install-deps.sh index b5f99748d7805..45a3746bcdb31 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -23,6 +23,21 @@ export LC_ALL=C # the following is vulnerable to i18n ARCH=`uname -m` +if [ -n $WITH_SEASTAR ]; then + with_seastar=true +else + with_seastar=false +fi + +function install_seastar_deps { + if $with_seastar; then + $SUDO apt-get install -y \ + ragel libhwloc-dev libnuma-dev libpciaccess-dev \ + libcrypto++-dev libgnutls28-dev libsctp-dev libprotobuf-dev \ + protobuf-compiler systemtap-sdt-dev libyaml-cpp-dev + fi +} + function munge_ceph_spec_in { local OUTFILE=$1 sed -e 's/@//g' -e 's/%bcond_with make_check/%bcond_without make_check/g' < ceph.spec.in > $OUTFILE @@ -31,6 +46,9 @@ function munge_ceph_spec_in { else sed -i -e 's/%bcond_without python2/%bcond_with python2/g' $OUTFILE fi + if $with_seastar; then + sed -i -e 's/%bcond_with seastar/%bcond_without seastar/g' $OUTFILE + fi } function ensure_decent_gcc_on_deb { @@ -196,6 +214,7 @@ else # work is done $SUDO env DEBIAN_FRONTEND=noninteractive mk-build-deps --install --remove --tool="apt-get -y --no-install-recommends $backports" $control || exit 1 $SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y remove ceph-build-deps + install_seastar_deps if [ -n "$backports" ] ; then rm $control; fi ;; centos|fedora|rhel|ol|virtuozzo) -- 2.39.5