]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm,install-deps.sh: add --with-seastar option
authorKefu Chai <kchai@redhat.com>
Tue, 3 Jul 2018 09:06:47 +0000 (17:06 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 12 Jul 2018 09:49:34 +0000 (17:49 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph.spec.in
install-deps.sh

index f155092fbe2b52cfa11fcf169a598a8dab3d8b47..f0b79644072d2f7e33148137fec5f49a6b6e1fb5 100644 (file)
@@ -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
 #################################################################################
index b5f99748d78056adf4e43fe529d8877b36e1af2d..45a3746bcdb31416d8a585fe96ef66e07cf0cabb 100755 (executable)
@@ -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)