diff --git a/0001-9df56dc509a6cbb7c1da8073e82fc1d2a284418d.patch b/0001-9df56dc509a6cbb7c1da8073e82fc1d2a284418d.patch new file mode 100644 index 0000000..ffc38da --- /dev/null +++ b/0001-9df56dc509a6cbb7c1da8073e82fc1d2a284418d.patch @@ -0,0 +1,165 @@ +--- ceph-13.1.0/src/mon/LogMonitor.cc.orig 2018-05-08 08:12:50.101933925 -0400 ++++ ceph-13.1.0/src/mon/LogMonitor.cc 2018-05-08 08:12:59.470933925 -0400 +@@ -62,7 +62,6 @@ + { + dout(10) << "create_initial -- creating initial map" << dendl; + LogEntry e; +- memset(&e.who, 0, sizeof(e.who)); + e.name = g_conf->name; + e.stamp = ceph_clock_now(); + e.prio = CLOG_INFO; +--- ceph-13.1.0/src/mon/MonMap.h.orig 2018-05-08 08:13:08.173933925 -0400 ++++ ceph-13.1.0/src/mon/MonMap.h 2018-05-08 08:13:17.391933925 -0400 +@@ -118,7 +118,6 @@ + + MonMap() + : epoch(0) { +- memset(&fsid, 0, sizeof(fsid)); + } + + uuid_d& get_fsid() { return fsid; } +--- ceph-13.1.0/src/os/filestore/HashIndex.h.orig 2018-05-08 08:13:35.377933925 -0400 ++++ ceph-13.1.0/src/os/filestore/HashIndex.h 2018-05-08 08:13:59.853933925 -0400 +@@ -395,7 +395,7 @@ + + struct CmpPairBitwise { + bool operator()(const pair& l, +- const pair& r) ++ const pair& r) const + { + if (l.first < r.first) + return true; +@@ -408,7 +408,7 @@ + }; + + struct CmpHexdigitStringBitwise { +- bool operator()(const string& l, const string& r) { ++ bool operator()(const string& l, const string& r) const { + return reverse_hexdigit_bits_string(l) < reverse_hexdigit_bits_string(r); + } + }; +--- ceph-13.1.0/src/os/filestore/LFNIndex.h.orig 2018-05-08 08:14:06.721933925 -0400 ++++ ceph-13.1.0/src/os/filestore/LFNIndex.h 2018-05-08 08:14:34.671933925 -0400 +@@ -63,7 +63,7 @@ + out: \ + complete_inject_failure(); \ + return r; \ +- } catch (RetryException) { \ ++ } catch (RetryException&) { \ + failed = true; \ + } catch (...) { \ + ceph_abort(); \ +--- ceph-13.1.0/src/client/Inode.h.orig 2018-05-08 08:08:26.305933925 -0400 ++++ ceph-13.1.0/src/client/Inode.h 2018-05-08 08:08:38.029933925 -0400 +@@ -279,7 +279,6 @@ + _ref(0), ll_ref(0) + { + memset(&dir_layout, 0, sizeof(dir_layout)); +- memset("a, 0, sizeof(quota)); + } + ~Inode(); + +--- ceph-13.1.0/src/osd/OSDMap.h.orig 2018-05-08 08:14:51.066933925 -0400 ++++ ceph-13.1.0/src/osd/OSDMap.h 2018-05-08 08:15:14.148933925 -0400 +@@ -427,7 +427,6 @@ + encode_features(0), + epoch(e), new_pool_max(-1), new_flags(-1), new_max_osd(-1), + have_crc(false), full_crc(0), inc_crc(0) { +- memset(&fsid, 0, sizeof(fsid)); + } + explicit Incremental(bufferlist &bl) { + bufferlist::iterator p = bl.begin(); +@@ -607,7 +606,6 @@ + cached_up_osd_features(0), + crc_defined(false), crc(0), + crush(std::make_shared()) { +- memset(&fsid, 0, sizeof(fsid)); + } + + private: +--- ceph-13.1.0/src/common/cmdparse.h.orig 2018-05-08 08:09:17.772933925 -0400 ++++ ceph-13.1.0/src/common/cmdparse.h 2018-05-08 08:09:36.500933925 -0400 +@@ -54,7 +54,7 @@ + try { + val = boost::get(cmdmap.find(k)->second); + return true; +- } catch (boost::bad_get) { ++ } catch (boost::bad_get&) { + handle_bad_get(cct, k, typeid(T).name()); + } + } +--- ceph-13.1.0/src/messages/MClientReply.h.orig 2018-05-08 08:10:22.281933925 -0400 ++++ ceph-13.1.0/src/messages/MClientReply.h 2018-05-08 08:10:46.660933925 -0400 +@@ -187,7 +187,7 @@ + if (features & CEPH_FEATURE_MDS_QUOTA) + decode(quota, p); + else +- memset("a, 0, sizeof(quota)); ++ quota = quota_info_t{}; + + if ((features & CEPH_FEATURE_FS_FILE_LAYOUT_V2)) + decode(layout.pool_ns, p); +--- ceph-13.1.0/src/messages/MMonSubscribeAck.h.orig 2018-05-08 08:10:58.478933925 -0400 ++++ ceph-13.1.0/src/messages/MMonSubscribeAck.h 2018-05-08 08:11:17.484933925 -0400 +@@ -23,7 +23,6 @@ + + MMonSubscribeAck() : Message(CEPH_MSG_MON_SUBSCRIBE_ACK), + interval(0) { +- memset(&fsid, 0, sizeof(fsid)); + } + MMonSubscribeAck(uuid_d& f, int i) : Message(CEPH_MSG_MON_SUBSCRIBE_ACK), + interval(i), fsid(f) { } +--- ceph-13.1.0/src/mgr/DaemonState.h.orig 2018-05-08 08:12:16.521933925 -0400 ++++ ceph-13.1.0/src/mgr/DaemonState.h 2018-05-08 08:12:40.995933925 -0400 +@@ -130,7 +130,7 @@ + auto p = config_defaults_bl.begin(); + try { + decode(config_defaults, p); +- } catch (buffer::error e) { ++ } catch (buffer::error& e) { + } + } + return config_defaults; +--- ceph-13.1.0/cmake/modules/BuildDPDK.cmake.orig 2018-05-08 08:41:02.168933925 -0400 ++++ ceph-13.1.0/cmake/modules/BuildDPDK.cmake 2018-05-08 08:41:47.411933925 -0400 +@@ -71,7 +71,7 @@ + BUILD_IN_SOURCE 1 + INSTALL_COMMAND "true") + ExternalProject_Add_Step(dpdk-ext patch-config +- COMMAND ${CMAKE_MODULE_PATH}/patch-dpdk-conf.sh ${dpdk_dir} ${machine} ++ COMMAND ${CMAKE_MODULE_PATH}/patch-dpdk-conf.sh ${dpdk_dir} ${machine} ${arch} + DEPENDEES configure + DEPENDERS build) + # easier to adjust the config +@@ -86,7 +86,7 @@ + # target + file(MAKE_DIRECTORY ${DPDK_INCLUDE_DIR}) + foreach(c +- pci bus_pci ++ bus_pci pci + eal + mempool mempool_ring mempool_stack ring) + add_library(dpdk::${c} STATIC IMPORTED) +--- ceph-13.1.0/cmake/modules/patch-dpdk-conf.sh.orig 2018-05-08 08:42:01.089933925 -0400 ++++ ceph-13.1.0/cmake/modules/patch-dpdk-conf.sh 2018-05-08 08:43:11.781933925 -0400 +@@ -15,8 +15,12 @@ + shift + machine=$1 + shift ++arch=$1 ++shift + + setconf CONFIG_RTE_MACHINE "${machine}" ++setconf CONFIG_RTE_ARCH "${arch}" ++ + # Disable experimental features + setconf CONFIG_RTE_NEXT_ABI n + setconf CONFIG_RTE_LIBRTE_MBUF_OFFLOAD n +@@ -38,6 +42,7 @@ + setconf CONFIG_RTE_LIBRTE_VMXNET3_PMD n + setconf CONFIG_RTE_LIBRTE_PMD_VHOST n + setconf CONFIG_RTE_APP_EVENTDEV n ++setconf CONFIG_RTE_MAX_VFIO_GROUPS 64 + + # no test + setconf CONFIG_RTE_APP_TEST n diff --git a/0001-src-rocksdb-util-murmurhash.patch b/0001-src-rocksdb-util-murmurhash.patch deleted file mode 100644 index f67a0ff..0000000 --- a/0001-src-rocksdb-util-murmurhash.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- 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; - }; diff --git a/0002-cmake-Support-ppc64.patch b/0002-cmake-Support-ppc64.patch deleted file mode 100644 index 6b09549..0000000 --- a/0002-cmake-Support-ppc64.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 2f0a7153460acc3f21462236f470ec3471fa2ee1 Mon Sep 17 00:00:00 2001 -From: Boris Ranto -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 ---- - 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 - --#if __linux__ && __powerpc64__ -+#ifdef HAVE_PPC64LE - #include - #include --#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 - diff --git a/0003-librbd-Conditionally-import-TrimRequest.cc.patch b/0003-librbd-Conditionally-import-TrimRequest.cc.patch deleted file mode 100644 index 2f02efb..0000000 --- a/0003-librbd-Conditionally-import-TrimRequest.cc.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 74a754690736f6608b0d4d9c807df0bd777a129d Mon Sep 17 00:00:00 2001 -From: Boris Ranto -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 ---- - 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::send_finish(int r) { - } // namespace operation - } // namespace librbd - -+#ifndef TEST_F - template class librbd::operation::TrimRequest; -+#endif --- -2.9.5 - diff --git a/0004-cmake-modules-BuildBoost.cmake.patch b/0004-cmake-modules-BuildBoost.cmake.patch deleted file mode 100644 index 644a6c4..0000000 --- a/0004-cmake-modules-BuildBoost.cmake.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ceph-12.2.3/cmake/modules/BuildBoost.cmake.orig 2018-02-21 14:13:32.527899631 -0500 -+++ ceph-12.2.3/cmake/modules/BuildBoost.cmake 2018-02-21 14:14:04.796899631 -0500 -@@ -75,7 +75,7 @@ - set(install_command - ${b2} install) - set(boost_root_dir "${CMAKE_BINARY_DIR}/boost") -- if(EXISTS "${PROJECT_SOURCE_DIR}/src/boost/libs/config/include/boost/config.hpp") -+ if(EXISTS "${PROJECT_SOURCE_DIR}/src/boost/boost/config.hpp") - message(STATUS "boost already in src") - set(source_dir - SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/boost") diff --git a/0005-src-rocksdb-table-block.h.patch b/0005-src-rocksdb-table-block.h.patch deleted file mode 100644 index 8acb401..0000000 --- a/0005-src-rocksdb-table-block.h.patch +++ /dev/null @@ -1,155 +0,0 @@ ---- 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[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(&next_[0]), &height, sizeof(int)); - } - - // Retrieves the value passed to StashHeight. Undefined after a call diff --git a/ceph.spec b/ceph.spec index 9017056..1fa45d7 100644 --- a/ceph.spec +++ b/ceph.spec @@ -17,57 +17,56 @@ %global _hardened_build 1 %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 %ifarch s390 s390x %bcond_with tcmalloc %else %bcond_without tcmalloc %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} %bcond_without selinux +%bcond_without ceph_test_package +%bcond_without cephfs_java +%bcond_without lttng %endif %if 0%{?suse_version} %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 - -# LTTng-UST enabled on Fedora, RHEL 6+, and SLE (not openSUSE) -%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version} -%if ! 0%{?is_opensuse} +%if 0%{?is_opensuse} +%bcond_without lttng +%else +%ifarch x86_64 aarch64 %bcond_without lttng +%else +%bcond_with lttng %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} # get selinux policy version -%{!?_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)} +%{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0} %endif %{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d} %{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create} %{!?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 %global _libexecdir %{_exec_prefix}/lib @@ -85,7 +84,7 @@ # main package definition ################################################################################# Name: ceph -Version: 12.2.5 +Version: 13.1.0 Release: 1%{?dist} %if 0%{?fedora} || 0%{?rhel} Epoch: 1 @@ -102,12 +101,14 @@ Group: System/Filesystems URL: http://ceph.com/ Source0: http://download.ceph.com/tarballs/%{name}-%{version}.tar.gz # https://bugzilla.redhat.com/show_bug.cgi?id=1474773 -Patch001: 0001-src-rocksdb-util-murmurhash.patch +Patch001: 0001-9df56dc509a6cbb7c1da8073e82fc1d2a284418d.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 +#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} +# _insert_obs_source_lines_here %if 0%{?is_opensuse} ExclusiveArch: x86_64 aarch64 ppc64 ppc64le %else @@ -117,10 +118,10 @@ ExclusiveArch: x86_64 aarch64 ppc64le s390x ################################################################################# # dependencies that apply across all distro families ################################################################################# -Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release} -Requires: ceph-mds = %{_epoch_prefix}%{version}-%{release} -Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} -Requires: ceph-mon = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-mds = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-mon = %{_epoch_prefix}%{version}-%{release} Requires(post): binutils %if 0%{with cephfs_java} BuildRequires: java-devel @@ -129,50 +130,47 @@ BuildRequires: sharutils %if 0%{with selinux} BuildRequires: checkpolicy 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 BuildRequires: bc BuildRequires: gperf -BuildRequires: cmake +BuildRequires: cmake BuildRequires: cryptsetup BuildRequires: fuse-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++ +%endif BuildRequires: gdbm %if 0%{with tcmalloc} BuildRequires: gperftools-devel >= 2.4 %endif -BuildRequires: jq +BuildRequires: jq BuildRequires: leveldb-devel > 1.2 BuildRequires: libaio-devel BuildRequires: libblkid-devel >= 2.17 BuildRequires: libcurl-devel BuildRequires: libudev-devel +BuildRequires: liboath-devel BuildRequires: libtool BuildRequires: libxml2-devel +BuildRequires: libuuid-devel BuildRequires: make BuildRequires: parted BuildRequires: perl BuildRequires: pkgconfig -BuildRequires: python -BuildRequires: python-devel -BuildRequires: python-nose -BuildRequires: python-requests -BuildRequires: python-virtualenv +BuildRequires: procps +BuildRequires: python%{_python_buildid} +BuildRequires: python%{_python_buildid}-devel +BuildRequires: python%{_python_buildid}-nose +BuildRequires: python%{_python_buildid}-requests +BuildRequires: python%{_python_buildid}-virtualenv BuildRequires: snappy-devel +%if 0%{with make_check} +BuildRequires: socat +%endif BuildRequires: udev BuildRequires: util-linux BuildRequires: valgrind-devel @@ -186,27 +184,31 @@ BuildRequires: yasm # distro-conditional dependencies ################################################################################# %if 0%{?suse_version} -BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(systemd) BuildRequires: systemd-rpm-macros BuildRequires: systemd %{?systemd_requires} PreReq: %fillup_prereq BuildRequires: net-tools BuildRequires: libbz2-devel -BuildRequires: btrfsprogs +BuildRequires: btrfsprogs BuildRequires: mozilla-nss-devel BuildRequires: keyutils-devel -BuildRequires: libopenssl-devel -BuildRequires: lsb-release -BuildRequires: openldap2-devel -BuildRequires: python-Cython -BuildRequires: python-PrettyTable -BuildRequires: python-Sphinx -BuildRequires: rdma-core-devel +BuildRequires: libopenssl-devel +BuildRequires: lsb-release +BuildRequires: openldap2-devel +BuildRequires: cunit-devel +BuildRequires: python%{_python_buildid}-base +BuildRequires: python%{_python_buildid}-Cython +BuildRequires: python%{_python_buildid}-PrettyTable +BuildRequires: python%{_python_buildid}-Sphinx +BuildRequires: rdma-core-devel +BuildRequires: liblz4-devel >= 1.7 +BuildRequires: rdma-core-devel %endif %if 0%{?fedora} || 0%{?rhel} Requires: systemd -BuildRequires: boost-random +BuildRequires: boost-random BuildRequires: btrfs-progs BuildRequires: nss-devel BuildRequires: keyutils-libs-devel @@ -214,12 +216,14 @@ BuildRequires: keyutils-libs-devel %ifnarch %{arm} BuildRequires: rdma-core-devel %endif -BuildRequires: openldap-devel -BuildRequires: openssl-devel -BuildRequires: redhat-lsb-core -BuildRequires: Cython -BuildRequires: python-prettytable -BuildRequires: python-sphinx +BuildRequires: openldap-devel +BuildRequires: openssl-devel +BuildRequires: redhat-lsb-core +BuildRequires: CUnit-devel +BuildRequires: Cython%{_python_buildid} +BuildRequires: python%{_python_buildid}-prettytable +BuildRequires: python%{_python_buildid}-sphinx +BuildRequires: lz4-devel >= 1.7 %endif # python34-... for RHEL, python3-... for all other supported distros %if ( 0%{?rhel} && 0%{?rhel} <= 7 ) @@ -231,6 +235,33 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-Cython %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 %if %{with lttng} %if 0%{?fedora} || 0%{?rhel} @@ -239,7 +270,7 @@ BuildRequires: libbabeltrace-devel %endif %if 0%{?suse_version} BuildRequires: lttng-ust-devel -BuildRequires: babeltrace-devel +BuildRequires: babeltrace-devel %endif %endif %if 0%{?suse_version} @@ -250,7 +281,7 @@ BuildRequires: expat-devel %endif #hardened-cc1 %if 0%{?fedora} || 0%{?rhel} -BuildRequires: redhat-rpm-config +BuildRequires: redhat-rpm-config %endif %description @@ -262,33 +293,39 @@ on commodity hardware and delivers object, block and file system storage. # subpackages ################################################################################# %package base -Summary: Ceph Base Package +Summary: Ceph Base Package %if 0%{?suse_version} -Group: System/Filesystems +Group: System/Filesystems %endif -Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} -Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} -Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} +Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} +Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} +Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} %if 0%{with selinux} -Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release} %endif Requires(post):/sbin/ldconfig Requires(postun):/sbin/ldconfig -Requires: python -Requires: python-requests -Requires: python-setuptools -Requires: grep -Requires: xfsprogs -Requires: logrotate -Requires: util-linux -Requires: cryptsetup -Requires: findutils -Requires: psmisc -Requires: which -%if 0%{?suse_version} -Recommends: ntp-daemon +Requires: cryptsetup +Requires: e2fsprogs +Requires: findutils +Requires: grep +Requires: logrotate +Requires: parted +Requires: psmisc +Requires: python%{_python_buildid}-requests +Requires: python%{_python_buildid}-setuptools +Requires: util-linux +Requires: xfsprogs +Requires: which +%if 0%{?fedora} || 0%{?rhel} +Requires: gdisk +%endif +%if 0%{?suse_version} +Recommends: ntp-daemon +Recommends: chrony +Requires: gptfdisk %endif %description base Base is the package that includes all the files shared amongst ceph servers @@ -301,17 +338,18 @@ Group: System/Filesystems Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} Requires: librados2 = %{_epoch_prefix}%{version}-%{release} Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} -Requires: python-rados = %{_epoch_prefix}%{version}-%{release} -Requires: python-rbd = %{_epoch_prefix}%{version}-%{release} -Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release} -Requires: python-rgw = %{_epoch_prefix}%{version}-%{release} +Requires: python%{_python_buildid}-rados = %{_epoch_prefix}%{version}-%{release} +Requires: python%{_python_buildid}-rbd = %{_epoch_prefix}%{version}-%{release} +Requires: python%{_python_buildid}-cephfs = %{_epoch_prefix}%{version}-%{release} +Requires: python%{_python_buildid}-rgw = %{_epoch_prefix}%{version}-%{release} %if 0%{?fedora} || 0%{?rhel} -Requires: python-prettytable +Requires: python%{_python_buildid}-prettytable +Requires: python%{_python_buildid}-requests %endif %if 0%{?suse_version} -Requires: python-PrettyTable +Requires: python%{_python_buildid}-PrettyTable +Requires: python%{_python_buildid}-requests %endif -Requires: python-requests %{?systemd_requires} %if 0%{?suse_version} Requires(pre): pwdutils @@ -337,13 +375,6 @@ Summary: Ceph Monitor Daemon Group: System/Filesystems %endif 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 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 @@ -351,24 +382,29 @@ parliament cluster that provides extremely reliable and durable storage of cluster membership, configuration, and state. %package mgr -Summary: Ceph Manager Daemon +Summary: Ceph Manager Daemon %if 0%{?suse_version} -Group: System/Filesystems +Group: System/Filesystems %endif -Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} %if 0%{?fedora} || 0%{?rhel} -Requires: python-cherrypy -Requires: python-jinja2 -Requires: python-werkzeug -Requires: pyOpenSSL +Requires: python%{_python_buildid}-cherrypy +Requires: python%{_python_buildid}-routes +Requires: python%{_python_buildid}-jinja2 +Requires: python%{_python_buildid}-pecan +Requires: python%{_python_buildid}-werkzeug +Requires: pyOpenSSL%{_python_buildid} +%endif +%if 0%{?suse_version} +Requires: python%{_python_buildid}-CherryPy +Requires: python%{_python_buildid}-Routes +Requires: python%{_python_buildid}-Jinja2 +Requires: python%{_python_buildid}-Werkzeug +Requires: python%{_python_buildid}-pecan +Requires: python%{_python_buildid}-pyOpenSSL +Requires: python%{_python_buildid}-bcrypt +Recommends: python%{_python_buildid}-influxdb %endif -%if 0%{?suse_version} -Requires: python-CherryPy -Requires: python-jinja2 -Requires: python-Werkzeug -Requires: python-pyOpenSSL -%endif -Requires: python-pecan %description mgr ceph-mgr enables python modules that provide services (such as the REST module derived from Calamari) and expose CLI hooks. ceph-mgr gathers @@ -455,15 +491,7 @@ Summary: Ceph Object Storage Daemon Group: System/Filesystems %endif 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 ceph-osd is the object storage daemon for the Ceph distributed file system. It is responsible for storing objects on a local file system @@ -520,6 +548,7 @@ Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release} This package contains libraries and headers needed to develop programs that use RADOS gateway client library. +%if 0%{with python2} %package -n python-rgw Summary: Python 2 libraries for the RADOS gateway %if 0%{?suse_version} @@ -531,11 +560,12 @@ Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} %description -n python-rgw This package contains Python 2 libraries for interacting with Cephs RADOS gateway. +%endif %package -n python%{python3_pkgversion}-rgw Summary: Python 3 libraries for the RADOS gateway %if 0%{?suse_version} -Group: Development/Languages/Python +Group: Development/Libraries/Python %endif Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} @@ -543,6 +573,7 @@ Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{relea This package contains Python 3 libraries for interacting with Cephs RADOS gateway. +%if 0%{with python2} %package -n python-rados Summary: Python 2 libraries for the RADOS object store %if 0%{?suse_version} @@ -553,11 +584,12 @@ Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} %description -n python-rados This package contains Python 2 libraries for interacting with Cephs RADOS object store. +%endif %package -n python%{python3_pkgversion}-rados Summary: Python 3 libraries for the RADOS object store %if 0%{?suse_version} -Group: Development/Languages/Python +Group: Development/Libraries/Python %endif Requires: python%{python3_pkgversion} Requires: librados2 = %{_epoch_prefix}%{version}-%{release} @@ -623,10 +655,11 @@ Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release} This package contains libraries and headers needed to develop programs that use RADOS block device. +%if 0%{with python2} %package -n python-rbd Summary: Python 2 libraries for the RADOS block device %if 0%{?suse_version} -Group: Development/Languages/Python +Group: Development/Libraries/Python %endif Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} Requires: python-rados = %{_epoch_prefix}%{version}-%{release} @@ -634,11 +667,12 @@ Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} %description -n python-rbd This package contains Python 2 libraries for interacting with Cephs RADOS block device. +%endif %package -n python%{python3_pkgversion}-rbd Summary: Python 3 libraries for the RADOS block device %if 0%{?suse_version} -Group: Development/Languages/Python +Group: Development/Libraries/Python %endif Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} @@ -677,24 +711,26 @@ Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release} This package contains libraries and headers needed to develop programs that use Cephs distributed file system. +%if 0%{with python2} %package -n python-cephfs Summary: Python 2 libraries for Ceph distributed file system %if 0%{?suse_version} -Group: Development/Languages/Python +Group: Development/Libraries/Python %endif Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} %if 0%{?suse_version} -Recommends: python-rados = %{_epoch_prefix}%{version}-%{release} +Recommends: python-rados = %{_epoch_prefix}%{version}-%{release} %endif Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} %description -n python-cephfs This package contains Python 2 libraries for interacting with Cephs distributed file system. +%endif %package -n python%{python3_pkgversion}-cephfs Summary: Python 3 libraries for Ceph distributed file system %if 0%{?suse_version} -Group: Development/Languages/Python +Group: Development/Libraries/Python %endif Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} @@ -702,16 +738,18 @@ Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{relea This package contains Python 3 libraries for interacting with Cephs distributed file system. +%if 0%{with python2} %package -n python%{python3_pkgversion}-ceph-argparse Summary: Python 3 utility libraries for Ceph CLI %if 0%{?suse_version} -Group: Development/Languages/Python +Group: Development/Libraries/Python %endif %description -n python%{python3_pkgversion}-ceph-argparse 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 command-description information, validating user command input against those descriptions, and submitting the command to the appropriate daemon. +%endif %if 0%{with ceph_test_package} %package -n ceph-test @@ -761,17 +799,18 @@ Group: System/Libraries %endif Requires: java Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release} -Requires: junit -BuildRequires: junit +BuildRequires: junit %description -n cephfs-java This package contains the Java libraries for the Ceph File System. %endif %package -n rados-objclass-devel -Summary: RADOS object class development kit -Group: Development/Libraries -Requires: librados2-devel = %{_epoch_prefix}%{version}-%{release} +Summary: RADOS object class development kit +%if 0%{?suse_version} +Group: Development/Libraries/C and C++ +%endif +Requires: librados2-devel = %{_epoch_prefix}%{version}-%{release} %description -n rados-objclass-devel This package contains libraries and headers needed to develop RADOS object class plugins. @@ -795,10 +834,11 @@ populated file-systems. %endif +%if 0%{with python2} %package -n python-ceph-compat Summary: Compatibility package for Cephs python libraries %if 0%{?suse_version} -Group: Development/Languages/Python +Group: Development/Libraries/Python %endif Obsoletes: python-ceph Requires: python-rados = %{_epoch_prefix}%{version}-%{release} @@ -811,6 +851,7 @@ This is a compatibility package to accommodate python-ceph split into python-rados, python-rbd, python-rgw and python-cephfs. Packages still depending on python-ceph should be fixed to depend on python-rados, python-rbd, python-rgw or python-cephfs instead. +%endif ################################################################################# # common @@ -819,6 +860,11 @@ python-rbd, python-rgw or python-cephfs instead. %autosetup -p1 -n %{name}-%{version} %build + +%if 0%{?rhel} == 7 +. /opt/rh/devtoolset-7/enable +%endif + %if 0%{with cephfs_java} # Find jni.h for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do @@ -826,36 +872,39 @@ for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do done %endif -%if %{with lowmem_builder} +%if 0%{?suse_version} +# 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" %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 CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS" export LDFLAGS="$RPM_LD_FLAGS" -env | sort - -%if %{with lowmem_builder} -%ifnarch armv7hl -%if 0%{?jobs} > 8 -%define _smp_mflags -j8 -%endif -%else -%define _smp_mflags -j1 -%endif -%endif +# 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" -# 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//') +env | sort mkdir build cd build @@ -871,7 +920,13 @@ cmake .. \ -DWITH_EMBEDDED=OFF \ -DWITH_MANPAGE=ON \ -DWITH_PYTHON3=ON \ - -DWITH_SYSTEMD=ON \ + -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} <= 7) && ! 0%{?centos} ) -DWITH_SUBMAN=ON \ %endif @@ -903,21 +958,18 @@ cmake .. \ %ifnarch %{arm} -DWITH_RDMA=OFF \ %endif - -DBOOST_J=%{_smp_ncpus} - -make %{?_smp_mflags} + -DBOOST_J=$CEPH_SMP_NCPUS +make "$CEPH_MFLAGS_JOBS" %if 0%{with make_check} %check # run in-tree unittests cd build -ctest %{?_smp_mflags} - +ctest "$CEPH_MFLAGS_JOBS" %endif - %install pushd build make DESTDIR=%{buildroot} install @@ -929,10 +981,9 @@ install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph %endif %if 0%{?suse_version} -install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name} +install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_fillupdir}/sysconfig.%{name} %endif 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 mkdir -p %{buildroot}%{_sbindir} install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph @@ -989,7 +1040,6 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd %{_libexecdir}/systemd/system-preset/50-ceph.preset %{_sbindir}/ceph-create-keys %{_sbindir}/ceph-disk -%{_sbindir}/rcceph %dir %{_libexecdir}/ceph %{_libexecdir}/ceph/ceph_common.sh %dir %{_libdir}/rados-classes @@ -1012,17 +1062,28 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd %config(noreplace) %{_sysconfdir}/sysconfig/ceph %endif %if 0%{?suse_version} -%{_localstatedir}/adm/fillup-templates/sysconfig.* +%{_fillupdir}/sysconfig.* %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds %endif %{_unitdir}/ceph-disk@.service %{_unitdir}/ceph.target +%if 0%{with python2} %{python_sitelib}/ceph_detect_init* %{python_sitelib}/ceph_disk* +%else +%{python3_sitelib}/ceph_detect_init* +%{python3_sitelib}/ceph_disk* +%endif +%if 0%{with python2} %dir %{python_sitelib}/ceph_volume %{python_sitelib}/ceph_volume/* %{python_sitelib}/ceph_volume-* +%else +%dir %{python3_sitelib}/ceph_volume +%{python3_sitelib}/ceph_volume/* +%{python3_sitelib}/ceph_volume-* +%endif %{_mandir}/man8/ceph-deploy.8* %{_mandir}/man8/ceph-detect-init.8* %{_mandir}/man8/ceph-create-keys.8* @@ -1093,7 +1154,6 @@ fi %{_bindir}/ceph-dencoder %{_bindir}/ceph-rbdnamer %{_bindir}/ceph-syn -%{_bindir}/ceph-crush-location %{_bindir}/cephfs-data-scan %{_bindir}/cephfs-journal-tool %{_bindir}/cephfs-table-tool @@ -1139,8 +1199,15 @@ fi %config %{_sysconfdir}/bash_completion.d/radosgw-admin %config(noreplace) %{_sysconfdir}/ceph/rbdmap %{_unitdir}/rbdmap.service +%if 0%{with python2} %{python_sitelib}/ceph_argparse.py* %{python_sitelib}/ceph_daemon.py* +%else +%{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} %{_udevrulesdir}/50-rbd.rules %attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/ @@ -1282,11 +1349,8 @@ fi %files mon %{_bindir}/ceph-mon -%{_bindir}/ceph-rest-api %{_bindir}/ceph-monstore-tool %{_mandir}/man8/ceph-mon.8* -%{_mandir}/man8/ceph-rest-api.8* -%{python_sitelib}/ceph_rest_api.py* %{_unitdir}/ceph-mon@.service %{_unitdir}/ceph-mon.target %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon @@ -1559,9 +1623,11 @@ fi %{_bindir}/librados-config %{_mandir}/man8/librados-config.8* +%if 0%{with python2} %files -n python-rados %{python_sitearch}/rados.so %{python_sitearch}/rados-*.egg-info +%endif %files -n python%{python3_pkgversion}-rados %{python3_sitearch}/rados.cpython*.so @@ -1597,6 +1663,10 @@ fi %ldconfig_scriptlets -n librgw2 %files -n librgw2 %{_libdir}/librgw.so.* +%if %{with lttng} +%{_libdir}/librgw_op_tp.so* +%{_libdir}/librgw_rados_tp.so* +%endif %files -n librgw-devel %dir %{_includedir}/rados @@ -1604,17 +1674,21 @@ fi %{_includedir}/rados/rgw_file.h %{_libdir}/librgw.so +%if 0%{with python2} %files -n python-rgw %{python_sitearch}/rgw.so %{python_sitearch}/rgw-*.egg-info +%endif %files -n python%{python3_pkgversion}-rgw %{python3_sitearch}/rgw.cpython*.so %{python3_sitearch}/rgw-*.egg-info +%if 0%{with python2} %files -n python-rbd %{python_sitearch}/rbd.so %{python_sitearch}/rbd-*.egg-info +%endif %files -n python%{python3_pkgversion}-rbd %{python3_sitearch}/rbd.cpython*.so @@ -1630,10 +1704,12 @@ fi %{_includedir}/cephfs/ceph_statx.h %{_libdir}/libcephfs.so +%if 0%{with python2} %files -n python-cephfs %{python_sitearch}/cephfs.so %{python_sitearch}/cephfs-*.egg-info %{python_sitelib}/ceph_volume_client.py* +%endif %files -n python%{python3_pkgversion}-cephfs %{python3_sitearch}/cephfs.cpython*.so @@ -1641,11 +1717,13 @@ fi %{python3_sitelib}/ceph_volume_client.py %{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py* +%if 0%{with python2} %files -n python%{python3_pkgversion}-ceph-argparse %{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 %if 0%{with ceph_test_package} %files -n ceph-test @@ -1667,13 +1745,7 @@ fi %{_bindir}/ceph_rgw_multiparser %{_bindir}/ceph_scratchtool %{_bindir}/ceph_scratchtoolpp -%{_bindir}/ceph_smalliobench -%{_bindir}/ceph_smalliobenchdumb -%{_bindir}/ceph_smalliobenchfs -%{_bindir}/ceph_smalliobenchrbd %{_bindir}/ceph_test_* -%{_bindir}/ceph_tpbench -%{_bindir}/ceph_xattr_bench %{_bindir}/ceph-coverage %{_bindir}/ceph-debugpack %{_mandir}/man8/ceph-debugpack.8* @@ -1790,12 +1862,17 @@ exit 0 %endif # with selinux +%if 0%{with python2} %files -n python-ceph-compat # We need an empty %%files list for python-ceph-compat, to tell rpmbuild to # actually build this meta package. +%endif %changelog +* Tue May 8 2018 Kaleb S. KEITHLEY - 1:13.1.0-1 +- New release (1:13.1.0-1) + * Fri Apr 27 2018 Kaleb S. KEITHLEY - 1:12.2.5-1 - New release (1:12.2.5-1) diff --git a/sources b/sources index 021832c..e0ac550 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ceph-12.2.5.tar.gz) = bd78358590eb077afcc3c1e12864fadee906c95ac8afee25bdca6155f99b75f89d923159fcc13430abba21a89fee3e566177ff5f9ffabdd3b3f220d05602ab86 +SHA512 (ceph-13.1.0.tar.gz) = d4feb0b0bac5e30232eddcc3f69c1d939f0b5268491acecba9a58dcadbbdaab6367f415ede924ca84de9a89a686410613cdc631f8aff15aec0eb4531138eec7a