New release (1:12.2.5-2)

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
This commit is contained in:
Kaleb S. KEITHLEY 2018-07-01 06:35:53 -04:00
parent 9094835645
commit 9b4d3225ea
6 changed files with 536 additions and 331 deletions

View File

@ -0,0 +1,13 @@
--- ceph-12.1.1.orig/src/rocksdb/util/murmurhash.cc 2017-04-27 01:13:46.000000000 +0100
+++ ceph-12.1.1.orig/src/rocksdb/util/murmurhash.cc 2017-07-25 11:37:28.910266684 +0100
@@ -113,8 +113,8 @@ unsigned int MurmurHash2 ( const void *
switch(len)
{
- case 3: h ^= data[2] << 16;
- case 2: h ^= data[1] << 8;
+ case 3: h ^= data[2] << 16; // fallthrough
+ case 2: h ^= data[1] << 8; // fallthrough
case 1: h ^= data[0];
h *= m;
};

View File

@ -0,0 +1,127 @@
From 2f0a7153460acc3f21462236f470ec3471fa2ee1 Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Mon, 31 Jul 2017 19:50:23 +0200
Subject: [PATCH] cmake: Support ppc64
The ppc64 support requires a couple of changes:
- adding the ppc64 support to cmake
- changing optimized crc32 code to compile on ppc64le only
- moving ifdef condition before crc32_align to avoid defined but not
used warning
Signed-off-by: Boris Ranto <branto@redhat.com>
---
cmake/modules/SIMDExt.cmake | 15 ++++++++++++++-
src/CMakeLists.txt | 4 +++-
src/arch/ppc.c | 8 ++++----
src/common/crc32c_ppc.c | 6 +++---
4 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/cmake/modules/SIMDExt.cmake b/cmake/modules/SIMDExt.cmake
index 5330835..c47667d 100644
--- a/cmake/modules/SIMDExt.cmake
+++ b/cmake/modules/SIMDExt.cmake
@@ -109,7 +109,20 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(powerpc|ppc)64le")
set(HAVE_PPC64LE 1)
- message(STATUS " we are ppc64le")
+ message(STATUS " we are ppc64")
+ CHECK_C_COMPILER_FLAG("-maltivec" HAS_ALTIVEC)
+ if(HAS_ALTIVEC)
+ message(STATUS " HAS_ALTIVEC yes")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maltivec")
+ set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -maltivec")
+ endif()
+ CHECK_C_COMPILER_FLAG("-mcpu=power8" HAVE_POWER8)
+ if(HAVE_POWER8)
+ message(STATUS " HAVE_POWER8 yes")
+ endif()
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(power|ppc)64")
+ set(HAVE_PPC64 1)
+ message(STATUS " we are ppc64")
CHECK_C_COMPILER_FLAG("-maltivec" HAS_ALTIVEC)
if(HAS_ALTIVEC)
message(STATUS " HAS_ALTIVEC yes")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 66f0c14..38d1913 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -568,7 +568,9 @@ if(HAVE_INTEL)
endif(HAVE_GOOD_YASM_ELF64)
elseif(HAVE_POWER8)
list(APPEND libcommon_files
- common/crc32c_ppc.c
+ common/crc32c_ppc.c)
+elseif(HAVE_PPC64LE)
+ list(APPEND libcommon_files
common/crc32c_ppc_asm.S
common/crc32c_ppc_fast_zero_asm.S)
endif(HAVE_INTEL)
diff --git a/src/arch/ppc.c b/src/arch/ppc.c
index f21e2fe..11d3a49 100644
--- a/src/arch/ppc.c
+++ b/src/arch/ppc.c
@@ -14,10 +14,10 @@ int ceph_arch_ppc_crc32 = 0;
#include <stdio.h>
-#if __linux__ && __powerpc64__
+#ifdef HAVE_PPC64LE
#include <sys/auxv.h>
#include <asm/cputable.h>
-#endif /* __linux__ && __powerpc64__ */
+#endif /* HAVE_PPC64LE */
#ifndef PPC_FEATURE2_VEC_CRYPTO
#define PPC_FEATURE2_VEC_CRYPTO 0x02000000
@@ -31,9 +31,9 @@ int ceph_arch_ppc_probe(void)
{
ceph_arch_ppc_crc32 = 0;
-#if __linux__ && __powerpc64__
+#ifdef HAVE_PPC64LE
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_VEC_CRYPTO) ceph_arch_ppc_crc32 = 1;
-#endif /* __linux__ && __powerpc64__ */
+#endif /* HAVE_PPC64LE */
return 0;
}
diff --git a/src/common/crc32c_ppc.c b/src/common/crc32c_ppc.c
index 43756e2..52fd1c4 100644
--- a/src/common/crc32c_ppc.c
+++ b/src/common/crc32c_ppc.c
@@ -20,6 +20,7 @@
#define VMX_ALIGN 16
#define VMX_ALIGN_MASK (VMX_ALIGN-1)
+#ifdef HAVE_PPC64LE
#ifdef REFLECT
static unsigned int crc32_align(unsigned int crc, unsigned char const *p,
unsigned long len)
@@ -38,7 +39,6 @@ static unsigned int crc32_align(unsigned int crc, unsigned char const *p,
}
#endif
-#ifdef HAVE_POWER8
static inline unsigned long polynomial_multiply(unsigned int a, unsigned int b) {
vector unsigned int va = {a, 0, 0, 0};
vector unsigned int vb = {b, 0, 0, 0};
@@ -134,7 +134,7 @@ uint32_t ceph_crc32c_ppc(uint32_t crc, unsigned char const *data, unsigned len)
return crc;
}
-#else /* HAVE_POWER8 */
+#else /* HAVE_PPC64LE */
/* This symbol has to exist on non-ppc architectures (and on legacy
* ppc systems using power7 or below) in order to compile properly
@@ -145,4 +145,4 @@ uint32_t ceph_crc32c_ppc(uint32_t crc, unsigned char const *data, unsigned len)
return 0;
}
-#endif /* HAVE_POWER8 */
+#endif /* HAVE_PPC64LE */
--
2.9.4

View File

@ -0,0 +1,31 @@
From 74a754690736f6608b0d4d9c807df0bd777a129d Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Fri, 8 Dec 2017 00:21:38 +0100
Subject: [PATCH] librbd: Conditionally import TrimRequest.cc
We include TrimRequest.cc in librbd tests at two places:
- operation/test_mock_TrimRequest.cc
- operation/test_mock_ResizeRequest.cc
That causes linking errors when doing the builds because some of the
structures are defined twice.
Signed-off-by: Boris Ranto <branto@redhat.com>
---
src/librbd/operation/TrimRequest.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/librbd/operation/TrimRequest.cc b/src/librbd/operation/TrimRequest.cc
index 28f2deb..929ca51 100644
--- a/src/librbd/operation/TrimRequest.cc
+++ b/src/librbd/operation/TrimRequest.cc
@@ -362,4 +362,6 @@ void TrimRequest<I>::send_finish(int r) {
} // namespace operation
} // namespace librbd
+#ifndef TEST_F
template class librbd::operation::TrimRequest<librbd::ImageCtx>;
+#endif
--
2.9.5

View File

@ -0,0 +1,155 @@
--- ceph-12.2.3/src/rocksdb/table/block.h.orig 2018-02-22 07:49:38.044899631 -0500
+++ ceph-12.2.3/src/rocksdb/table/block.h 2018-02-22 07:58:55.855899631 -0500
@@ -65,7 +65,8 @@
// Create bitmap and set all the bits to 0
bitmap_ = new std::atomic<uint32_t>[bitmap_size];
- memset(bitmap_, 0, bitmap_size * kBytesPersEntry);
+ // memset(bitmap_, 0, bitmap_size * kBytesPersEntry);
+ { unsigned i = 0; for (; i < bitmap_size;) bitmap_[i++] = 0; }
RecordTick(GetStatistics(), READ_AMP_TOTAL_READ_BYTES,
num_bits_needed << bytes_per_bit_pow_);
--- ceph-12.2.3/src/rocksdb/db/c.cc.orig 2018-02-22 08:14:56.033899631 -0500
+++ ceph-12.2.3/src/rocksdb/db/c.cc 2018-02-22 10:06:39.759899631 -0500
@@ -1322,11 +1322,6 @@
b->rep.PutLogData(Slice(blob, len));
}
-void rocksdb_writebatch_iterate(
- rocksdb_writebatch_t* b,
- void* state,
- void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
- void (*deleted)(void*, const char* k, size_t klen)) {
class H : public WriteBatch::Handler {
public:
void* state_;
@@ -1339,6 +1334,12 @@
(*deleted_)(state_, key.data(), key.size());
}
};
+
+void rocksdb_writebatch_iterate(
+ rocksdb_writebatch_t* b,
+ void* state,
+ void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
+ void (*deleted)(void*, const char* k, size_t klen)) {
H handler;
handler.state_ = state;
handler.put_ = put;
@@ -1579,18 +1580,6 @@
void* state,
void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
void (*deleted)(void*, const char* k, size_t klen)) {
- class H : public WriteBatch::Handler {
- public:
- void* state_;
- void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen);
- void (*deleted_)(void*, const char* k, size_t klen);
- virtual void Put(const Slice& key, const Slice& value) override {
- (*put_)(state_, key.data(), key.size(), value.data(), value.size());
- }
- virtual void Delete(const Slice& key) override {
- (*deleted_)(state_, key.data(), key.size());
- }
- };
H handler;
handler.state_ = state;
handler.put_ = put;
@@ -2532,13 +2521,9 @@
delete filter;
}
-rocksdb_filterpolicy_t* rocksdb_filterpolicy_create_bloom_format(int bits_per_key, bool original_format) {
- // Make a rocksdb_filterpolicy_t, but override all of its methods so
- // they delegate to a NewBloomFilterPolicy() instead of user
- // supplied C functions.
- struct Wrapper : public rocksdb_filterpolicy_t {
+ struct WrapperFP : public rocksdb_filterpolicy_t {
const FilterPolicy* rep_;
- ~Wrapper() { delete rep_; }
+ ~WrapperFP() { delete rep_; }
const char* Name() const override { return rep_->Name(); }
void CreateFilter(const Slice* keys, int n,
std::string* dst) const override {
@@ -2549,11 +2534,16 @@
}
static void DoNothing(void*) { }
};
- Wrapper* wrapper = new Wrapper;
+
+rocksdb_filterpolicy_t* rocksdb_filterpolicy_create_bloom_format(int bits_per_key, bool original_format) {
+ // Make a rocksdb_filterpolicy_t, but override all of its methods so
+ // they delegate to a NewBloomFilterPolicy() instead of user
+ // supplied C functions.
+ WrapperFP* wrapper = new WrapperFP;
wrapper->rep_ = NewBloomFilterPolicy(bits_per_key, original_format);
wrapper->state_ = nullptr;
wrapper->delete_filter_ = nullptr;
- wrapper->destructor_ = &Wrapper::DoNothing;
+ wrapper->destructor_ = &WrapperFP::DoNothing;
return wrapper;
}
@@ -2889,10 +2879,9 @@
delete st;
}
-rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t prefixLen) {
- struct Wrapper : public rocksdb_slicetransform_t {
+ struct WrapperST : public rocksdb_slicetransform_t {
const SliceTransform* rep_;
- ~Wrapper() { delete rep_; }
+ ~WrapperST() { delete rep_; }
const char* Name() const override { return rep_->Name(); }
Slice Transform(const Slice& src) const override {
return rep_->Transform(src);
@@ -2903,31 +2892,20 @@
bool InRange(const Slice& src) const override { return rep_->InRange(src); }
static void DoNothing(void*) { }
};
- Wrapper* wrapper = new Wrapper;
+
+rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t prefixLen) {
+ WrapperST* wrapper = new WrapperST;
wrapper->rep_ = rocksdb::NewFixedPrefixTransform(prefixLen);
wrapper->state_ = nullptr;
- wrapper->destructor_ = &Wrapper::DoNothing;
+ wrapper->destructor_ = &WrapperST::DoNothing;
return wrapper;
}
rocksdb_slicetransform_t* rocksdb_slicetransform_create_noop() {
- struct Wrapper : public rocksdb_slicetransform_t {
- const SliceTransform* rep_;
- ~Wrapper() { delete rep_; }
- const char* Name() const override { return rep_->Name(); }
- Slice Transform(const Slice& src) const override {
- return rep_->Transform(src);
- }
- bool InDomain(const Slice& src) const override {
- return rep_->InDomain(src);
- }
- bool InRange(const Slice& src) const override { return rep_->InRange(src); }
- static void DoNothing(void*) { }
- };
- Wrapper* wrapper = new Wrapper;
+ WrapperST* wrapper = new WrapperST;
wrapper->rep_ = rocksdb::NewNoopTransform();
wrapper->state_ = nullptr;
- wrapper->destructor_ = &Wrapper::DoNothing;
+ wrapper->destructor_ = &WrapperST::DoNothing;
return wrapper;
}
--- ceph-12.2.3/src/rocksdb/memtable/inlineskiplist.h.orig 2018-02-22 10:34:06.918899631 -0500
+++ ceph-12.2.3/src/rocksdb/memtable/inlineskiplist.h 2018-02-22 10:34:44.145899631 -0500
@@ -279,7 +279,7 @@
// next_[0]. This is used for passing data from AllocateKey to Insert.
void StashHeight(const int height) {
assert(sizeof(int) <= sizeof(next_[0]));
- memcpy(&next_[0], &height, sizeof(int));
+ memcpy(static_cast<void*>(&next_[0]), &height, sizeof(int));
}
// Retrieves the value passed to StashHeight. Undefined after a call

463
ceph.spec
View File

@ -16,59 +16,58 @@
# #
%global _hardened_build 1 %global _hardened_build 1
%bcond_with python3
%bcond_without ocf %bcond_without ocf
%ifnarch armv7hl
%bcond_without cephfs_java
%else
%bcond_with cephfs_java
%endif
%if 0%{?suse_version}
%bcond_with ceph_test_package
%else
%bcond_without ceph_test_package
%endif
%bcond_with make_check %bcond_with make_check
%ifarch s390 s390x %ifarch s390 s390x
%bcond_with tcmalloc %bcond_with tcmalloc
%else %else
%bcond_without tcmalloc %bcond_without tcmalloc
%endif %endif
%ifnarch armv7hl
%bcond_with lowmem_builder
%else
%if 0%{?rhel}
%ifnarch ppc64le
%bcond_with lowmem_builder
%else
%bcond_without lowmem_builder
%endif
%else
%bcond_without lowmem_builder
%endif
%endif
%if 0%{?fedora} || 0%{?rhel} %if 0%{?fedora} || 0%{?rhel}
%bcond_without selinux %bcond_without selinux
%bcond_without ceph_test_package
%bcond_without cephfs_java
%bcond_without lttng
%global _remote_tarball_prefix https://download.ceph.com/tarballs/
%endif %endif
%if 0%{?suse_version} %if 0%{?suse_version}
%bcond_with selinux %bcond_with selinux
%bcond_with ceph_test_package
%bcond_with cephfs_java
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%global _fillupdir /var/adm/fillup-templates
%endif %endif
%if 0%{?is_opensuse}
# LTTng-UST enabled on Fedora, RHEL 6+, and SLE (not openSUSE)
%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version}
%if ! 0%{?is_opensuse}
%bcond_without lttng %bcond_without lttng
%else
%ifarch x86_64 aarch64
%bcond_without lttng
%else
%bcond_with lttng
%endif %endif
%endif %endif
%endif
%if 0%{?suse_version} >= 1500
%bcond_with python2
%else
%bcond_without python2
%endif
%if 0%{without python2}
%global _defined_if_python2_absent 1
%endif
%if %{with selinux} %if %{with selinux}
# get selinux policy version # get selinux policy version
%{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0} %{!?_selinux_policy_version: %global _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null || echo 0.0.0)}
%endif %endif
%{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d} %{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d}
%{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create} %{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create}
%{!?python3_pkgversion: %global python3_pkgversion 3} %{!?python3_pkgversion: %global python3_pkgversion 3}
# define _python_buildid macro which will expand to the empty string when
# building with python2
%global _python_buildid %{?_defined_if_python2_absent:%{python3_pkgversion}}
# unify libexec for all targets # unify libexec for all targets
%global _libexecdir %{_exec_prefix}/lib %global _libexecdir %{_exec_prefix}/lib
@ -77,23 +76,22 @@
%global _find_debuginfo_dwz_opts %{nil} %global _find_debuginfo_dwz_opts %{nil}
%if ( 0%{?rhel} && 0%{?rhel} < 7 ) %if ( 0%{?rhel} && 0%{?rhel} < 7 )
%global _rundir %{_localstatedir}/run/ %global _rundir %{_localstatedir}/run
%else %else
%global _rundir /run/ %global _rundir /run
%endif %endif
################################################################################# #################################################################################
# main package definition # main package definition
################################################################################# #################################################################################
Name: ceph Name: ceph
Version: 13.2.0 Version: 12.2.5
Release: 3%{?dist} Release: 2%{?dist}
%if 0%{?fedora} || 0%{?rhel} %if 0%{?fedora} || 0%{?rhel}
Epoch: 1 Epoch: 1
%endif %endif
# define _epoch_prefix macro which will expand to the empty string if epoch is # define %%_epoch_prefix macro which will expand to the empty string if %%epoch is undefined
# undefined
%global _epoch_prefix %{?epoch:%{epoch}:} %global _epoch_prefix %{?epoch:%{epoch}:}
Summary: User space components of the Ceph file system Summary: User space components of the Ceph file system
@ -102,11 +100,14 @@ License: LGPL-2.1 and CC-BY-SA-3.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and
Group: System/Filesystems Group: System/Filesystems
%endif %endif
URL: http://ceph.com/ URL: http://ceph.com/
Source0: %{?_remote_tarball_prefix}%{name}-%{version}.tar.gz Source0: http://download.ceph.com/tarballs/%{name}-%{version}.tar.gz
# https://bugzilla.redhat.com/show_bug.cgi?id=1474773 # https://bugzilla.redhat.com/show_bug.cgi?id=1474773
Patch001: 0001-blobstore.patch Patch001: 0001-src-rocksdb-util-murmurhash.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1474774
Patch002: 0002-cmake-Support-ppc64.patch
Patch003: 0003-librbd-Conditionally-import-TrimRequest.cc.patch
Patch005: 0005-src-rocksdb-table-block.h.patch
%if 0%{?suse_version} %if 0%{?suse_version}
# _insert_obs_source_lines_here
%if 0%{?is_opensuse} %if 0%{?is_opensuse}
ExclusiveArch: x86_64 aarch64 ppc64 ppc64le ExclusiveArch: x86_64 aarch64 ppc64 ppc64le
%else %else
@ -128,20 +129,28 @@ BuildRequires: sharutils
%if 0%{with selinux} %if 0%{with selinux}
BuildRequires: checkpolicy BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel BuildRequires: selinux-policy-devel
BuildRequires: selinux-policy-doc
%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
BuildRequires: python-numpy-devel
%endif
BuildRequires: python-coverage
BuildRequires: python-pecan
BuildRequires: socat
%endif %endif
BuildRequires: bc BuildRequires: bc
BuildRequires: gperf BuildRequires: gperf
BuildRequires: cmake BuildRequires: cmake
BuildRequires: cryptsetup BuildRequires: cryptsetup
BuildRequires: fuse-devel BuildRequires: fuse-devel
BuildRequires: cryptopp-devel
%if 0%{?rhel} == 7
# devtoolset offers newer make and valgrind-devel, but the old ones are good
# enough.
BuildRequires: devtoolset-7-gcc-c++
%else
BuildRequires: gcc-c++ BuildRequires: gcc-c++
%endif
BuildRequires: gdbm BuildRequires: gdbm
%if 0%{with tcmalloc} %if 0%{with tcmalloc}
BuildRequires: gperftools-devel >= 2.4 BuildRequires: gperftools-devel >= 2.4
@ -152,24 +161,18 @@ BuildRequires: libaio-devel
BuildRequires: libblkid-devel >= 2.17 BuildRequires: libblkid-devel >= 2.17
BuildRequires: libcurl-devel BuildRequires: libcurl-devel
BuildRequires: libudev-devel BuildRequires: libudev-devel
BuildRequires: liboath-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
BuildRequires: libuuid-devel
BuildRequires: make BuildRequires: make
BuildRequires: parted BuildRequires: parted
BuildRequires: perl BuildRequires: perl
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: procps BuildRequires: python
BuildRequires: python%{_python_buildid} BuildRequires: python-devel
BuildRequires: python%{_python_buildid}-devel BuildRequires: python-nose
BuildRequires: python%{_python_buildid}-nose BuildRequires: python-requests
BuildRequires: python%{_python_buildid}-requests BuildRequires: python-virtualenv
BuildRequires: python%{_python_buildid}-virtualenv
BuildRequires: snappy-devel BuildRequires: snappy-devel
%if 0%{with make_check}
BuildRequires: socat
%endif
BuildRequires: udev BuildRequires: udev
BuildRequires: util-linux BuildRequires: util-linux
BuildRequires: valgrind-devel BuildRequires: valgrind-devel
@ -196,13 +199,10 @@ BuildRequires: keyutils-devel
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
BuildRequires: lsb-release BuildRequires: lsb-release
BuildRequires: openldap2-devel BuildRequires: openldap2-devel
BuildRequires: cunit-devel BuildRequires: python-Cython
BuildRequires: python%{_python_buildid}-base BuildRequires: python-PrettyTable
BuildRequires: python%{_python_buildid}-Cython BuildRequires: python-Sphinx
BuildRequires: python%{_python_buildid}-PrettyTable
BuildRequires: python%{_python_buildid}-Sphinx
BuildRequires: rdma-core-devel BuildRequires: rdma-core-devel
BuildRequires: liblz4-devel >= 1.7
%endif %endif
%if 0%{?fedora} || 0%{?rhel} %if 0%{?fedora} || 0%{?rhel}
Requires: systemd Requires: systemd
@ -210,22 +210,19 @@ BuildRequires: boost-random
BuildRequires: btrfs-progs BuildRequires: btrfs-progs
BuildRequires: nss-devel BuildRequires: nss-devel
BuildRequires: keyutils-libs-devel BuildRequires: keyutils-libs-devel
# RDMA is no longer built on 32-bit ARM: see rhbz#1484155 # RDMA is no longer built on 32-bit ARM: see #1484155
%ifnarch %{arm} %ifnarch %{arm}
BuildRequires: rdma-core-devel BuildRequires: rdma-core-devel
%endif %endif
BuildRequires: openldap-devel BuildRequires: openldap-devel
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: redhat-lsb-core BuildRequires: redhat-lsb-core
BuildRequires: CUnit-devel BuildRequires: Cython
BuildRequires: Cython%{_python_buildid} BuildRequires: python-prettytable
BuildRequires: python%{_python_buildid}-prettytable BuildRequires: python-sphinx
BuildRequires: python%{_python_buildid}-sphinx
BuildRequires: lz4-devel >= 1.7
%endif %endif
# python34-... for RHEL, python3-... for all other supported distros # python34-... for RHEL, python3-... for all other supported distros
%if %{with python3} %if ( 0%{?rhel} && 0%{?rhel} <= 7 )
%if 0%{?rhel}
BuildRequires: python34-devel BuildRequires: python34-devel
BuildRequires: python34-setuptools BuildRequires: python34-setuptools
BuildRequires: python34-Cython BuildRequires: python34-Cython
@ -234,34 +231,6 @@ BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
BuildRequires: python3-Cython BuildRequires: python3-Cython
%endif %endif
%endif
# distro-conditional make check dependencies
%if 0%{with make_check}
%if 0%{?fedora} || 0%{?rhel}
BuildRequires: python%{_python_buildid}-cherrypy
BuildRequires: python%{_python_buildid}-routes
BuildRequires: python%{_python_buildid}-pecan
BuildRequires: python%{_python_buildid}-werkzeug
BuildRequires: python%{_python_buildid}-tox
BuildRequires: python%{_python_buildid}-coverage
%if 0%{?fedora}
BuildRequires: python%{_python_buildid}-bcrypt
%endif
%if 0%{?rhel}
BuildRequires: py-bcrypt
%endif
%endif
%if 0%{?suse_version}
BuildRequires: python%{_python_buildid}-CherryPy
BuildRequires: python%{_python_buildid}-Routes
BuildRequires: python%{_python_buildid}-Werkzeug
BuildRequires: python%{_python_buildid}-pecan
BuildRequires: python%{_python_buildid}-numpy-devel
BuildRequires: python%{_python_buildid}-bcrypt
BuildRequires: python%{_python_buildid}-tox
BuildRequires: python%{_python_buildid}-coverage
%endif
%endif
# lttng and babeltrace for rbd-replay-prep # lttng and babeltrace for rbd-replay-prep
%if %{with lttng} %if %{with lttng}
%if 0%{?fedora} || 0%{?rhel} %if 0%{?fedora} || 0%{?rhel}
@ -307,25 +276,19 @@ Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
%endif %endif
Requires(post):/sbin/ldconfig Requires(post):/sbin/ldconfig
Requires(postun):/sbin/ldconfig Requires(postun):/sbin/ldconfig
Requires: cryptsetup Requires: python
Requires: e2fsprogs Requires: python-requests
Requires: findutils Requires: python-setuptools
Requires: grep Requires: grep
Requires: logrotate
Requires: parted
Requires: psmisc
Requires: python%{_python_buildid}-requests
Requires: python%{_python_buildid}-setuptools
Requires: util-linux
Requires: xfsprogs Requires: xfsprogs
Requires: logrotate
Requires: util-linux
Requires: cryptsetup
Requires: findutils
Requires: psmisc
Requires: which Requires: which
%if 0%{?fedora} || 0%{?rhel}
Requires: gdisk
%endif
%if 0%{?suse_version} %if 0%{?suse_version}
Recommends: ntp-daemon Recommends: ntp-daemon
Recommends: chrony
Requires: gptfdisk
%endif %endif
%description base %description base
Base is the package that includes all the files shared amongst ceph servers Base is the package that includes all the files shared amongst ceph servers
@ -338,18 +301,17 @@ Group: System/Filesystems
Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release} Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
Requires: python%{_python_buildid}-rados = %{_epoch_prefix}%{version}-%{release} Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
Requires: python%{_python_buildid}-rbd = %{_epoch_prefix}%{version}-%{release} Requires: python-rbd = %{_epoch_prefix}%{version}-%{release}
Requires: python%{_python_buildid}-cephfs = %{_epoch_prefix}%{version}-%{release} Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release}
Requires: python%{_python_buildid}-rgw = %{_epoch_prefix}%{version}-%{release} Requires: python-rgw = %{_epoch_prefix}%{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} %if 0%{?fedora} || 0%{?rhel}
Requires: python%{_python_buildid}-prettytable Requires: python-prettytable
Requires: python%{_python_buildid}-requests
%endif %endif
%if 0%{?suse_version} %if 0%{?suse_version}
Requires: python%{_python_buildid}-PrettyTable Requires: python-PrettyTable
Requires: python%{_python_buildid}-requests
%endif %endif
Requires: python-requests
%{?systemd_requires} %{?systemd_requires}
%if 0%{?suse_version} %if 0%{?suse_version}
Requires(pre): pwdutils Requires(pre): pwdutils
@ -375,6 +337,13 @@ Summary: Ceph Monitor Daemon
Group: System/Filesystems Group: System/Filesystems
%endif %endif
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
# For ceph-rest-api
%if 0%{?fedora} || 0%{?rhel}
Requires: python-flask
%endif
%if 0%{?suse_version}
Requires: python-Flask
%endif
%description mon %description mon
ceph-mon is the cluster monitor daemon for the Ceph distributed file ceph-mon is the cluster monitor daemon for the Ceph distributed file
system. One or more instances of ceph-mon form a Paxos part-time system. One or more instances of ceph-mon form a Paxos part-time
@ -388,29 +357,18 @@ Group: System/Filesystems
%endif %endif
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} %if 0%{?fedora} || 0%{?rhel}
Requires: python%{_python_buildid}-cherrypy Requires: python-cherrypy
Requires: python%{_python_buildid}-routes Requires: python-jinja2
Requires: python%{_python_buildid}-jinja2 Requires: python-werkzeug
Requires: python%{_python_buildid}-pecan Requires: pyOpenSSL
Requires: python%{_python_buildid}-werkzeug
Requires: pyOpenSSL%{_python_buildid}
%if 0%{?fedora}
Requires: python%{_python_buildid}-bcrypt
%endif
%if 0%{?rhel}
Requires: py-bcrypt
%endif
%endif %endif
%if 0%{?suse_version} %if 0%{?suse_version}
Requires: python%{_python_buildid}-CherryPy Requires: python-CherryPy
Requires: python%{_python_buildid}-Routes Requires: python-jinja2
Requires: python%{_python_buildid}-Jinja2 Requires: python-Werkzeug
Requires: python%{_python_buildid}-Werkzeug Requires: python-pyOpenSSL
Requires: python%{_python_buildid}-pecan
Requires: python%{_python_buildid}-pyOpenSSL
Requires: python%{_python_buildid}-bcrypt
Recommends: python%{_python_buildid}-influxdb
%endif %endif
Requires: python-pecan
%description mgr %description mgr
ceph-mgr enables python modules that provide services (such as the REST ceph-mgr enables python modules that provide services (such as the REST
module derived from Calamari) and expose CLI hooks. ceph-mgr gathers module derived from Calamari) and expose CLI hooks. ceph-mgr gathers
@ -497,6 +455,14 @@ Summary: Ceph Object Storage Daemon
Group: System/Filesystems Group: System/Filesystems
%endif %endif
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
# for sgdisk, used by ceph-disk
%if 0%{?fedora} || 0%{?rhel}
Requires: gdisk
%endif
%if 0%{?suse_version}
Requires: gptfdisk
%endif
Requires: parted
Requires: lvm2 Requires: lvm2
%description osd %description osd
ceph-osd is the object storage daemon for the Ceph distributed file ceph-osd is the object storage daemon for the Ceph distributed file
@ -554,7 +520,6 @@ Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release}
This package contains libraries and headers needed to develop programs This package contains libraries and headers needed to develop programs
that use RADOS gateway client library. that use RADOS gateway client library.
%if 0%{with python2}
%package -n python-rgw %package -n python-rgw
Summary: Python 2 libraries for the RADOS gateway Summary: Python 2 libraries for the RADOS gateway
%if 0%{?suse_version} %if 0%{?suse_version}
@ -566,22 +531,18 @@ Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
%description -n python-rgw %description -n python-rgw
This package contains Python 2 libraries for interacting with Cephs RADOS This package contains Python 2 libraries for interacting with Cephs RADOS
gateway. gateway.
%endif
%if 0%{with python3}
%package -n python%{python3_pkgversion}-rgw %package -n python%{python3_pkgversion}-rgw
Summary: Python 3 libraries for the RADOS gateway Summary: Python 3 libraries for the RADOS gateway
%if 0%{?suse_version} %if 0%{?suse_version}
Group: Development/Libraries/Python Group: Development/Languages/Python
%endif %endif
Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
%description -n python%{python3_pkgversion}-rgw %description -n python%{python3_pkgversion}-rgw
This package contains Python 3 libraries for interacting with Cephs RADOS This package contains Python 3 libraries for interacting with Cephs RADOS
gateway. gateway.
%endif
%if 0%{with python2}
%package -n python-rados %package -n python-rados
Summary: Python 2 libraries for the RADOS object store Summary: Python 2 libraries for the RADOS object store
%if 0%{?suse_version} %if 0%{?suse_version}
@ -592,20 +553,17 @@ Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
%description -n python-rados %description -n python-rados
This package contains Python 2 libraries for interacting with Cephs RADOS This package contains Python 2 libraries for interacting with Cephs RADOS
object store. object store.
%endif
%if 0%{with python3}
%package -n python%{python3_pkgversion}-rados %package -n python%{python3_pkgversion}-rados
Summary: Python 3 libraries for the RADOS object store Summary: Python 3 libraries for the RADOS object store
%if 0%{?suse_version} %if 0%{?suse_version}
Group: Development/Libraries/Python Group: Development/Languages/Python
%endif %endif
Requires: python%{python3_pkgversion} Requires: python%{python3_pkgversion}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release} Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
%description -n python%{python3_pkgversion}-rados %description -n python%{python3_pkgversion}-rados
This package contains Python 3 libraries for interacting with Cephs RADOS This package contains Python 3 libraries for interacting with Cephs RADOS
object store. object store.
%endif
%package -n libradosstriper1 %package -n libradosstriper1
Summary: RADOS striping interface Summary: RADOS striping interface
@ -665,11 +623,10 @@ Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release}
This package contains libraries and headers needed to develop programs This package contains libraries and headers needed to develop programs
that use RADOS block device. that use RADOS block device.
%if 0%{with python2}
%package -n python-rbd %package -n python-rbd
Summary: Python 2 libraries for the RADOS block device Summary: Python 2 libraries for the RADOS block device
%if 0%{?suse_version} %if 0%{?suse_version}
Group: Development/Libraries/Python Group: Development/Languages/Python
%endif %endif
Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
Requires: python-rados = %{_epoch_prefix}%{version}-%{release} Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
@ -677,20 +634,17 @@ Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
%description -n python-rbd %description -n python-rbd
This package contains Python 2 libraries for interacting with Cephs RADOS This package contains Python 2 libraries for interacting with Cephs RADOS
block device. block device.
%endif
%if 0%{with python3}
%package -n python%{python3_pkgversion}-rbd %package -n python%{python3_pkgversion}-rbd
Summary: Python 3 libraries for the RADOS block device Summary: Python 3 libraries for the RADOS block device
%if 0%{?suse_version} %if 0%{?suse_version}
Group: Development/Libraries/Python Group: Development/Languages/Python
%endif %endif
Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
%description -n python%{python3_pkgversion}-rbd %description -n python%{python3_pkgversion}-rbd
This package contains Python 3 libraries for interacting with Cephs RADOS This package contains Python 3 libraries for interacting with Cephs RADOS
block device. block device.
%endif
%package -n libcephfs2 %package -n libcephfs2
Summary: Ceph distributed file system client library Summary: Ceph distributed file system client library
@ -723,11 +677,10 @@ Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release}
This package contains libraries and headers needed to develop programs This package contains libraries and headers needed to develop programs
that use Cephs distributed file system. that use Cephs distributed file system.
%if 0%{with python2}
%package -n python-cephfs %package -n python-cephfs
Summary: Python 2 libraries for Ceph distributed file system Summary: Python 2 libraries for Ceph distributed file system
%if 0%{?suse_version} %if 0%{?suse_version}
Group: Development/Libraries/Python Group: Development/Languages/Python
%endif %endif
Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
%if 0%{?suse_version} %if 0%{?suse_version}
@ -737,33 +690,28 @@ Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
%description -n python-cephfs %description -n python-cephfs
This package contains Python 2 libraries for interacting with Cephs distributed This package contains Python 2 libraries for interacting with Cephs distributed
file system. file system.
%endif
%if 0%{with python3}
%package -n python%{python3_pkgversion}-cephfs %package -n python%{python3_pkgversion}-cephfs
Summary: Python 3 libraries for Ceph distributed file system Summary: Python 3 libraries for Ceph distributed file system
%if 0%{?suse_version} %if 0%{?suse_version}
Group: Development/Libraries/Python Group: Development/Languages/Python
%endif %endif
Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
%description -n python%{python3_pkgversion}-cephfs %description -n python%{python3_pkgversion}-cephfs
This package contains Python 3 libraries for interacting with Cephs distributed This package contains Python 3 libraries for interacting with Cephs distributed
file system. file system.
%endif
%if 0%{with python3}
%package -n python%{python3_pkgversion}-ceph-argparse %package -n python%{python3_pkgversion}-ceph-argparse
Summary: Python 3 utility libraries for Ceph CLI Summary: Python 3 utility libraries for Ceph CLI
%if 0%{?suse_version} %if 0%{?suse_version}
Group: Development/Libraries/Python Group: Development/Languages/Python
%endif %endif
%description -n python%{python3_pkgversion}-ceph-argparse %description -n python%{python3_pkgversion}-ceph-argparse
This package contains types and routines for Python 3 used by the Ceph CLI as This package contains types and routines for Python 3 used by the Ceph CLI as
well as the RESTful interface. These have to do with querying the daemons for well as the RESTful interface. These have to do with querying the daemons for
command-description information, validating user command input against those command-description information, validating user command input against those
descriptions, and submitting the command to the appropriate daemon. descriptions, and submitting the command to the appropriate daemon.
%endif
%if 0%{with ceph_test_package} %if 0%{with ceph_test_package}
%package -n ceph-test %package -n ceph-test
@ -813,6 +761,7 @@ Group: System/Libraries
%endif %endif
Requires: java Requires: java
Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release} Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
Requires: junit
BuildRequires: junit BuildRequires: junit
%description -n cephfs-java %description -n cephfs-java
This package contains the Java libraries for the Ceph File System. This package contains the Java libraries for the Ceph File System.
@ -821,9 +770,7 @@ This package contains the Java libraries for the Ceph File System.
%package -n rados-objclass-devel %package -n rados-objclass-devel
Summary: RADOS object class development kit Summary: RADOS object class development kit
%if 0%{?suse_version} Group: Development/Libraries
Group: Development/Libraries/C and C++
%endif
Requires: librados2-devel = %{_epoch_prefix}%{version}-%{release} Requires: librados2-devel = %{_epoch_prefix}%{version}-%{release}
%description -n rados-objclass-devel %description -n rados-objclass-devel
This package contains libraries and headers needed to develop RADOS object This package contains libraries and headers needed to develop RADOS object
@ -848,11 +795,10 @@ populated file-systems.
%endif %endif
%if 0%{with python2}
%package -n python-ceph-compat %package -n python-ceph-compat
Summary: Compatibility package for Cephs python libraries Summary: Compatibility package for Cephs python libraries
%if 0%{?suse_version} %if 0%{?suse_version}
Group: Development/Libraries/Python Group: Development/Languages/Python
%endif %endif
Obsoletes: python-ceph Obsoletes: python-ceph
Requires: python-rados = %{_epoch_prefix}%{version}-%{release} Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
@ -865,7 +811,6 @@ This is a compatibility package to accommodate python-ceph split into
python-rados, python-rbd, python-rgw and python-cephfs. Packages still python-rados, python-rbd, python-rgw and python-cephfs. Packages still
depending on python-ceph should be fixed to depend on python-rados, depending on python-ceph should be fixed to depend on python-rados,
python-rbd, python-rgw or python-cephfs instead. python-rbd, python-rgw or python-cephfs instead.
%endif
################################################################################# #################################################################################
# common # common
@ -874,11 +819,6 @@ python-rbd, python-rgw or python-cephfs instead.
%autosetup -p1 -n %{name}-%{version} %autosetup -p1 -n %{name}-%{version}
%build %build
%if 0%{?rhel} == 7
. /opt/rh/devtoolset-7/enable
%endif
%if 0%{with cephfs_java} %if 0%{with cephfs_java}
# Find jni.h # Find jni.h
for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do
@ -886,40 +826,37 @@ for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do
done done
%endif %endif
%if 0%{?suse_version} %if %{with lowmem_builder}
# the following setting fixed an OOM condition we once encountered in the OBS
RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768" RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768"
%endif %endif
%ifnarch armv7hl
export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
%else
export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/' -e 's/-pipe//g'`
%endif
export CPPFLAGS="$java_inc" export CPPFLAGS="$java_inc"
export CFLAGS="$RPM_OPT_FLAGS" export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="$RPM_LD_FLAGS" export LDFLAGS="$RPM_LD_FLAGS"
# Parallel build settings ...
CEPH_MFLAGS_JOBS="%{?_smp_mflags}"
CEPH_SMP_NCPUS=$(echo "$CEPH_MFLAGS_JOBS" | sed 's/-j//')
%if 0%{?__isa_bits} == 32
# 32-bit builds can use 3G memory max, which is not enough even for -j2
CEPH_SMP_NCPUS="1"
%endif
# do not eat all memory
echo "Available memory:"
free -h
echo "System limits:"
ulimit -a
if test -n "$CEPH_SMP_NCPUS" -a "$CEPH_SMP_NCPUS" -gt 1 ; then
mem_per_process=1800
max_mem=$(LANG=C free -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p")
max_jobs="$(($max_mem / $mem_per_process))"
test "$CEPH_SMP_NCPUS" -gt "$max_jobs" && CEPH_SMP_NCPUS="$max_jobs" && echo "Warning: Reducing build parallelism to -j$max_jobs because of memory limits"
test "$CEPH_SMP_NCPUS" -le 0 && CEPH_SMP_NCPUS="1" && echo "Warning: Not using parallel build at all because of memory limits"
fi
export CEPH_SMP_NCPUS
export CEPH_MFLAGS_JOBS="-j$CEPH_SMP_NCPUS"
env | sort env | sort
%if %{with lowmem_builder}
%ifnarch armv7hl
%if 0%{?jobs} > 8
%define _smp_mflags -j8
%endif
%else
%define _smp_mflags -j1
%endif
%endif
# unlimit _smp_mflags in system macro if not set above
%define _smp_ncpus_max 0
# extract the number of processors for use with cmake
%define _smp_ncpus %(echo %{_smp_mflags} | sed 's/-j//')
mkdir build mkdir build
cd build cd build
cmake .. \ cmake .. \
@ -933,19 +870,9 @@ cmake .. \
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-DWITH_EMBEDDED=OFF \ -DWITH_EMBEDDED=OFF \
-DWITH_MANPAGE=ON \ -DWITH_MANPAGE=ON \
%if %{with python3}
-DWITH_PYTHON3=ON \ -DWITH_PYTHON3=ON \
%else -DWITH_SYSTEMD=ON \
-DWITH_PYTHON3=OFF \ %if ( ( 0%{?rhel} && 0%{?rhel} <= 7) && ! 0%{?centos} )
%endif
-DWITH_MGR_DASHBOARD_FRONTEND=OFF \
%if %{with python2}
-DWITH_PYTHON2=ON \
%else
-DWITH_PYTHON2=OFF \
-DMGR_PYTHON_VERSION=3 \
%endif
%if ( ( 0%{?rhel} && 0%{?rhel} < 8) && ! 0%{?centos} )
-DWITH_SUBMAN=ON \ -DWITH_SUBMAN=ON \
%endif %endif
%if 0%{without ceph_test_package} %if 0%{without ceph_test_package}
@ -973,23 +900,24 @@ cmake .. \
%else %else
-DWITH_BOOST_CONTEXT=OFF \ -DWITH_BOOST_CONTEXT=OFF \
%endif %endif
%ifarch %{arm} %ifnarch %{arm}
-DWITH_RDMA=OFF \ -DWITH_RDMA=OFF \
%endif %endif
-DWITH_DPDK=ON \ -DBOOST_J=%{_smp_ncpus}
-DBOOST_J=$CEPH_SMP_NCPUS
make "$CEPH_MFLAGS_JOBS" make %{?_smp_mflags}
%if 0%{with make_check} %if 0%{with make_check}
%check %check
# run in-tree unittests # run in-tree unittests
cd build cd build
ctest "$CEPH_MFLAGS_JOBS" ctest %{?_smp_mflags}
%endif %endif
%install %install
pushd build pushd build
make DESTDIR=%{buildroot} install make DESTDIR=%{buildroot} install
@ -1001,9 +929,10 @@ install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
%endif %endif
%if 0%{?suse_version} %if 0%{?suse_version}
install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_fillupdir}/sysconfig.%{name} install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
%endif %endif
install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf
install -m 0755 -D systemd/ceph %{buildroot}%{_sbindir}/rcceph
install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset
mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_sbindir}
install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
@ -1026,7 +955,7 @@ install -m 0644 -D udev/95-ceph-osd.rules %{buildroot}%{_udevrulesdir}/95-ceph-o
#set up placeholder directories #set up placeholder directories
mkdir -p %{buildroot}%{_sysconfdir}/ceph mkdir -p %{buildroot}%{_sysconfdir}/ceph
mkdir -p %{buildroot}%{_rundir}ceph mkdir -p %{buildroot}%{_rundir}/ceph
mkdir -p %{buildroot}%{_localstatedir}/log/ceph mkdir -p %{buildroot}%{_localstatedir}/log/ceph
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon
@ -1045,9 +974,6 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd
%py3_compile %{buildroot}%{python3_sitelib} %py3_compile %{buildroot}%{python3_sitelib}
%endif %endif
%clean
rm -rf %{buildroot}
################################################################################# #################################################################################
# files and systemd scriptlets # files and systemd scriptlets
################################################################################# #################################################################################
@ -1063,6 +989,7 @@ rm -rf %{buildroot}
%{_libexecdir}/systemd/system-preset/50-ceph.preset %{_libexecdir}/systemd/system-preset/50-ceph.preset
%{_sbindir}/ceph-create-keys %{_sbindir}/ceph-create-keys
%{_sbindir}/ceph-disk %{_sbindir}/ceph-disk
%{_sbindir}/rcceph
%dir %{_libexecdir}/ceph %dir %{_libexecdir}/ceph
%{_libexecdir}/ceph/ceph_common.sh %{_libexecdir}/ceph/ceph_common.sh
%dir %{_libdir}/rados-classes %dir %{_libdir}/rados-classes
@ -1085,30 +1012,17 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/sysconfig/ceph %config(noreplace) %{_sysconfdir}/sysconfig/ceph
%endif %endif
%if 0%{?suse_version} %if 0%{?suse_version}
%{_fillupdir}/sysconfig.* %{_localstatedir}/adm/fillup-templates/sysconfig.*
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
%endif %endif
%{_unitdir}/ceph-disk@.service %{_unitdir}/ceph-disk@.service
%{_unitdir}/ceph.target %{_unitdir}/ceph.target
%if 0%{with python2}
%{python_sitelib}/ceph_detect_init* %{python_sitelib}/ceph_detect_init*
%{python_sitelib}/ceph_disk* %{python_sitelib}/ceph_disk*
%endif
%if 0%{with python3}
%{python3_sitelib}/ceph_detect_init*
%{python3_sitelib}/ceph_disk*
%endif
%if 0%{with python2}
%dir %{python_sitelib}/ceph_volume %dir %{python_sitelib}/ceph_volume
%{python_sitelib}/ceph_volume/* %{python_sitelib}/ceph_volume/*
%{python_sitelib}/ceph_volume-* %{python_sitelib}/ceph_volume-*
%endif
%if 0%{with python3}
%dir %{python3_sitelib}/ceph_volume
%{python3_sitelib}/ceph_volume/*
%{python3_sitelib}/ceph_volume-*
%endif
%{_mandir}/man8/ceph-deploy.8* %{_mandir}/man8/ceph-deploy.8*
%{_mandir}/man8/ceph-detect-init.8* %{_mandir}/man8/ceph-detect-init.8*
%{_mandir}/man8/ceph-create-keys.8* %{_mandir}/man8/ceph-create-keys.8*
@ -1127,7 +1041,6 @@ rm -rf %{buildroot}
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd
%post base %post base
/sbin/ldconfig
%if 0%{?suse_version} %if 0%{?suse_version}
%fillup_only %fillup_only
if [ $1 -eq 1 ] ; then if [ $1 -eq 1 ] ; then
@ -1150,7 +1063,6 @@ fi
%endif %endif
%postun base %postun base
/sbin/ldconfig
test -n "$FIRST_ARG" || FIRST_ARG=$1 test -n "$FIRST_ARG" || FIRST_ARG=$1
%if 0%{?suse_version} %if 0%{?suse_version}
DISABLE_RESTART_ON_UPDATE="yes" DISABLE_RESTART_ON_UPDATE="yes"
@ -1181,6 +1093,7 @@ fi
%{_bindir}/ceph-dencoder %{_bindir}/ceph-dencoder
%{_bindir}/ceph-rbdnamer %{_bindir}/ceph-rbdnamer
%{_bindir}/ceph-syn %{_bindir}/ceph-syn
%{_bindir}/ceph-crush-location
%{_bindir}/cephfs-data-scan %{_bindir}/cephfs-data-scan
%{_bindir}/cephfs-journal-tool %{_bindir}/cephfs-journal-tool
%{_bindir}/cephfs-table-tool %{_bindir}/cephfs-table-tool
@ -1198,6 +1111,7 @@ fi
%{_bindir}/rbd-replay-prep %{_bindir}/rbd-replay-prep
%endif %endif
%{_bindir}/ceph-post-file %{_bindir}/ceph-post-file
%{_bindir}/ceph-brag
%{_tmpfilesdir}/ceph-common.conf %{_tmpfilesdir}/ceph-common.conf
%{_mandir}/man8/ceph-authtool.8* %{_mandir}/man8/ceph-authtool.8*
%{_mandir}/man8/ceph-conf.8* %{_mandir}/man8/ceph-conf.8*
@ -1225,16 +1139,8 @@ fi
%config %{_sysconfdir}/bash_completion.d/radosgw-admin %config %{_sysconfdir}/bash_completion.d/radosgw-admin
%config(noreplace) %{_sysconfdir}/ceph/rbdmap %config(noreplace) %{_sysconfdir}/ceph/rbdmap
%{_unitdir}/rbdmap.service %{_unitdir}/rbdmap.service
%if 0%{with python2}
%{python_sitelib}/ceph_argparse.py* %{python_sitelib}/ceph_argparse.py*
%{python_sitelib}/ceph_daemon.py* %{python_sitelib}/ceph_daemon.py*
%endif
%if 0%{with python3}
%{python3_sitelib}/ceph_argparse.py
%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
%{python3_sitelib}/ceph_daemon.py
%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py*
%endif
%dir %{_udevrulesdir} %dir %{_udevrulesdir}
%{_udevrulesdir}/50-rbd.rules %{_udevrulesdir}/50-rbd.rules
%attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/ %attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/
@ -1376,8 +1282,11 @@ fi
%files mon %files mon
%{_bindir}/ceph-mon %{_bindir}/ceph-mon
%{_bindir}/ceph-rest-api
%{_bindir}/ceph-monstore-tool %{_bindir}/ceph-monstore-tool
%{_mandir}/man8/ceph-mon.8* %{_mandir}/man8/ceph-mon.8*
%{_mandir}/man8/ceph-rest-api.8*
%{python_sitelib}/ceph_rest_api.py*
%{_unitdir}/ceph-mon@.service %{_unitdir}/ceph-mon@.service
%{_unitdir}/ceph-mon.target %{_unitdir}/ceph-mon.target
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon
@ -1556,7 +1465,7 @@ fi
%{_mandir}/man8/ceph-bluestore-tool.8* %{_mandir}/man8/ceph-bluestore-tool.8*
%{_mandir}/man8/ceph-volume.8* %{_mandir}/man8/ceph-volume.8*
%{_mandir}/man8/ceph-volume-systemd.8* %{_mandir}/man8/ceph-volume-systemd.8*
%if ( ( 0%{?rhel} && 0%{?rhel} < 8) && ! 0%{?centos} ) %if ( ( 0%{?rhel} && 0%{?rhel} <= 7) && ! 0%{?centos} )
%attr(0755,-,-) %{_sysconfdir}/cron.hourly/subman %attr(0755,-,-) %{_sysconfdir}/cron.hourly/subman
%endif %endif
%{_unitdir}/ceph-osd@.service %{_unitdir}/ceph-osd@.service
@ -1570,6 +1479,11 @@ fi
if [ $1 -eq 1 ] ; then if [ $1 -eq 1 ] ; then
/usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || : /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || :
fi fi
%if 0%{?sysctl_apply}
%sysctl_apply 90-ceph-osd.conf
%else
/usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || :
%endif
%endif %endif
%if 0%{?fedora} || 0%{?rhel} %if 0%{?fedora} || 0%{?rhel}
%systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target %systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
@ -1577,11 +1491,6 @@ fi
if [ $1 -eq 1 ] ; then if [ $1 -eq 1 ] ; then
/usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || : /usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
fi fi
%if 0%{?sysctl_apply}
%sysctl_apply 90-ceph-osd.conf
%else
/usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || :
%endif
%preun osd %preun osd
%if 0%{?suse_version} %if 0%{?suse_version}
@ -1650,17 +1559,13 @@ fi
%{_bindir}/librados-config %{_bindir}/librados-config
%{_mandir}/man8/librados-config.8* %{_mandir}/man8/librados-config.8*
%if 0%{with python2}
%files -n python-rados %files -n python-rados
%{python_sitearch}/rados.so %{python_sitearch}/rados.so
%{python_sitearch}/rados-*.egg-info %{python_sitearch}/rados-*.egg-info
%endif
%if 0%{with python3}
%files -n python%{python3_pkgversion}-rados %files -n python%{python3_pkgversion}-rados
%{python3_sitearch}/rados.cpython*.so %{python3_sitearch}/rados.cpython*.so
%{python3_sitearch}/rados-*.egg-info %{python3_sitearch}/rados-*.egg-info
%endif
%ldconfig_scriptlets -n libradosstriper1 %ldconfig_scriptlets -n libradosstriper1
%files -n libradosstriper1 %files -n libradosstriper1
@ -1692,10 +1597,6 @@ fi
%ldconfig_scriptlets -n librgw2 %ldconfig_scriptlets -n librgw2
%files -n librgw2 %files -n librgw2
%{_libdir}/librgw.so.* %{_libdir}/librgw.so.*
%if %{with lttng}
%{_libdir}/librgw_op_tp.so*
%{_libdir}/librgw_rados_tp.so*
%endif
%files -n librgw-devel %files -n librgw-devel
%dir %{_includedir}/rados %dir %{_includedir}/rados
@ -1703,29 +1604,21 @@ fi
%{_includedir}/rados/rgw_file.h %{_includedir}/rados/rgw_file.h
%{_libdir}/librgw.so %{_libdir}/librgw.so
%if 0%{with python2}
%files -n python-rgw %files -n python-rgw
%{python_sitearch}/rgw.so %{python_sitearch}/rgw.so
%{python_sitearch}/rgw-*.egg-info %{python_sitearch}/rgw-*.egg-info
%endif
%if 0%{with python3}
%files -n python%{python3_pkgversion}-rgw %files -n python%{python3_pkgversion}-rgw
%{python3_sitearch}/rgw.cpython*.so %{python3_sitearch}/rgw.cpython*.so
%{python3_sitearch}/rgw-*.egg-info %{python3_sitearch}/rgw-*.egg-info
%endif
%if 0%{with python2}
%files -n python-rbd %files -n python-rbd
%{python_sitearch}/rbd.so %{python_sitearch}/rbd.so
%{python_sitearch}/rbd-*.egg-info %{python_sitearch}/rbd-*.egg-info
%endif
%if 0%{with python3}
%files -n python%{python3_pkgversion}-rbd %files -n python%{python3_pkgversion}-rbd
%{python3_sitearch}/rbd.cpython*.so %{python3_sitearch}/rbd.cpython*.so
%{python3_sitearch}/rbd-*.egg-info %{python3_sitearch}/rbd-*.egg-info
%endif
%ldconfig_scriptlets -n libcephfs2 %ldconfig_scriptlets -n libcephfs2
%files -n libcephfs2 %files -n libcephfs2
@ -1737,28 +1630,22 @@ fi
%{_includedir}/cephfs/ceph_statx.h %{_includedir}/cephfs/ceph_statx.h
%{_libdir}/libcephfs.so %{_libdir}/libcephfs.so
%if 0%{with python2}
%files -n python-cephfs %files -n python-cephfs
%{python_sitearch}/cephfs.so %{python_sitearch}/cephfs.so
%{python_sitearch}/cephfs-*.egg-info %{python_sitearch}/cephfs-*.egg-info
%{python_sitelib}/ceph_volume_client.py* %{python_sitelib}/ceph_volume_client.py*
%endif
%if 0%{with python3}
%files -n python%{python3_pkgversion}-cephfs %files -n python%{python3_pkgversion}-cephfs
%{python3_sitearch}/cephfs.cpython*.so %{python3_sitearch}/cephfs.cpython*.so
%{python3_sitearch}/cephfs-*.egg-info %{python3_sitearch}/cephfs-*.egg-info
%{python3_sitelib}/ceph_volume_client.py %{python3_sitelib}/ceph_volume_client.py
%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py* %{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py*
%endif
%if 0%{with python3}
%files -n python%{python3_pkgversion}-ceph-argparse %files -n python%{python3_pkgversion}-ceph-argparse
%{python3_sitelib}/ceph_argparse.py %{python3_sitelib}/ceph_argparse.py
%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py* %{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
%{python3_sitelib}/ceph_daemon.py %{python3_sitelib}/ceph_daemon.py
%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py* %{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py*
%endif
%if 0%{with ceph_test_package} %if 0%{with ceph_test_package}
%files -n ceph-test %files -n ceph-test
@ -1780,7 +1667,13 @@ fi
%{_bindir}/ceph_rgw_multiparser %{_bindir}/ceph_rgw_multiparser
%{_bindir}/ceph_scratchtool %{_bindir}/ceph_scratchtool
%{_bindir}/ceph_scratchtoolpp %{_bindir}/ceph_scratchtoolpp
%{_bindir}/ceph_smalliobench
%{_bindir}/ceph_smalliobenchdumb
%{_bindir}/ceph_smalliobenchfs
%{_bindir}/ceph_smalliobenchrbd
%{_bindir}/ceph_test_* %{_bindir}/ceph_test_*
%{_bindir}/ceph_tpbench
%{_bindir}/ceph_xattr_bench
%{_bindir}/ceph-coverage %{_bindir}/ceph-coverage
%{_bindir}/ceph-debugpack %{_bindir}/ceph-debugpack
%{_mandir}/man8/ceph-debugpack.8* %{_mandir}/man8/ceph-debugpack.8*
@ -1850,7 +1743,7 @@ fi
rm -f ${FILE_CONTEXT}.pre rm -f ${FILE_CONTEXT}.pre
# The fixfiles command won't fix label for /var/run/ceph # The fixfiles command won't fix label for /var/run/ceph
/usr/sbin/restorecon -R %{_rundir}ceph > /dev/null 2>&1 /usr/sbin/restorecon -R %{_rundir}/ceph > /dev/null 2>&1
# Start the daemons iff they were running before # Start the daemons iff they were running before
if test $STATUS -eq 0; then if test $STATUS -eq 0; then
@ -1886,7 +1779,7 @@ if [ $1 -eq 0 ]; then
/usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
rm -f ${FILE_CONTEXT}.pre rm -f ${FILE_CONTEXT}.pre
# The fixfiles command won't fix label for /var/run/ceph # The fixfiles command won't fix label for /var/run/ceph
/usr/sbin/restorecon -R %{_rundir}ceph > /dev/null 2>&1 /usr/sbin/restorecon -R %{_rundir}/ceph > /dev/null 2>&1
# Start the daemons if they were running before # Start the daemons if they were running before
if test $STATUS -eq 0; then if test $STATUS -eq 0; then
@ -1897,28 +1790,14 @@ exit 0
%endif # with selinux %endif # with selinux
%if 0%{with python2}
%files -n python-ceph-compat %files -n python-ceph-compat
# We need an empty %%files list for python-ceph-compat, to tell rpmbuild to # We need an empty %%files list for python-ceph-compat, to tell rpmbuild to
# actually build this meta package. # actually build this meta package.
%endif
%changelog %changelog
* Thu Jun 28 2018 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 1:13.2.0-3 * Fri Jun 29 2018 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 1:12.2.5-2
- New release (1:13.2.0-3) - New release (1:12.2.5-2)
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1:13.1.0-2
- Rebuilt for Python 3.7
* Thu May 31 2018 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 1:13.2.0-1
- New release (1:13.2.0-1)
* Tue May 8 2018 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 1:13.1.0-2
- New release (1:13.1.0-2) +crypto_plugins
* Tue May 8 2018 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 1:13.1.0-1
- New release (1:13.1.0-1)
* Fri Apr 27 2018 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 1:12.2.5-1 * Fri Apr 27 2018 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 1:12.2.5-1
- New release (1:12.2.5-1) - New release (1:12.2.5-1)

View File

@ -1 +1 @@
SHA512 (ceph-13.2.0.tar.gz) = 2524ad5a868024463e1a1edc5bd9c3f7bc1f58e47bf8d331902ed53206120abc6a427dd9c1d657131e67efd955d6ed8052b6c3fed8658aa905d58ac58ee62973 SHA512 (ceph-12.2.5.tar.gz) = bd78358590eb077afcc3c1e12864fadee906c95ac8afee25bdca6155f99b75f89d923159fcc13430abba21a89fee3e566177ff5f9ffabdd3b3f220d05602ab86