From: Kefu Chai Date: Fri, 12 Mar 2021 04:02:22 +0000 (+0800) Subject: ceph.spec: build with system libpmem on fedora and el8 X-Git-Tag: v17.1.0~2631^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=75b58115ead7a42495b60cccf43e7a433fcc4a5f;p=ceph.git ceph.spec: build with system libpmem on fedora and el8 * build with WITH_SYSTEM_PMDK=ON on fedora, as f32 and f33 ship libpmem1.8 and libpmem1.9 respectively. and we need libpmem v1.7 * build with WITH_SYSTEM_PMDK=ON on el8, as el8 and CentOS8 AppStream ships libpmem v1.6, quote from nvml.spec: > By design, PMDK does not support any 32-bit architecture. > Due to dependency on some inline assembly, PMDK can be compiled only > on these architectures: > - x86_64 > - ppc64le (experimental) > - aarch64 (unmaintained, supporting hardware doesn't exist?) so far, only x86_64 and ppc64le packages are built. see also, https://src.fedoraproject.org/rpms/nvml/blob/rawhide/f/nvml.spec this change addresses a regression introduced by a49d1dbb32e2436ff2836a85b2fa84418f0a5fff Signed-off-by: Kefu Chai --- diff --git a/ceph.spec.in b/ceph.spec.in index 9ced87974e04..b26bda86cab6 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -31,6 +31,14 @@ %endif %if 0%{?fedora} || 0%{?rhel} %bcond_without selinux +%ifarch x86_64 ppc64le +%bcond_without rbd_rwl_cache +%bcond_without rbd_ssd_cache +%global _system_pmdk 1 +%else +%bcond_with rbd_rwl_cache +%bcond_with rbd_ssd_cache +%endif %if 0%{?rhel} >= 8 %bcond_with cephfs_java %else @@ -43,9 +51,6 @@ %bcond_without ocf %global luarocks_package_name luarocks %bcond_without lua_packages -%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} @@ -273,6 +278,10 @@ BuildRequires: nlohmann_json-devel BuildRequires: libevent-devel BuildRequires: yaml-cpp-devel %endif +%if 0%{?_system_pmdk} +BuildRequires: libpmem-devel +BuildRequires: libpmemobj-devel +%endif %if 0%{with seastar} BuildRequires: c-ares-devel BuildRequires: gnutls-devel @@ -323,10 +332,6 @@ 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