]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm: use PMDK system libraries on SUSE
authorNathan Cutler <ncutler@suse.com>
Mon, 1 Mar 2021 11:07:29 +0000 (12:07 +0100)
committerNathan Cutler <ncutler@suse.com>
Thu, 4 Mar 2021 10:46:45 +0000 (11:46 +0100)
As of a49d1dbb32e2436ff2836a85b2fa84418f0a5fff, when the rbd_rwl_cache and
rbd_ssd_cache bconds are enabled and WITH_SYSTEM_PMDK is disabled (as it is by
default), the RPM build attempts to

    git clone https://github.com/ceph/pmdk.git

but of course that won't work in the OBS, where the build workers have no
Internet connectivity.

Fortunately, the openSUSE/SLE versions targeted by Ceph master and pacific ship
the necessary PMDK libraries as RPM packages.

Fixes: a49d1dbb32e2436ff2836a85b2fa84418f0a5fff
Fixes: https://tracker.ceph.com/issues/49550
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 30df650e6496e35c798eab7d85ea0806fd58722b)

Conflicts:
ceph.spec.in

ceph.spec.in

index 665989f0b6679ab350c224bdca217a3a84771de3..e2f456ed27b3004daa6d81c8194b52a4ca110ac4 100644 (file)
@@ -41,6 +41,9 @@
 %bcond_without lttng
 %bcond_without libradosstriper
 %bcond_without ocf
+%bcond_without rbd_rwl_cache
+%bcond_without rbd_ssd_cache
+%global _system_pmdk 0
 %global _remote_tarball_prefix https://download.ceph.com/tarballs/
 %endif
 %if 0%{?suse_version}
 %bcond_with libradosstriper
 %ifarch x86_64 aarch64 ppc64le
 %bcond_without lttng
+%global _system_pmdk 1
+%bcond_without rbd_rwl_cache
+%bcond_without rbd_ssd_cache
 %else
 %bcond_with lttng
+%global _system_pmdk 0
+%bcond_with rbd_rwl_cache
+%bcond_with rbd_ssd_cache
 %endif
 %bcond_with ocf
 %bcond_with selinux
@@ -62,8 +71,6 @@
 %endif
 %bcond_with seastar
 %bcond_with jaeger
-%bcond_without rbd_rwl_cache
-%bcond_without rbd_ssd_cache
 %if 0%{?fedora} || 0%{?suse_version} >= 1500
 # distros that ship cmd2 and/or colorama
 %bcond_without cephfs_shell
@@ -283,6 +290,10 @@ BuildRequires:  rdma-core-devel
 BuildRequires: liblz4-devel >= 1.7
 # for prometheus-alerts
 BuildRequires:  golang-github-prometheus-prometheus
+%if 0%{?_system_pmdk}
+BuildRequires:  libpmem-devel
+BuildRequires:  libpmemobj-devel
+%endif
 %endif
 %if 0%{?fedora} || 0%{?rhel}
 Requires:      systemd
@@ -1278,6 +1289,9 @@ ${CMAKE} .. \
 %endif
 %if 0%{with rbd_ssd_cache}
     -DWITH_RBD_SSD_CACHE=ON \
+%endif
+%if 0%{?_system_pmdk}
+    -DWITH_SYSTEM_PMDK:BOOL=ON \
 %endif
     -DBOOST_J=$CEPH_SMP_NCPUS \
     -DWITH_GRAFANA=ON