Patch4: no-virtualenvs.patch
Patch5: system-zstd.patch
Patch6: types.patch
-Patch7: x32.patch
+Patch7: use-provided-cpu-flag-values.patch
+Patch8: ix86-no-asm.patch
+Patch9: long-int-time_t.patch
URL: https://ceph.io/
%{?with_accelio:BuildRequires: accelio-devel}
%{?with_babeltrace:BuildRequires: babeltrace-devel}
%patch4 -p1
%patch5 -p1
%patch6 -p1
-%ifarch x32
%patch7 -p1
-%endif
+%patch8 -p1
+%patch9 -p1
%build
install -d build
cd build
%cmake .. \
+%ifarch %{x8664} %{ix86} x32
+ -DHAVE_INTEL_SSE=1 \
+%endif
+%ifarch %{x8664} x32
+ -DHAVE_INTEL_SSE2=1 \
+ -DHAVE_INTEL_SSE3=1 \
+ -DHAVE_INTEL_SSSE3=1 \
+ -DHAVE_INTEL_PCLMUL=1 \
+ -DHAVE_INTEL_SSE4_1=1 \
+ -DHAVE_INTEL_SSE4_2=1 \
+%endif
-DALLOCATOR="%{?with_tcmalloc:tcmalloc}%{!?with_tcmalloc:libc}" \
-DFIO_INCLUDE_DIR=/usr/include/fio \
-DWITH_PYTHON3=%{py3_ver} \
--- /dev/null
+--- ceph-16.2.7/cmake/modules/CheckNasm.cmake~ 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/cmake/modules/CheckNasm.cmake 2022-02-12 19:19:51.463245367 +0100
+@@ -10,6 +10,9 @@
+ set(CMAKE_REQUIRED_QUIET true)
+ include(CheckCXXSourceCompiles)
+ check_cxx_source_compiles("
++ #if !defined(__x86_64__)
++ #error ix86
++ #endif
+ #if defined(__x86_64__) && defined(__ILP32__)
+ #error x32
+ #endif
--- /dev/null
+--- /home/users/baggins/devel/PLD/rpm/BUILD/ceph-16.2.7/src/json_spirit/json_spirit_value.h.orig 2021-12-07 17:15:49.000000000 +0100
++++ /home/users/baggins/devel/PLD/rpm/BUILD/ceph-16.2.7/src/json_spirit/json_spirit_value.h 2022-02-13 10:26:48.023109513 +0100
+@@ -51,6 +51,7 @@
+ Value_impl( const Array& value );\r
+ Value_impl( bool value );\r
+ Value_impl( int value );\r
++ Value_impl( long int value );\r
+ Value_impl( boost::int64_t value );\r
+ Value_impl( boost::uint64_t value );\r
+ Value_impl( double value );\r
+@@ -294,6 +295,12 @@
+ : v_( static_cast< boost::int64_t >( value ) )\r
+ {\r
+ }\r
++\r
++ template< class Config >\r
++ Value_impl< Config >::Value_impl( long int value )\r
++ : v_( static_cast< boost::int64_t >( value ) )\r
++ {\r
++ }\r
+ \r
+ template< class Config >\r
+ Value_impl< Config >::Value_impl( boost::int64_t value )\r
{
d(5) << size << dendl;
+--- ceph-16.2.7/src/common/buffer.cc~ 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/common/buffer.cc 2022-02-12 19:45:24.576619502 +0100
+@@ -2272,7 +2272,7 @@
+
+ void ceph::buffer::list::page_aligned_appender::_refill(size_t len) {
+ const size_t alloc = \
+- std::max((size_t)min_alloc, (len + CEPH_PAGE_SIZE - 1) & CEPH_PAGE_MASK);
++ std::max((size_t)min_alloc, (size_t)((len + CEPH_PAGE_SIZE - 1) & CEPH_PAGE_MASK));
+ auto new_back = \
+ ptr_node::create(buffer::create_page_aligned(alloc));
+--- ceph-16.2.7/src/os/bluestore/BlueFS.cc~ 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/os/bluestore/BlueFS.cc 2022-02-12 21:40:54.182516511 +0100
+@@ -3799,7 +3799,7 @@
+ if (dist_to_alignment >= len)
+ return;
+ len -= dist_to_alignment;
+- total += p2align(len, alloc_size);
++ total += p2align((uint64_t)len, alloc_size);
+ };
+ if (alloc[dev]) {
+ alloc[dev]->dump(iterated_allocation);
+--- ceph-16.2.7/src/s3select/include/s3select_functions.h~ 2020-06-23 03:08:18.000000000 +0200
++++ ceph-16.2.7/src/s3select/include/s3select_functions.h 2022-02-12 22:04:21.710093616 +0100
+@@ -585,7 +585,7 @@
+ {
+ boost::gregorian::date_period dp =
+ boost::gregorian::date_period( val_dt1.timestamp()->date(), val_dt2.timestamp()->date());
+- result->set_value( dp.length().days() );
++ result->set_value( (int64_t)dp.length().days() );
+ }
+ else if (strcmp(val_date_part.str(), "hours") == 0)
+ {
+--- ceph-16.2.7/src/librbd/object_map/DiffRequest.cc.orig 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/librbd/object_map/DiffRequest.cc 2022-02-12 22:17:55.163378523 +0100
+@@ -187,7 +187,7 @@
+ m_object_map.resize(m_object_diff_state->size());
+ }
+
+- uint64_t overlap = std::min(m_object_map.size(), prev_object_diff_state_size);
++ uint64_t overlap = std::min(m_object_map.size(), (uint64_t)prev_object_diff_state_size);
+ auto it = m_object_map.begin();
+ auto overlap_end_it = it + overlap;
+ auto diff_it = m_object_diff_state->begin();
+--- ceph-16.2.7/src/tools/neorados.cc~ 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/tools/neorados.cc 2022-02-12 22:23:25.836643956 +0100
+@@ -205,7 +205,7 @@
+
+ std::size_t off = 0;
+ ceph::buffer::list bl;
+- while (auto toread = std::max(len - off, io_size)) {
++ while (auto toread = std::max(len - off, (uint64_t)io_size)) {
+ R::ReadOp op;
+ op.read(off, toread, &bl);
+ r.execute(obj, pool, std::move(op), nullptr, y[ec]);
+--- ceph-16.2.7/src/tools/cephfs_mirror/FSMirror.cc.orig 2021-12-07 17:15:49.000000000 +0100
++++ ceph-16.2.7/src/tools/cephfs_mirror/FSMirror.cc 2022-02-12 22:30:46.487298972 +0100
+@@ -345,7 +345,7 @@
+ std::scoped_lock locker(m_lock);
+ m_directories.emplace(dir_path);
+ m_service_daemon->add_or_update_fs_attribute(m_filesystem.fscid, SERVICE_DAEMON_DIR_COUNT_KEY,
+- m_directories.size());
++ (uint64_t)m_directories.size());
+
+ for (auto &[peer, peer_replayer] : m_peer_replayers) {
+ dout(10) << ": peer=" << peer << dendl;
+@@ -363,7 +363,7 @@
+ if (it != m_directories.end()) {
+ m_directories.erase(it);
+ m_service_daemon->add_or_update_fs_attribute(m_filesystem.fscid, SERVICE_DAEMON_DIR_COUNT_KEY,
+- m_directories.size());
++ (uint64_t)m_directories.size());
+ for (auto &[peer, peer_replayer] : m_peer_replayers) {
+ dout(10) << ": peer=" << peer << dendl;
+ peer_replayer->remove_directory(dir_path);
--- /dev/null
+diff --git a/cmake/modules/SIMDExt.cmake b/cmake/modules/SIMDExt.cmake
+index 5330835aa1..a4dd881e34 100644
+--- a/cmake/modules/SIMDExt.cmake
++++ b/cmake/modules/SIMDExt.cmake
+@@ -76,32 +76,25 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|ARM")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")
+ set(HAVE_INTEL 1)
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
+- CHECK_C_COMPILER_FLAG(-msse HAVE_INTEL_SSE)
+ if(HAVE_INTEL_SSE)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse")
+ endif()
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
+- CHECK_C_COMPILER_FLAG(-msse2 HAVE_INTEL_SSE2)
+ if(HAVE_INTEL_SSE2)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse2")
+ endif()
+- CHECK_C_COMPILER_FLAG(-msse3 HAVE_INTEL_SSE3)
+ if(HAVE_INTEL_SSE3)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse3")
+ endif()
+- CHECK_C_COMPILER_FLAG(-mssse3 HAVE_INTEL_SSSE3)
+ if(HAVE_INTEL_SSSE3)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mssse3")
+ endif()
+- CHECK_C_COMPILER_FLAG(-mpclmul HAVE_INTEL_PCLMUL)
+ if(HAVE_INTEL_PCLMUL)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mpclmul")
+ endif()
+- CHECK_C_COMPILER_FLAG(-msse4.1 HAVE_INTEL_SSE4_1)
+ if(HAVE_INTEL_SSE4_1)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse4.1")
+ endif()
+- CHECK_C_COMPILER_FLAG(-msse4.2 HAVE_INTEL_SSE4_2)
+ if(HAVE_INTEL_SSE4_2)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse4.2")
+ endif()
+++ /dev/null
---- ceph-16.2.7/src/common/buffer.cc~ 2021-12-07 17:15:49.000000000 +0100
-+++ ceph-16.2.7/src/common/buffer.cc 2022-02-12 19:45:24.576619502 +0100
-@@ -2272,7 +2272,7 @@
-
- void ceph::buffer::list::page_aligned_appender::_refill(size_t len) {
- const size_t alloc = \
-- std::max((size_t)min_alloc, (len + CEPH_PAGE_SIZE - 1) & CEPH_PAGE_MASK);
-+ std::max((size_t)min_alloc, (size_t)((len + CEPH_PAGE_SIZE - 1) & CEPH_PAGE_MASK));
- auto new_back = \
- ptr_node::create(buffer::create_page_aligned(alloc));
---- ceph-16.2.7/src/os/bluestore/BlueFS.cc~ 2021-12-07 17:15:49.000000000 +0100
-+++ ceph-16.2.7/src/os/bluestore/BlueFS.cc 2022-02-12 21:40:54.182516511 +0100
-@@ -3799,7 +3799,7 @@
- if (dist_to_alignment >= len)
- return;
- len -= dist_to_alignment;
-- total += p2align(len, alloc_size);
-+ total += p2align((uint64_t)len, alloc_size);
- };
- if (alloc[dev]) {
- alloc[dev]->dump(iterated_allocation);
---- ceph-16.2.7/src/s3select/include/s3select_functions.h~ 2020-06-23 03:08:18.000000000 +0200
-+++ ceph-16.2.7/src/s3select/include/s3select_functions.h 2022-02-12 22:04:21.710093616 +0100
-@@ -585,7 +585,7 @@
- {
- boost::gregorian::date_period dp =
- boost::gregorian::date_period( val_dt1.timestamp()->date(), val_dt2.timestamp()->date());
-- result->set_value( dp.length().days() );
-+ result->set_value( (int64_t)dp.length().days() );
- }
- else if (strcmp(val_date_part.str(), "hours") == 0)
- {
---- ceph-16.2.7/src/librbd/object_map/DiffRequest.cc.orig 2021-12-07 17:15:49.000000000 +0100
-+++ ceph-16.2.7/src/librbd/object_map/DiffRequest.cc 2022-02-12 22:17:55.163378523 +0100
-@@ -187,7 +187,7 @@
- m_object_map.resize(m_object_diff_state->size());
- }
-
-- uint64_t overlap = std::min(m_object_map.size(), prev_object_diff_state_size);
-+ uint64_t overlap = std::min(m_object_map.size(), (uint64_t)prev_object_diff_state_size);
- auto it = m_object_map.begin();
- auto overlap_end_it = it + overlap;
- auto diff_it = m_object_diff_state->begin();
---- ceph-16.2.7/src/tools/neorados.cc~ 2021-12-07 17:15:49.000000000 +0100
-+++ ceph-16.2.7/src/tools/neorados.cc 2022-02-12 22:23:25.836643956 +0100
-@@ -205,7 +205,7 @@
-
- std::size_t off = 0;
- ceph::buffer::list bl;
-- while (auto toread = std::max(len - off, io_size)) {
-+ while (auto toread = std::max(len - off, (uint64_t)io_size)) {
- R::ReadOp op;
- op.read(off, toread, &bl);
- r.execute(obj, pool, std::move(op), nullptr, y[ec]);
---- ceph-16.2.7/src/tools/cephfs_mirror/FSMirror.cc~ 2021-12-07 17:15:49.000000000 +0100
-+++ ceph-16.2.7/src/tools/cephfs_mirror/FSMirror.cc 2022-02-12 22:28:42.717060249 +0100
-@@ -345,7 +345,7 @@
- std::scoped_lock locker(m_lock);
- m_directories.emplace(dir_path);
- m_service_daemon->add_or_update_fs_attribute(m_filesystem.fscid, SERVICE_DAEMON_DIR_COUNT_KEY,
-- m_directories.size());
-+ (uint64_t)m_directories.size());
-
- for (auto &[peer, peer_replayer] : m_peer_replayers) {
- dout(10) << ": peer=" << peer << dendl;
---- ceph-16.2.7/src/tools/cephfs_mirror/FSMirror.cc.orig 2021-12-07 17:15:49.000000000 +0100
-+++ ceph-16.2.7/src/tools/cephfs_mirror/FSMirror.cc 2022-02-12 22:30:46.487298972 +0100
-@@ -345,7 +345,7 @@
- std::scoped_lock locker(m_lock);
- m_directories.emplace(dir_path);
- m_service_daemon->add_or_update_fs_attribute(m_filesystem.fscid, SERVICE_DAEMON_DIR_COUNT_KEY,
-- m_directories.size());
-+ (uint64_t)m_directories.size());
-
- for (auto &[peer, peer_replayer] : m_peer_replayers) {
- dout(10) << ": peer=" << peer << dendl;
-@@ -363,7 +363,7 @@
- if (it != m_directories.end()) {
- m_directories.erase(it);
- m_service_daemon->add_or_update_fs_attribute(m_filesystem.fscid, SERVICE_DAEMON_DIR_COUNT_KEY,
-- m_directories.size());
-+ (uint64_t)m_directories.size());
- for (auto &[peer, peer_replayer] : m_peer_replayers) {
- dout(10) << ": peer=" << peer << dendl;
- peer_replayer->remove_directory(dir_path);