From: Nathan Cutler Date: Tue, 27 Jun 2017 07:45:09 +0000 (+0200) Subject: build/ops: rpm: put mgr python build dependencies in make_check bcond X-Git-Tag: ses5-milestone9~1^2~12^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a502a939076715c75fcace835062d5e71205e527;p=ceph.git build/ops: rpm: put mgr python build dependencies in make_check bcond Fixes: http://tracker.ceph.com/issues/20425 Signed-off-by: Nathan Cutler Signed-off-by: Tim Serong --- diff --git a/ceph.spec.in b/ceph.spec.in index 07231917f0ac..f68fb0a4f752 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -102,6 +102,17 @@ BuildRequires: checkpolicy BuildRequires: selinux-policy-devel BuildRequires: /usr/share/selinux/devel/policyhelp %endif +%if 0%{with make_check} +%if 0%{?fedora} || 0%{?rhel} +BuildRequires: python-cherrypy +BuildRequires: python-werkzeug +%endif +%if 0%{?suse_version} +BuildRequires: python-CherryPy +BuildRequires: python-Werkzeug +%endif +BuildRequires: python-pecan +%endif BuildRequires: bc BuildRequires: gperf BuildRequires: cmake @@ -127,10 +138,8 @@ BuildRequires: pkgconfig BuildRequires: python BuildRequires: python-devel BuildRequires: python-nose -BuildRequires: python-pecan BuildRequires: python-requests BuildRequires: python-virtualenv -BuildRequires: python-werkzeug BuildRequires: socat BuildRequires: snappy-devel BuildRequires: udev @@ -159,7 +168,6 @@ BuildRequires: keyutils-devel BuildRequires: libopenssl-devel BuildRequires: lsb-release BuildRequires: openldap2-devel -BuildRequires: python-CherryPy BuildRequires: python-Cython BuildRequires: python-PrettyTable BuildRequires: python-Sphinx @@ -176,7 +184,6 @@ BuildRequires: openldap-devel BuildRequires: openssl-devel BuildRequires: redhat-lsb-core BuildRequires: Cython -BuildRequires: python-cherrypy BuildRequires: python-prettytable BuildRequires: python-sphinx %endif diff --git a/install-deps.sh b/install-deps.sh index 315848d90526..87457874c395 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -19,6 +19,11 @@ if test $(id -u) != 0 ; then fi export LC_ALL=C # the following is vulnerable to i18n +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 +} + if [ x`uname`x = xFreeBSDx ]; then $SUDO pkg install -yq \ devel/git \ @@ -129,14 +134,14 @@ else fi ;; esac - sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec + munge_ceph_spec_in $DIR/ceph.spec $SUDO $builddepcmd $DIR/ceph.spec 2>&1 | tee $DIR/yum-builddep.out ! grep -q -i error: $DIR/yum-builddep.out || exit 1 ;; opensuse|suse|sles) echo "Using zypper to install dependencies" $SUDO zypper --gpg-auto-import-keys --non-interactive install lsb-release systemd-rpm-macros - sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec + munge_ceph_spec_in $DIR/ceph.spec $SUDO zypper --non-interactive install $(rpmspec -q --buildrequires $DIR/ceph.spec) || exit 1 ;; alpine)