mirror of
https://github.com/ceph/ceph
synced 2025-02-06 18:34:17 +00:00
Merge pull request #37211 from tchaikov/wip-zbd
rpm,install-deps,run-make-check: enable WITH_ZBD build on demand Reviewed-by: Neha Ojha <nojha@redhat.com>
This commit is contained in:
commit
4aced0cba9
@ -21,6 +21,7 @@
|
||||
# bcond syntax!
|
||||
#################################################################################
|
||||
%bcond_with make_check
|
||||
%bcond_with zbd
|
||||
%bcond_with cmake_verbose_logging
|
||||
%bcond_without ceph_test_package
|
||||
%ifarch s390 s390x
|
||||
@ -196,6 +197,9 @@ BuildRequires: python%{python3_pkgversion}-coverage
|
||||
BuildRequires: python%{python3_pkgversion}-pyOpenSSL
|
||||
BuildRequires: socat
|
||||
%endif
|
||||
%if 0%{with zbd}
|
||||
BuildRequires: libzbd-devel
|
||||
%endif
|
||||
%if 0%{with seastar}
|
||||
BuildRequires: c-ares-devel
|
||||
BuildRequires: gnutls-devel
|
||||
|
@ -26,6 +26,8 @@ ARCH=$(uname -m)
|
||||
function munge_ceph_spec_in {
|
||||
local with_seastar=$1
|
||||
shift
|
||||
local with_zbd=$1
|
||||
shift
|
||||
local for_make_check=$1
|
||||
shift
|
||||
local OUTFILE=$1
|
||||
@ -34,6 +36,9 @@ function munge_ceph_spec_in {
|
||||
if $with_seastar; then
|
||||
sed -i -e 's/%bcond_with seastar/%bcond_without seastar/g' $OUTFILE
|
||||
fi
|
||||
if $with_zbd; then
|
||||
sed -i -e 's/%bcond_with zbd/%bcond_without zbd/g' $OUTFILE
|
||||
fi
|
||||
if $for_make_check; then
|
||||
sed -i -e 's/%bcond_with make_check/%bcond_without make_check/g' $OUTFILE
|
||||
fi
|
||||
@ -267,6 +272,7 @@ if [ x$(uname)x = xFreeBSDx ]; then
|
||||
exit
|
||||
else
|
||||
[ $WITH_SEASTAR ] && with_seastar=true || with_seastar=false
|
||||
[ $WITH_ZBD ] && with_zbd=true || with_zbd=false
|
||||
source /etc/os-release
|
||||
case "$ID" in
|
||||
debian|ubuntu|devuan|elementary)
|
||||
@ -334,7 +340,7 @@ else
|
||||
$SUDO dnf copr enable -y tchaikov/gcc-toolset-9 centos-stream-x86_64
|
||||
;;
|
||||
esac
|
||||
munge_ceph_spec_in $with_seastar $for_make_check $DIR/ceph.spec
|
||||
munge_ceph_spec_in $with_seastar $with_zbd $for_make_check $DIR/ceph.spec
|
||||
# for python3_pkgversion macro defined by python-srpm-macros, which is required by python3-devel
|
||||
$SUDO dnf install -y python3-devel
|
||||
$SUDO $builddepcmd $DIR/ceph.spec 2>&1 | tee $DIR/yum-builddep.out
|
||||
@ -346,7 +352,7 @@ else
|
||||
echo "Using zypper to install dependencies"
|
||||
zypp_install="zypper --gpg-auto-import-keys --non-interactive install --no-recommends"
|
||||
$SUDO $zypp_install systemd-rpm-macros rpm-build || exit 1
|
||||
munge_ceph_spec_in $with_seastar $for_make_check $DIR/ceph.spec
|
||||
munge_ceph_spec_in $with_seastar false $for_make_check $DIR/ceph.spec
|
||||
$SUDO $zypp_install $(rpmspec -q --buildrequires $DIR/ceph.spec) || exit 1
|
||||
;;
|
||||
*)
|
||||
|
@ -58,6 +58,9 @@ function main() {
|
||||
if [ $WITH_SEASTAR ]; then
|
||||
cmake_opts+=" -DWITH_SEASTAR=ON"
|
||||
fi
|
||||
if [ $WITH_ZBD ]; then
|
||||
cmake_opts += " -DWITH_ZBD=ON"
|
||||
fi
|
||||
configure $cmake_opts $@
|
||||
build tests && echo "make check: successful build on $(git rev-parse HEAD)"
|
||||
run
|
||||
|
Loading…
Reference in New Issue
Block a user