]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph.spec: build with system libpmem on fedora and el8
authorKefu Chai <kchai@redhat.com>
Fri, 12 Mar 2021 04:02:22 +0000 (12:02 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 12 Mar 2021 15:04:11 +0000 (23:04 +0800)
* 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 <kchai@redhat.com>
ceph.spec.in

index 9ced87974e04919916371e4eb0c4dc8cc6ec55ac..b26bda86cab65c03de47f46347c34306897eeb94 100644 (file)
 %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