Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6070bb33a4 | |||
| 3ea101b5f8 | |||
| 9c81e4aa16 | |||
| b6c241b3ba | |||
| 139ca7f855 | |||
| 0dc0a3b4ea | |||
| 8712f3a821 | |||
| bcd1d2c14d | |||
| 598d413716 | |||
| 136952fcef | |||
| 111eb3cffc | |||
| d64bc50440 | |||
| 51de52976c | |||
| 0836694d12 | |||
| 71beeeca2e | |||
| 913d33f992 | |||
| 25a7091990 | |||
| 258cd68cc3 | |||
| 0717b74645 |
@@ -1,55 +0,0 @@
|
||||
--- ceph-15.2.2/src/common/crc32c_intel_fast_zero_asm.s.orig 2020-05-26 08:34:32.226201974 -0400
|
||||
+++ ceph-15.2.2/src/common/crc32c_intel_fast_zero_asm.s 2020-05-26 17:19:32.497201974 -0400
|
||||
@@ -1,5 +1,5 @@
|
||||
;
|
||||
-; Copyright 2012-2013 Intel Corporation All Rights Reserved.
|
||||
+; Copyright 2012-2015 Intel Corporation All Rights Reserved.
|
||||
; All rights reserved.
|
||||
;
|
||||
; http://opensource.org/licenses/BSD-3-Clause
|
||||
@@ -59,6 +59,19 @@
|
||||
xor rbx, rbx ;; rbx = crc1 = 0;
|
||||
xor r10, r10 ;; r10 = crc2 = 0;
|
||||
|
||||
+ cmp len, %%bSize*3*2
|
||||
+ jbe %%non_prefetch
|
||||
+
|
||||
+ %assign i 0
|
||||
+ %rep %%bSize/8 - 1
|
||||
+ crc32 rax, bufptmp ;; update crc0
|
||||
+ crc32 rbx, bufptmp ;; update crc1
|
||||
+ crc32 r10, bufptmp ;; update crc2
|
||||
+ %assign i (i+8)
|
||||
+ %endrep
|
||||
+ jmp %%next %+ %1
|
||||
+
|
||||
+%%non_prefetch:
|
||||
%assign i 0
|
||||
%rep %%bSize/8 - 1
|
||||
crc32 rax, bufptmp ;; update crc0
|
||||
@@ -66,6 +79,8 @@
|
||||
crc32 r10, bufptmp ;; update crc2
|
||||
%assign i (i+8)
|
||||
%endrep
|
||||
+
|
||||
+%%next %+ %1:
|
||||
crc32 rax, bufptmp ;; update crc0
|
||||
crc32 rbx, bufptmp ;; update crc1
|
||||
; SKIP ;crc32 r10, bufptmp ;; update crc2
|
||||
@@ -180,12 +195,15 @@
|
||||
%define crc_init_dw r8d
|
||||
%endif
|
||||
|
||||
-
|
||||
+ endbranch
|
||||
push rdi
|
||||
push rbx
|
||||
|
||||
mov rax, crc_init ;; rax = crc_init;
|
||||
|
||||
+ cmp len, 8
|
||||
+ jb less_than_8
|
||||
+
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; 1) ALIGN: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- ceph-15.1.0/src/common/bit_str.h.orig 2020-02-03 09:47:20.047149798 -0500
|
||||
+++ ceph-15.1.0/src/common/bit_str.h 2020-02-03 09:47:50.213149798 -0500
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <cstdint>
|
||||
#include <iosfwd>
|
||||
#include <functional>
|
||||
+#include <ostream>
|
||||
|
||||
namespace ceph {
|
||||
class Formatter;
|
||||
@@ -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
|
||||
@@ -0,0 +1,24 @@
|
||||
--- ceph-12.2.11/src/osd/PrimaryLogPG.cc.orig 2019-02-02 01:29:42.853608099 -0500
|
||||
+++ ceph-12.2.11/src/osd/PrimaryLogPG.cc 2019-02-02 12:39:33.841608099 -0500
|
||||
@@ -1582,8 +1582,9 @@
|
||||
if (limit != eversion_t() &&
|
||||
limit != pg_trim_to &&
|
||||
pg_log.get_log().approx_size() > target) {
|
||||
+ size_t osd_pg_log_trim_max = cct->_conf->osd_pg_log_trim_max;
|
||||
size_t num_to_trim = std::min(pg_log.get_log().approx_size() - target,
|
||||
- cct->_conf->osd_pg_log_trim_max);
|
||||
+ osd_pg_log_trim_max);
|
||||
if (num_to_trim < cct->_conf->osd_pg_log_trim_min &&
|
||||
cct->_conf->osd_pg_log_trim_max >= cct->_conf->osd_pg_log_trim_min) {
|
||||
return;
|
||||
@@ -1628,8 +1629,9 @@
|
||||
pg_log.get_log().approx_size() > target) {
|
||||
dout(10) << __func__ << " approx pg log length = "
|
||||
<< pg_log.get_log().approx_size() << dendl;
|
||||
+ size_t osd_pg_log_trim_max = cct->_conf->osd_pg_log_trim_max;
|
||||
size_t num_to_trim = std::min(pg_log.get_log().approx_size() - target,
|
||||
- cct->_conf->osd_pg_log_trim_max);
|
||||
+ osd_pg_log_trim_max);
|
||||
dout(10) << __func__ << " num_to_trim = " << num_to_trim << dendl;
|
||||
if (num_to_trim < cct->_conf->osd_pg_log_trim_min &&
|
||||
cct->_conf->osd_pg_log_trim_max >= cct->_conf->osd_pg_log_trim_min) {
|
||||
@@ -1,27 +0,0 @@
|
||||
From 1999108aeb1f6f93a19ea7bb64c6ae8b87d1b264 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Thu, 20 Jan 2022 05:33:13 -0800
|
||||
Subject: [PATCH] CET: Add CET marker to crc32c_intel_fast_zero_asm.s
|
||||
|
||||
Add .note.gnu.property section to crc32c_intel_fast_zero_asm.s to mark
|
||||
for IBT and SHSTK compatibility.
|
||||
---
|
||||
src/common/crc32c_intel_fast_zero_asm.s | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/common/crc32c_intel_fast_zero_asm.s b/src/common/crc32c_intel_fast_zero_asm.s
|
||||
index 216ecf639f3..2e291d858f3 100644
|
||||
--- a/src/common/crc32c_intel_fast_zero_asm.s
|
||||
+++ b/src/common/crc32c_intel_fast_zero_asm.s
|
||||
@@ -654,4 +654,8 @@ slversion crc32_iscsi_zero_00, 00, 02, 0014
|
||||
%ifidn __OUTPUT_FORMAT__, elf64
|
||||
; inform linker that this doesn't require executable stack
|
||||
section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
%endif
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
From bbcc1a69f787881f16156f3c789052942a564103 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Thu, 20 Jan 2022 05:35:49 -0800
|
||||
Subject: [PATCH] isa-l/CET: Add CET marker to x86-64 crc32 assembly codes
|
||||
|
||||
Add .note.gnu.property section to x86-64 crc32 assembly codes to mark
|
||||
for IBT and SHSTK compatibility.
|
||||
---
|
||||
crc/crc32_gzip_refl_by16_10.asm | 9 +++++++++
|
||||
crc/crc32_gzip_refl_by8.asm | 9 +++++++++
|
||||
crc/crc32_gzip_refl_by8_02.asm | 9 +++++++++
|
||||
crc/crc32_ieee_01.asm | 8 ++++++++
|
||||
crc/crc32_ieee_02.asm | 9 +++++++++
|
||||
crc/crc32_ieee_by16_10.asm | 9 +++++++++
|
||||
crc/crc32_ieee_by4.asm | 9 +++++++++
|
||||
crc/crc32_iscsi_00.asm | 8 ++++++++
|
||||
crc/crc32_iscsi_01.asm | 8 ++++++++
|
||||
9 files changed, 78 insertions(+)
|
||||
|
||||
diff --git a/src/isa-l/crc/crc32_gzip_refl_by16_10.asm b/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
|
||||
index 40236f6..b16874d 100644
|
||||
--- a/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
|
||||
+++ b/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
|
||||
@@ -566,3 +566,12 @@ global no_ %+ FUNCTION_NAME
|
||||
no_ %+ FUNCTION_NAME %+ :
|
||||
%endif
|
||||
%endif ; (AS_FEATURE_LEVEL) >= 10
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_gzip_refl_by8.asm b/src/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
index 62f7e7d..97b0c4a 100644
|
||||
--- a/src/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
+++ b/src/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
@@ -622,3 +622,12 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_gzip_refl_by8, 01, 00, 002c
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_gzip_refl_by8_02.asm b/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
|
||||
index 80d849e..1d5a75f 100644
|
||||
--- a/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
|
||||
+++ b/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
|
||||
@@ -553,3 +553,12 @@ pshufb_shf_table:
|
||||
; dq 0x060504030201008f, 0x0e0d0c0b0a090807 ; shl 1 (16-15) / shr15
|
||||
dq 0x8786858483828100, 0x8f8e8d8c8b8a8988
|
||||
dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_01.asm b/src/isa-l/crc/crc32_ieee_01.asm
|
||||
index 32495ed..cfc443b 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_01.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_01.asm
|
||||
@@ -653,3 +653,11 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_01, 01, 06, 0011
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_02.asm b/src/isa-l/crc/crc32_ieee_02.asm
|
||||
index 8a472b0..dd7096a 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_02.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_02.asm
|
||||
@@ -649,3 +649,12 @@ pshufb_shf_table:
|
||||
; dq 0x060504030201008f, 0x0e0d0c0b0a090807 ; shl 1 (16-15) / shr15
|
||||
dq 0x8786858483828100, 0x8f8e8d8c8b8a8988
|
||||
dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_by16_10.asm b/src/isa-l/crc/crc32_ieee_by16_10.asm
|
||||
index 200fd93..2afd597 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_by16_10.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_by16_10.asm
|
||||
@@ -582,3 +582,12 @@ global no_ %+ FUNCTION_NAME
|
||||
no_ %+ FUNCTION_NAME %+ :
|
||||
%endif
|
||||
%endif ; (AS_FEATURE_LEVEL) >= 10
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_by4.asm b/src/isa-l/crc/crc32_ieee_by4.asm
|
||||
index 39bed5a..847d0bd 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_by4.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_by4.asm
|
||||
@@ -563,3 +563,12 @@ SHUF_MASK dq 0x08090A0B0C0D0E0F, 0x0001020304050607
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_by4, 05, 02, 0017
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_iscsi_00.asm b/src/isa-l/crc/crc32_iscsi_00.asm
|
||||
index 4f81e3a..3d6b2d1 100644
|
||||
--- a/src/isa-l/crc/crc32_iscsi_00.asm
|
||||
+++ b/src/isa-l/crc/crc32_iscsi_00.asm
|
||||
@@ -669,3 +669,11 @@ DD 0x54851c7f,0x89e3d7c4,0xeba4fdf8,0x36c23643
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_00, 00, 04, 0014
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_iscsi_01.asm b/src/isa-l/crc/crc32_iscsi_01.asm
|
||||
index 2a81517..c048413 100644
|
||||
--- a/src/isa-l/crc/crc32_iscsi_01.asm
|
||||
+++ b/src/isa-l/crc/crc32_iscsi_01.asm
|
||||
@@ -588,3 +588,11 @@ K_table:
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_01, 01, 04, 0015
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
From 72e6d27e08c86c16e8931739a5e6ecbc06b102d5 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Thu, 20 Jan 2022 05:40:56 -0800
|
||||
Subject: [PATCH] spdk/isa-l/CET: Add CET marker to x86-64 crc32 assembly codes
|
||||
|
||||
Add .note.gnu.property section to x86-64 crc32 assembly codes to mark
|
||||
for IBT and SHSTK compatibility.
|
||||
---
|
||||
crc/crc32_gzip_refl_by8.asm | 9 +++++++++
|
||||
crc/crc32_ieee_01.asm | 8 ++++++++
|
||||
crc/crc32_ieee_by4.asm | 9 +++++++++
|
||||
crc/crc32_iscsi_00.asm | 8 ++++++++
|
||||
crc/crc32_iscsi_01.asm | 8 ++++++++
|
||||
5 files changed, 42 insertions(+)
|
||||
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm b/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
index 62f7e7d..97b0c4a 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
@@ -622,3 +622,12 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_gzip_refl_by8, 01, 00, 002c
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_ieee_01.asm b/src/spdk/isa-l/crc/crc32_ieee_01.asm
|
||||
index 32495ed..cfc443b 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_ieee_01.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_ieee_01.asm
|
||||
@@ -653,3 +653,11 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_01, 01, 06, 0011
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_ieee_by4.asm b/src/spdk/isa-l/crc/crc32_ieee_by4.asm
|
||||
index 39bed5a..847d0bd 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_ieee_by4.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_ieee_by4.asm
|
||||
@@ -563,3 +563,12 @@ SHUF_MASK dq 0x08090A0B0C0D0E0F, 0x0001020304050607
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_by4, 05, 02, 0017
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_iscsi_00.asm b/src/spdk/isa-l/crc/crc32_iscsi_00.asm
|
||||
index 4f81e3a..3d6b2d1 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_iscsi_00.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_iscsi_00.asm
|
||||
@@ -669,3 +669,11 @@ DD 0x54851c7f,0x89e3d7c4,0xeba4fdf8,0x36c23643
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_00, 00, 04, 0014
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_iscsi_01.asm b/src/spdk/isa-l/crc/crc32_iscsi_01.asm
|
||||
index 2a81517..c048413 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_iscsi_01.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_iscsi_01.asm
|
||||
@@ -588,3 +588,11 @@ K_table:
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_01, 01, 04, 0015
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--- ceph-16.2.6-681-gfdc003bc/src/tracing/bluestore.tp.orig 2021-12-07 08:02:04.682972474 -0500
|
||||
+++ ceph-16.2.6-681-gfdc003bc/src/tracing/bluestore.tp 2021-12-07 08:03:13.840771852 -0500
|
||||
@@ -1,3 +1,9 @@
|
||||
+
|
||||
+#ifdef __x86_64__
|
||||
+#undef STAP_SDT_ARG_CONSTRAINT
|
||||
+#define STAP_SDT_ARG_CONSTRAINT norx
|
||||
+#endif
|
||||
+
|
||||
#include "include/int_types.h"
|
||||
|
||||
TRACEPOINT_EVENT(bluestore, transaction_state_duration,
|
||||
--- ceph-16.2.6-681-gfdc003bc/src/tracing/librbd.tp.orig 2021-12-07 09:50:16.467579483 -0500
|
||||
+++ ceph-16.2.6-681-gfdc003bc/src/tracing/librbd.tp 2021-12-07 09:50:47.620026940 -0500
|
||||
@@ -1,3 +1,8 @@
|
||||
+#ifdef __x86_64__
|
||||
+#undef STAP_SDT_ARG_CONSTRAINT
|
||||
+#define STAP_SDT_ARG_CONSTRAINT norx
|
||||
+#endif
|
||||
+
|
||||
#include "tracing/tracing-common.h"
|
||||
#include "include/rbd/librbd.h"
|
||||
#include "include/int_types.h"
|
||||
@@ -1,19 +0,0 @@
|
||||
--- ceph-18.0.0-3078-gc4847bf8/src/rgw/driver/dbstore/CMakeLists.txt.orig 2023-05-10 08:23:50.000000000 -0400
|
||||
+++ ceph-18.0.0-3078-gc4847bf8/src/rgw/driver/dbstore/CMakeLists.txt 2023-05-11 08:21:13.794152904 -0400
|
||||
@@ -24,7 +24,7 @@
|
||||
dbstore_mgr.cc
|
||||
)
|
||||
|
||||
-add_library(dbstore_lib ${dbstore_srcs})
|
||||
+add_library(dbstore_lib STATIC ${dbstore_srcs})
|
||||
target_include_directories(dbstore_lib
|
||||
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw"
|
||||
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw/store/rados"
|
||||
@@ -49,6 +49,7 @@
|
||||
|
||||
# add pthread library
|
||||
set (CMAKE_LINK_LIBRARIES ${CMAKE_LINK_LIBRARIES} pthread)
|
||||
+set (CMAKE_LINK_LIBRARIES ${CMAKE_LINK_LIBRARIES} global)
|
||||
|
||||
find_package(gtest QUIET)
|
||||
if(WITH_TESTS)
|
||||
@@ -1,42 +0,0 @@
|
||||
--- ceph-18.1.2/src/common/subsys_types.h.orig 2023-06-27 15:59:59.000000000 -0400
|
||||
+++ ceph-18.1.2/src/common/subsys_types.h 2023-07-04 19:36:55.941238973 -0400
|
||||
@@ -54,7 +54,7 @@
|
||||
#undef DEFAULT_SUBSYS
|
||||
}
|
||||
|
||||
-constexpr static std::uint8_t
|
||||
+constexpr static uint8_t
|
||||
ceph_subsys_get_max_default_level(const std::size_t subidx) {
|
||||
const auto item = ceph_subsys_get_as_array()[subidx];
|
||||
return std::max(item.log_level, item.gather_level);
|
||||
--- ceph-18.1.2/src/msg/async/crypto_onwire.h.orig 2023-06-27 15:59:59.000000000 -0400
|
||||
+++ ceph-18.1.2/src/msg/async/crypto_onwire.h 2023-07-04 19:36:55.957238704 -0400
|
||||
@@ -95,7 +95,7 @@
|
||||
// Transmitter can append extra bytes of ciphertext at the -final step.
|
||||
// This method return how much was added, and thus let client translate
|
||||
// plaintext size into ciphertext size to grab from wire.
|
||||
- virtual std::uint32_t get_extra_size_at_final() = 0;
|
||||
+ virtual uint32_t get_extra_size_at_final() = 0;
|
||||
|
||||
// Instance of RxHandler must be reset before doing any decrypt-update
|
||||
// step. This applies also to situation when decrypt-final was already
|
||||
--- ceph-18.1.2/src/rocksdb/table/block_based/data_block_hash_index.h.orig 2023-05-24 15:55:23.000000000 -0400
|
||||
+++ ceph-18.1.2/src/rocksdb/table/block_based/data_block_hash_index.h 2023-07-04 19:36:55.971238469 -0400
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "rocksdb/slice.h"
|
||||
|
||||
--- ceph-18.1.2/src/rocksdb/util/string_util.h.orig 2023-05-24 15:55:23.000000000 -0400
|
||||
+++ ceph-18.1.2/src/rocksdb/util/string_util.h 2023-07-04 19:36:55.991238133 -0400
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "rocksdb/rocksdb_namespace.h"
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
--- ceph-18.0.0-2726-g7cea3740/src/rgw/rgw_amqp.cc.orig 2023-03-14 18:22:35.636864260 -0400
|
||||
+++ ceph-18.0.0-2726-g7cea3740/src/rgw/rgw_amqp.cc 2023-03-14 18:24:36.362756771 -0400
|
||||
@@ -2,10 +2,10 @@
|
||||
// vim: ts=8 sw=2 smarttab ft=cpp
|
||||
|
||||
#include "rgw_amqp.h"
|
||||
-#include <amqp.h>
|
||||
-#include <amqp_ssl_socket.h>
|
||||
-#include <amqp_tcp_socket.h>
|
||||
-#include <amqp_framing.h>
|
||||
+#include <rabbitmq-c/amqp.h>
|
||||
+#include <rabbitmq-c/ssl_socket.h>
|
||||
+#include <rabbitmq-c/tcp_socket.h>
|
||||
+#include <rabbitmq-c/framing.h>
|
||||
#include "include/ceph_assert.h"
|
||||
#include <sstream>
|
||||
#include <cstring>
|
||||
@@ -1,24 +0,0 @@
|
||||
--- ceph-18.0.0-2950-g1c931bc4/cmake/modules/BuildBoost.cmake.orig 2023-04-28 18:30:19.133064577 -0400
|
||||
+++ ceph-18.0.0-2950-g1c931bc4/cmake/modules/BuildBoost.cmake 2023-04-28 18:31:55.290354383 -0400
|
||||
@@ -104,12 +104,21 @@
|
||||
set(user_config ${CMAKE_BINARY_DIR}/user-config.jam)
|
||||
# edit the user-config.jam so b2 will be able to use the specified
|
||||
# toolset and python
|
||||
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
+ file(WRITE ${user_config}
|
||||
+ "using ${toolset}"
|
||||
+ " : "
|
||||
+ " : ${CMAKE_CXX_COMPILER}"
|
||||
+ " : <compileflags>-fPIC <compileflags>-w <compileflags>-fcf-protection <compileflags>-Wno-everything"
|
||||
+ " ;\n")
|
||||
+else()
|
||||
file(WRITE ${user_config}
|
||||
"using ${toolset}"
|
||||
" : "
|
||||
" : ${CMAKE_CXX_COMPILER}"
|
||||
" : <compileflags>-fPIC <compileflags>-w <compileflags>-Wno-everything"
|
||||
" ;\n")
|
||||
+endif()
|
||||
if(with_python_version)
|
||||
find_package(Python3 ${with_python_version} QUIET REQUIRED
|
||||
COMPONENTS Development)
|
||||
@@ -1,61 +0,0 @@
|
||||
--- ceph-17.2.6/src/boost/libs/context/src/asm/make_x86_64_sysv_elf_gas.S.orig 2023-04-30 14:25:35.009605033 -0400
|
||||
+++ ceph-17.2.6/src/boost/libs/context/src/asm/make_x86_64_sysv_elf_gas.S 2023-04-30 14:28:32.239465067 -0400
|
||||
@@ -80,3 +80,18 @@
|
||||
|
||||
/* Mark that we don't need executable stack. */
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
+
|
||||
+.section .note.gnu.property
|
||||
+.align=8
|
||||
+
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x01, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x02, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+
|
||||
--- ceph-17.2.6/src/boost/libs/context/src/asm/jump_x86_64_sysv_elf_gas.S.orig 2023-04-30 14:25:35.008605050 -0400
|
||||
+++ ceph-17.2.6/src/boost/libs/context/src/asm/jump_x86_64_sysv_elf_gas.S 2023-04-30 14:27:50.145210847 -0400
|
||||
@@ -89,3 +89,17 @@
|
||||
|
||||
/* Mark that we don't need executable stack. */
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
+
|
||||
+.section .note.gnu.property
|
||||
+.align=8
|
||||
+
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x01, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x02, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
--- ceph-17.2.6/src/boost/libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S.orig 2023-04-30 14:25:35.009605033 -0400
|
||||
+++ ceph-17.2.6/src/boost/libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S 2023-04-30 14:29:30.402434597 -0400
|
||||
@@ -92,3 +92,17 @@
|
||||
|
||||
/* Mark that we don't need executable stack. */
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
+
|
||||
+.section .note.gnu.property
|
||||
+.align=8
|
||||
+
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x01, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x02, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
@@ -1,24 +0,0 @@
|
||||
--- ceph-18.1.2/src/pybind/rbd/rbd.pyx.orig 2023-07-21 13:30:08.156825317 -0400
|
||||
+++ ceph-18.1.2/src/pybind/rbd/rbd.pyx 2023-07-24 09:09:27.930137117 -0400
|
||||
@@ -371,10 +371,10 @@
|
||||
cdef rados_ioctx_t convert_ioctx(rados.Ioctx ioctx) except? NULL:
|
||||
return <rados_ioctx_t>ioctx.io
|
||||
|
||||
-cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) with gil:
|
||||
+cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) noexcept with gil:
|
||||
return (<object>ptr)(offset, total)
|
||||
|
||||
-cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr):
|
||||
+cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr) noexcept:
|
||||
return 0
|
||||
|
||||
def cstr(val, name, encoding="utf-8", opt=False):
|
||||
@@ -426,7 +426,7 @@
|
||||
|
||||
cdef class Completion
|
||||
|
||||
-cdef void __aio_complete_cb(rbd_completion_t completion, void *args) with gil:
|
||||
+cdef void __aio_complete_cb(rbd_completion_t completion, void *args) noexcept with gil:
|
||||
"""
|
||||
Callback to oncomplete() for asynchronous operations
|
||||
"""
|
||||
@@ -1,18 +0,0 @@
|
||||
--- ceph/src/CMakeLists.txt.orig 2023-11-01 11:53:53.618167190 -0400
|
||||
+++ ceph/src/CMakeLists.txt 2023-11-01 13:52:51.292643490 -0400
|
||||
@@ -625,6 +625,7 @@
|
||||
add_subdirectory(perfglue)
|
||||
|
||||
add_library(rados_snap_set_diff_obj OBJECT librados/snap_set_diff.cc)
|
||||
+add_dependencies(rados_snap_set_diff_obj legacy-option-headers)
|
||||
|
||||
option(WITH_LIBRADOSSTRIPER "build with libradosstriper support" ON)
|
||||
|
||||
@@ -881,6 +882,7 @@
|
||||
add_library(krbd STATIC krbd.cc
|
||||
$<TARGET_OBJECTS:parse_secret_objs>)
|
||||
target_link_libraries(krbd keyutils::keyutils)
|
||||
+ add_dependencies(krbd legacy-option-headers)
|
||||
endif()
|
||||
add_subdirectory(librbd)
|
||||
if(WITH_FUSE)
|
||||
@@ -1,41 +0,0 @@
|
||||
From f5d3e9146d9ceb12858bc94d60090bd851b1c088 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Emerson <aemerson@redhat.com>
|
||||
Date: Wed, 20 Dec 2023 13:51:21 -0500
|
||||
Subject: [PATCH] test/neorados: Use two fewer GTest internals
|
||||
|
||||
To get coroutine tests working, I used some internals. Two of these
|
||||
are no longer available in newer versions. Since they can be
|
||||
implemented with regular old C++ features, use those.
|
||||
|
||||
This fixes an FTBFS on Fedora Rawhide introduced in
|
||||
`35231f7251ed70d8d817ee7e727d9763669d101f`.
|
||||
|
||||
Signed-off-by: Adam Emerson <aemerson@redhat.com>
|
||||
---
|
||||
src/test/neorados/common_tests.h | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/test/neorados/common_tests.h b/src/test/neorados/common_tests.h
|
||||
index 9610f08f643f3..396432e417e84 100644
|
||||
--- a/src/test/neorados/common_tests.h
|
||||
+++ b/src/test/neorados/common_tests.h
|
||||
@@ -391,10 +391,14 @@ class NeoRadosECTest : public NeoRadosTestBase {
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() = default; \
|
||||
~GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() override = default; \
|
||||
- GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
- test_name)); \
|
||||
- GTEST_DISALLOW_MOVE_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
- test_name)); \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)( \
|
||||
+ const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&) = delete; \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)& operator =( \
|
||||
+ const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&) = delete; \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)( \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&&) = delete; \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)& operator =( \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&&) = delete; \
|
||||
\
|
||||
private: \
|
||||
boost::asio::awaitable<void> CoTestBody() override; \
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
--- ceph-18.2.3/src/mgr/PyModule.cc.orig 2024-06-06 16:31:10.340731851 -0400
|
||||
+++ ceph-18.2.3/src/mgr/PyModule.cc 2024-06-07 12:58:49.913571410 -0400
|
||||
@@ -342,6 +342,16 @@
|
||||
return ceph_module;
|
||||
}
|
||||
|
||||
+// FIXME
|
||||
+// Removed in Python 3.13 API, but kept for the stable ABI
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+PyAPI_FUNC(void) PySys_SetPath(const wchar_t *);
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
int PyModule::load(PyThreadState *pMainThreadState)
|
||||
{
|
||||
ceph_assert(pMainThreadState != nullptr);
|
||||
@@ -1,15 +0,0 @@
|
||||
--- ceph-19.1.0/src/common/crc32c_ppc_asm.S.orig 2024-07-10 10:55:06.255480790 -0400
|
||||
+++ ceph-19.1.0/src/common/crc32c_ppc_asm.S 2024-07-10 12:53:42.844075490 -0400
|
||||
@@ -54,11 +54,8 @@
|
||||
/* byte reverse permute constant */
|
||||
.octa 0x0F0E0D0C0B0A09080706050403020100
|
||||
|
||||
-#ifdef CRC32_CONSTANTS_HEADER
|
||||
-#include CRC32_CONSTANTS_HEADER
|
||||
-#else
|
||||
+#define __ASSEMBLY__
|
||||
#include "crc32c_ppc_constants.h"
|
||||
-#endif
|
||||
|
||||
.text
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
--- ceph-19.1.0/src/cpp_redis/CMakeLists.txt.orig 2024-07-11 15:16:22.487082035 -0400
|
||||
+++ ceph-19.1.0/src/cpp_redis/CMakeLists.txt 2024-07-11 15:17:57.226534456 -0400
|
||||
@@ -174,6 +174,7 @@
|
||||
set_target_properties(${PROJECT} PROPERTIES COMPILE_DEFINITIONS "__CPP_REDIS_USE_CUSTOM_TCP_CLIENT=${USE_CUSTOM_TCP_CLIENT}")
|
||||
endif(USE_CUSTOM_TCP_CLIENT)
|
||||
|
||||
+install(TARGETS ${PROJECT} DESTINATION ${CMAKE_INSTALL_LIBDIR}/ceph)
|
||||
|
||||
###
|
||||
# examples
|
||||
--- ceph-19.1.0/src/cpp_redis/tacopie/CMakeLists.txt.orig 2024-01-30 21:47:59.000000000 -0500
|
||||
+++ ceph-19.1.0/src/cpp_redis/tacopie/CMakeLists.txt 2024-07-12 07:37:23.584654640 -0400
|
||||
@@ -162,6 +162,8 @@
|
||||
ENDIF(SELECT_TIMEOUT)
|
||||
|
||||
|
||||
+install(TARGETS ${PROJECT} DESTINATION ${CMAKE_INSTALL_LIBDIR}/ceph)
|
||||
+
|
||||
###
|
||||
# examples
|
||||
###
|
||||
@@ -1,28 +0,0 @@
|
||||
--- ceph-19.1.0/src/common/crc32c_ppc_fast_zero_asm.S.orig 2024-07-26 07:18:50.733484175 -0400
|
||||
+++ ceph-19.1.0/src/common/crc32c_ppc_fast_zero_asm.S 2024-07-26 07:17:48.449531183 -0400
|
||||
@@ -45,8 +45,10 @@
|
||||
|
||||
/* unsigned int barrett_reduction(unsigned long val) */
|
||||
FUNC_START(barrett_reduction)
|
||||
- lis r4,.constants@ha
|
||||
- la r4,.constants@l(r4)
|
||||
+/* lis r4,.constants@ha */
|
||||
+/* la r4,.constants@l(r4) */
|
||||
+ addis r4,r4,.constants@toc@ha
|
||||
+ addi r4,r4,.constants@toc@l
|
||||
|
||||
li r5,16
|
||||
vxor v1,v1,v1 /* zero v1 */
|
||||
@@ -83,8 +85,10 @@
|
||||
|
||||
/* unsigned int barrett_reduction_reflected(unsigned long val) */
|
||||
FUNC_START(barrett_reduction_reflected)
|
||||
- lis r4,.bit_reflected_constants@ha
|
||||
- la r4,.bit_reflected_constants@l(r4)
|
||||
+/* lis r4,.bit_reflected_constants@ha */
|
||||
+/* la r4,.bit_reflected_constants@l(r4) */
|
||||
+ addis r4,r4,.bit_reflected_constants@toc@ha
|
||||
+ addi r4,r4,.bit_reflected_constants@toc@l
|
||||
|
||||
li r5,16
|
||||
vxor v1,v1,v1 /* zero v1 */
|
||||
@@ -1,55 +0,0 @@
|
||||
diff --git a/src/common/openssl_opts_handler.cc b/src/common/openssl_opts_handler.cc
|
||||
index 81d0c4786..d9866f197 100644
|
||||
--- a/src/common/openssl_opts_handler.cc
|
||||
+++ b/src/common/openssl_opts_handler.cc
|
||||
@@ -16,7 +16,10 @@
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/conf.h>
|
||||
+#include <openssl/err.h>
|
||||
+#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
+#endif
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
@@ -116,11 +119,13 @@ void load_module(const string &engine_conf)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
+#ifndef OPENSSL_NO_ENGINE
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
ENGINE_load_builtin_engines();
|
||||
#pragma clang diagnostic pop
|
||||
#pragma GCC diagnostic pop
|
||||
+#endif
|
||||
|
||||
if (CONF_modules_load(
|
||||
conf, nullptr,
|
||||
diff --git a/src/crypto/openssl/openssl_crypto_accel.cc b/src/crypto/openssl/openssl_crypto_accel.cc
|
||||
index f99844a38..4944205dd 100644
|
||||
--- a/src/crypto/openssl/openssl_crypto_accel.cc
|
||||
+++ b/src/crypto/openssl/openssl_crypto_accel.cc
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
#include "crypto/openssl/openssl_crypto_accel.h"
|
||||
#include <openssl/evp.h>
|
||||
-#include <openssl/engine.h>
|
||||
#include "common/debug.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
diff --git a/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/civetweb.c b/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/civetweb.c
|
||||
index fea9e6f98..c7eddb20b 100644
|
||||
--- a/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/civetweb.c
|
||||
+++ b/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/civetweb.c
|
||||
@@ -1744,7 +1744,9 @@ typedef struct SSL_CTX SSL_CTX;
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/dh.h>
|
||||
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
|
||||
#include <openssl/engine.h>
|
||||
+#endif
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/pem.h>
|
||||
@@ -1,16 +0,0 @@
|
||||
--- ceph-19.2.0/src/mds/CMakeLists.txt.orig 2024-12-20 17:15:47.632569537 -0500
|
||||
+++ ceph-19.2.0/src/mds/CMakeLists.txt 2024-12-20 17:16:48.945481957 -0500
|
||||
@@ -45,12 +45,11 @@
|
||||
QuiesceDbManager.cc
|
||||
QuiesceAgent.cc
|
||||
MDSRankQuiesce.cc
|
||||
- BoostUrlImpl.cc
|
||||
${CMAKE_SOURCE_DIR}/src/common/TrackedOp.cc
|
||||
${CMAKE_SOURCE_DIR}/src/common/MemoryModel.cc
|
||||
${CMAKE_SOURCE_DIR}/src/osdc/Journaler.cc
|
||||
${CMAKE_SOURCE_DIR}/src/mgr/MDSPerfMetricTypes.cc)
|
||||
add_library(mds STATIC ${mds_srcs})
|
||||
target_link_libraries(mds PRIVATE
|
||||
- heap_profiler cpu_profiler osdc ${LUA_LIBRARIES})
|
||||
+ boost_url heap_profiler cpu_profiler osdc ${LUA_LIBRARIES})
|
||||
target_include_directories(mds PRIVATE "${LUA_INCLUDE_DIR}")
|
||||
@@ -1,20 +0,0 @@
|
||||
--- ceph-19.2.0/src/rocksdb/db/blob/blob_file_meta.h.orig 2025-01-16 08:16:41.762758595 -0500
|
||||
+++ ceph-19.2.0/src/rocksdb/db/blob/blob_file_meta.h 2025-01-16 08:17:37.172784779 -0500
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "rocksdb/rocksdb_namespace.h"
|
||||
|
||||
--- ceph-19.2.0/src/rocksdb/include/rocksdb/trace_record.h.orig 2025-01-16 09:04:19.196962397 -0500
|
||||
+++ ceph-19.2.0/src/rocksdb/include/rocksdb/trace_record.h 2025-01-16 09:04:33.885701684 -0500
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "rocksdb/rocksdb_namespace.h"
|
||||
#include "rocksdb/slice.h"
|
||||
@@ -1,257 +0,0 @@
|
||||
--- ceph-19.2.0/src/rgw/driver/posix/zpp_bits.h.orig 2024-09-18 12:27:51.000000000 -0400
|
||||
+++ ceph-19.2.0/src/rgw/driver/posix/zpp_bits.h 2025-01-16 14:58:48.471438398 -0500
|
||||
@@ -2687,8 +2687,12 @@
|
||||
{
|
||||
using type = std::remove_cvref_t<decltype(container)>;
|
||||
using value_type = typename type::value_type;
|
||||
- constexpr auto is_const = std::is_const_v<
|
||||
- std::remove_reference_t<decltype(container[0])>>;
|
||||
+ constexpr auto is_const =
|
||||
+ std::is_const_v<std::remove_reference_t<value_type>> ||
|
||||
+ requires {
|
||||
+ requires std::is_const_v<
|
||||
+ std::remove_reference_t<decltype(container[0])>>;
|
||||
+ };
|
||||
|
||||
if constexpr (!std::is_void_v<SizeType> &&
|
||||
(requires(type container) { container.resize(1); } ||
|
||||
@@ -2827,9 +2831,7 @@
|
||||
if constexpr (requires { typename type::mapped_type; }) {
|
||||
using value_type = std::pair<typename type::key_type,
|
||||
typename type::mapped_type>;
|
||||
- std::aligned_storage_t<sizeof(value_type),
|
||||
- alignof(value_type)>
|
||||
- storage;
|
||||
+ alignas(value_type) std::byte storage[sizeof(value_type)];
|
||||
|
||||
auto object = access::placement_new<value_type>(
|
||||
std::addressof(storage));
|
||||
@@ -2843,9 +2845,7 @@
|
||||
} else {
|
||||
using value_type = typename type::value_type;
|
||||
|
||||
- std::aligned_storage_t<sizeof(value_type),
|
||||
- alignof(value_type)>
|
||||
- storage;
|
||||
+ alignas(value_type) std::byte storage[sizeof(value_type)];
|
||||
|
||||
auto object = access::placement_new<value_type>(
|
||||
std::addressof(storage));
|
||||
@@ -2903,8 +2903,7 @@
|
||||
return result;
|
||||
}
|
||||
} else {
|
||||
- std::aligned_storage_t<sizeof(value_type), alignof(value_type)>
|
||||
- storage;
|
||||
+ alignas(value_type) std::byte storage[sizeof(value_type)];
|
||||
|
||||
auto object =
|
||||
access::placement_new<value_type>(std::addressof(storage));
|
||||
@@ -2947,9 +2946,7 @@
|
||||
}
|
||||
return serialize_one(*std::get_if<element_type>(&variant));
|
||||
} else {
|
||||
- std::aligned_storage_t<sizeof(element_type),
|
||||
- alignof(element_type)>
|
||||
- storage;
|
||||
+ alignas(element_type) std::byte storage[sizeof(element_type)];
|
||||
|
||||
auto object = access::placement_new<element_type>(
|
||||
std::addressof(storage));
|
||||
@@ -2996,8 +2993,7 @@
|
||||
return self.serialize_one(
|
||||
*std::get_if<Types>(&variant));
|
||||
} else {
|
||||
- std::aligned_storage_t<sizeof(Types), alignof(Types)>
|
||||
- storage;
|
||||
+ alignas(Types) std::byte storage[sizeof(Types)];
|
||||
|
||||
auto object = access::placement_new<Types>(
|
||||
std::addressof(storage));
|
||||
@@ -3008,6 +3004,7 @@
|
||||
return result;
|
||||
}
|
||||
variant = std::move(*object);
|
||||
+ return errc{};
|
||||
}
|
||||
}...};
|
||||
|
||||
@@ -3307,7 +3304,7 @@
|
||||
ZPP_BITS_INLINE constexpr static auto serialize(auto & serializer,
|
||||
auto & self)
|
||||
{
|
||||
- return serializer.template serialize_one(self.variant, self.id);
|
||||
+ return serializer.serialize_one(self.variant, self.id);
|
||||
}
|
||||
|
||||
Variant & variant;
|
||||
@@ -3448,13 +3445,14 @@
|
||||
}
|
||||
|
||||
constexpr explicit value_or_errc(error_type error) :
|
||||
- m_error(std::forward<decltype(error)>(error))
|
||||
+ m_error(std::forward<decltype(error)>(error)),
|
||||
+ m_failure(true)
|
||||
{
|
||||
}
|
||||
|
||||
constexpr value_or_errc(value_or_errc && other) noexcept
|
||||
{
|
||||
- if (other.is_value()) {
|
||||
+ if (other.success()) {
|
||||
if constexpr (!std::is_void_v<Type>) {
|
||||
if constexpr (!std::is_reference_v<Type>) {
|
||||
::new (std::addressof(m_return_value))
|
||||
@@ -3752,16 +3750,16 @@
|
||||
requires(decltype(in.remaining_data()) & data) {
|
||||
(context.*Function)(data);
|
||||
}) {
|
||||
- struct _
|
||||
+ struct guard
|
||||
{
|
||||
decltype(in) archive;
|
||||
decltype(in.remaining_data()) data;
|
||||
- constexpr ~_()
|
||||
+ constexpr ~guard()
|
||||
{
|
||||
archive.position() += data.size();
|
||||
}
|
||||
- } _{in, in.remaining_data()};
|
||||
- return (context.*Function)(_.data);
|
||||
+ } guard{in, in.remaining_data()};
|
||||
+ return (context.*Function)(guard.data);
|
||||
} else {
|
||||
return (context.*Function)();
|
||||
}
|
||||
@@ -3776,16 +3774,16 @@
|
||||
requires(decltype(in.remaining_data()) & data) {
|
||||
Function(data);
|
||||
}) {
|
||||
- struct _
|
||||
+ struct guard
|
||||
{
|
||||
decltype(in) archive;
|
||||
decltype(in.remaining_data()) data;
|
||||
- constexpr ~_()
|
||||
+ constexpr ~guard()
|
||||
{
|
||||
archive.position() += data.size();
|
||||
}
|
||||
- } _{in, in.remaining_data()};
|
||||
- return Function(_.data);
|
||||
+ } guard{in, in.remaining_data()};
|
||||
+ return Function(guard.data);
|
||||
} else {
|
||||
return Function();
|
||||
}
|
||||
@@ -5029,9 +5027,7 @@
|
||||
serialize use();
|
||||
};
|
||||
|
||||
- std::aligned_storage_t<sizeof(value_type),
|
||||
- alignof(value_type)>
|
||||
- storage;
|
||||
+ alignas(value_type) std::byte storage[sizeof(value_type)];
|
||||
|
||||
auto object =
|
||||
access::placement_new<value_type>(std::addressof(storage));
|
||||
@@ -5111,9 +5107,7 @@
|
||||
return errc{};
|
||||
}
|
||||
} else {
|
||||
- std::aligned_storage_t<sizeof(value_type),
|
||||
- alignof(value_type)>
|
||||
- storage;
|
||||
+ alignas(value_type) std::byte storage[sizeof(value_type)];
|
||||
|
||||
auto object = access::placement_new<value_type>(
|
||||
std::addressof(storage));
|
||||
@@ -5382,47 +5376,47 @@
|
||||
};
|
||||
auto align = [](auto v, auto a) { return (v + (a - 1)) / a * a; };
|
||||
|
||||
- auto h0 = big_endian{0x6a09e667u};
|
||||
- auto h1 = big_endian{0xbb67ae85u};
|
||||
- auto h2 = big_endian{0x3c6ef372u};
|
||||
- auto h3 = big_endian{0xa54ff53au};
|
||||
- auto h4 = big_endian{0x510e527fu};
|
||||
- auto h5 = big_endian{0x9b05688cu};
|
||||
- auto h6 = big_endian{0x1f83d9abu};
|
||||
- auto h7 = big_endian{0x5be0cd19u};
|
||||
-
|
||||
- std::array k{big_endian{0x428a2f98u}, big_endian{0x71374491u},
|
||||
- big_endian{0xb5c0fbcfu}, big_endian{0xe9b5dba5u},
|
||||
- big_endian{0x3956c25bu}, big_endian{0x59f111f1u},
|
||||
- big_endian{0x923f82a4u}, big_endian{0xab1c5ed5u},
|
||||
- big_endian{0xd807aa98u}, big_endian{0x12835b01u},
|
||||
- big_endian{0x243185beu}, big_endian{0x550c7dc3u},
|
||||
- big_endian{0x72be5d74u}, big_endian{0x80deb1feu},
|
||||
- big_endian{0x9bdc06a7u}, big_endian{0xc19bf174u},
|
||||
- big_endian{0xe49b69c1u}, big_endian{0xefbe4786u},
|
||||
- big_endian{0x0fc19dc6u}, big_endian{0x240ca1ccu},
|
||||
- big_endian{0x2de92c6fu}, big_endian{0x4a7484aau},
|
||||
- big_endian{0x5cb0a9dcu}, big_endian{0x76f988dau},
|
||||
- big_endian{0x983e5152u}, big_endian{0xa831c66du},
|
||||
- big_endian{0xb00327c8u}, big_endian{0xbf597fc7u},
|
||||
- big_endian{0xc6e00bf3u}, big_endian{0xd5a79147u},
|
||||
- big_endian{0x06ca6351u}, big_endian{0x14292967u},
|
||||
- big_endian{0x27b70a85u}, big_endian{0x2e1b2138u},
|
||||
- big_endian{0x4d2c6dfcu}, big_endian{0x53380d13u},
|
||||
- big_endian{0x650a7354u}, big_endian{0x766a0abbu},
|
||||
- big_endian{0x81c2c92eu}, big_endian{0x92722c85u},
|
||||
- big_endian{0xa2bfe8a1u}, big_endian{0xa81a664bu},
|
||||
- big_endian{0xc24b8b70u}, big_endian{0xc76c51a3u},
|
||||
- big_endian{0xd192e819u}, big_endian{0xd6990624u},
|
||||
- big_endian{0xf40e3585u}, big_endian{0x106aa070u},
|
||||
- big_endian{0x19a4c116u}, big_endian{0x1e376c08u},
|
||||
- big_endian{0x2748774cu}, big_endian{0x34b0bcb5u},
|
||||
- big_endian{0x391c0cb3u}, big_endian{0x4ed8aa4au},
|
||||
- big_endian{0x5b9cca4fu}, big_endian{0x682e6ff3u},
|
||||
- big_endian{0x748f82eeu}, big_endian{0x78a5636fu},
|
||||
- big_endian{0x84c87814u}, big_endian{0x8cc70208u},
|
||||
- big_endian{0x90befffau}, big_endian{0xa4506cebu},
|
||||
- big_endian{0xbef9a3f7u}, big_endian{0xc67178f2u}};
|
||||
+ auto h0 = big_endian{std::uint32_t{0x6a09e667u}};
|
||||
+ auto h1 = big_endian{std::uint32_t{0xbb67ae85u}};
|
||||
+ auto h2 = big_endian{std::uint32_t{0x3c6ef372u}};
|
||||
+ auto h3 = big_endian{std::uint32_t{0xa54ff53au}};
|
||||
+ auto h4 = big_endian{std::uint32_t{0x510e527fu}};
|
||||
+ auto h5 = big_endian{std::uint32_t{0x9b05688cu}};
|
||||
+ auto h6 = big_endian{std::uint32_t{0x1f83d9abu}};
|
||||
+ auto h7 = big_endian{std::uint32_t{0x5be0cd19u}};
|
||||
+
|
||||
+ std::array k{big_endian{std::uint32_t{0x428a2f98u}}, big_endian{std::uint32_t{0x71374491u}},
|
||||
+ big_endian{std::uint32_t{0xb5c0fbcfu}}, big_endian{std::uint32_t{0xe9b5dba5u}},
|
||||
+ big_endian{std::uint32_t{0x3956c25bu}}, big_endian{std::uint32_t{0x59f111f1u}},
|
||||
+ big_endian{std::uint32_t{0x923f82a4u}}, big_endian{std::uint32_t{0xab1c5ed5u}},
|
||||
+ big_endian{std::uint32_t{0xd807aa98u}}, big_endian{std::uint32_t{0x12835b01u}},
|
||||
+ big_endian{std::uint32_t{0x243185beu}}, big_endian{std::uint32_t{0x550c7dc3u}},
|
||||
+ big_endian{std::uint32_t{0x72be5d74u}}, big_endian{std::uint32_t{0x80deb1feu}},
|
||||
+ big_endian{std::uint32_t{0x9bdc06a7u}}, big_endian{std::uint32_t{0xc19bf174u}},
|
||||
+ big_endian{std::uint32_t{0xe49b69c1u}}, big_endian{std::uint32_t{0xefbe4786u}},
|
||||
+ big_endian{std::uint32_t{0x0fc19dc6u}}, big_endian{std::uint32_t{0x240ca1ccu}},
|
||||
+ big_endian{std::uint32_t{0x2de92c6fu}}, big_endian{std::uint32_t{0x4a7484aau}},
|
||||
+ big_endian{std::uint32_t{0x5cb0a9dcu}}, big_endian{std::uint32_t{0x76f988dau}},
|
||||
+ big_endian{std::uint32_t{0x983e5152u}}, big_endian{std::uint32_t{0xa831c66du}},
|
||||
+ big_endian{std::uint32_t{0xb00327c8u}}, big_endian{std::uint32_t{0xbf597fc7u}},
|
||||
+ big_endian{std::uint32_t{0xc6e00bf3u}}, big_endian{std::uint32_t{0xd5a79147u}},
|
||||
+ big_endian{std::uint32_t{0x06ca6351u}}, big_endian{std::uint32_t{0x14292967u}},
|
||||
+ big_endian{std::uint32_t{0x27b70a85u}}, big_endian{std::uint32_t{0x2e1b2138u}},
|
||||
+ big_endian{std::uint32_t{0x4d2c6dfcu}}, big_endian{std::uint32_t{0x53380d13u}},
|
||||
+ big_endian{std::uint32_t{0x650a7354u}}, big_endian{std::uint32_t{0x766a0abbu}},
|
||||
+ big_endian{std::uint32_t{0x81c2c92eu}}, big_endian{std::uint32_t{0x92722c85u}},
|
||||
+ big_endian{std::uint32_t{0xa2bfe8a1u}}, big_endian{std::uint32_t{0xa81a664bu}},
|
||||
+ big_endian{std::uint32_t{0xc24b8b70u}}, big_endian{std::uint32_t{0xc76c51a3u}},
|
||||
+ big_endian{std::uint32_t{0xd192e819u}}, big_endian{std::uint32_t{0xd6990624u}},
|
||||
+ big_endian{std::uint32_t{0xf40e3585u}}, big_endian{std::uint32_t{0x106aa070u}},
|
||||
+ big_endian{std::uint32_t{0x19a4c116u}}, big_endian{std::uint32_t{0x1e376c08u}},
|
||||
+ big_endian{std::uint32_t{0x2748774cu}}, big_endian{std::uint32_t{0x34b0bcb5u}},
|
||||
+ big_endian{std::uint32_t{0x391c0cb3u}}, big_endian{std::uint32_t{0x4ed8aa4au}},
|
||||
+ big_endian{std::uint32_t{0x5b9cca4fu}}, big_endian{std::uint32_t{0x682e6ff3u}},
|
||||
+ big_endian{std::uint32_t{0x748f82eeu}}, big_endian{std::uint32_t{0x78a5636fu}},
|
||||
+ big_endian{std::uint32_t{0x84c87814u}}, big_endian{std::uint32_t{0x8cc70208u}},
|
||||
+ big_endian{std::uint32_t{0x90befffau}}, big_endian{std::uint32_t{0xa4506cebu}},
|
||||
+ big_endian{std::uint32_t{0xbef9a3f7u}}, big_endian{std::uint32_t{0xc67178f2u}}};
|
||||
|
||||
constexpr auto original_message = to_bytes<Object>();
|
||||
constexpr auto chunk_size = 512 / CHAR_BIT;
|
||||
@@ -1,42 +0,0 @@
|
||||
--- ceph-19.2.0/src/googletest/googletest/CMakeLists.txt.orig 2025-01-23 07:43:33.314970694 -0500
|
||||
+++ ceph-19.2.0/src/googletest/googletest/CMakeLists.txt 2025-01-23 07:44:13.529250429 -0500
|
||||
@@ -63,6 +63,8 @@
|
||||
set_up_hermetic_build()
|
||||
endif()
|
||||
|
||||
+option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
|
||||
+
|
||||
# These commands only run if this is the main project
|
||||
if(CMAKE_PROJECT_NAME STREQUAL "gtest" OR CMAKE_PROJECT_NAME STREQUAL "googletest-distribution")
|
||||
|
||||
@@ -126,9 +128,9 @@
|
||||
# are used for other targets, to ensure that gtest can be compiled by a user
|
||||
# aggressive about warnings.
|
||||
cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
|
||||
-set_target_properties(gtest PROPERTIES VERSION ${GOOGLETEST_VERSION})
|
||||
+#set_target_properties(gtest PROPERTIES VERSION ${GOOGLETEST_VERSION})
|
||||
cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
|
||||
-set_target_properties(gtest_main PROPERTIES VERSION ${GOOGLETEST_VERSION})
|
||||
+#set_target_properties(gtest_main PROPERTIES VERSION ${GOOGLETEST_VERSION})
|
||||
# If the CMake version supports it, attach header directory information
|
||||
# to the targets for when we are part of a parent build (ie being pulled
|
||||
# in via add_subdirectory() rather than being a standalone build).
|
||||
--- ceph-19.2.0/src/googletest/googlemock/CMakeLists.txt.orig 2025-01-23 07:40:52.399853240 -0500
|
||||
+++ ceph-19.2.0/src/googletest/googlemock/CMakeLists.txt 2025-01-23 07:43:18.466236642 -0500
|
||||
@@ -54,6 +54,7 @@
|
||||
# if they are the same (the default).
|
||||
add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/${gtest_dir}")
|
||||
|
||||
+option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
|
||||
|
||||
# These commands only run if this is the main project
|
||||
if(CMAKE_PROJECT_NAME STREQUAL "gmock" OR CMAKE_PROJECT_NAME STREQUAL "googletest-distribution")
|
||||
@@ -100,7 +101,7 @@
|
||||
else()
|
||||
cxx_library(gmock "${cxx_strict}" src/gmock-all.cc)
|
||||
target_link_libraries(gmock PUBLIC gtest)
|
||||
- set_target_properties(gmock PROPERTIES VERSION ${GOOGLETEST_VERSION})
|
||||
+ # set_target_properties(gmock PROPERTIES VERSION ${GOOGLETEST_VERSION})
|
||||
cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc)
|
||||
target_link_libraries(gmock_main PUBLIC gmock)
|
||||
set_target_properties(gmock_main PROPERTIES VERSION ${GOOGLETEST_VERSION})
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ceph-19.2.0/src/tracing/CMakeLists.txt.orig 2025-01-23 17:51:43.874162594 -0500
|
||||
+++ ceph-19.2.0/src/tracing/CMakeLists.txt 2025-01-23 17:54:21.877186735 -0500
|
||||
@@ -6,6 +6,8 @@
|
||||
set(header_dir ${working_dir}/tracing)
|
||||
file(MAKE_DIRECTORY ${header_dir})
|
||||
|
||||
+set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu23")
|
||||
+
|
||||
add_custom_target(tracepoint_libraries)
|
||||
|
||||
file(GLOB tps "*.tp")
|
||||
@@ -1,30 +0,0 @@
|
||||
--- ceph-19.2.0/src/test/neorados/common_tests.h.orig 2024-09-18 12:27:51.000000000 -0400
|
||||
+++ ceph-19.2.0/src/test/neorados/common_tests.h 2025-01-26 19:31:32.545762972 -0500
|
||||
@@ -47,6 +47,18 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#if !defined(GTEST_DISALLOW_COPY_AND_ASSIGN_)
|
||||
+#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
|
||||
+ type(type const&) = delete; \
|
||||
+ type& operator=(type const&) = delete
|
||||
+#endif
|
||||
+
|
||||
+#if !defined(GTEST_DISALLOW_MOVE_AND_ASSIGN_)
|
||||
+#define GTEST_DISALLOW_MOVE_AND_ASSIGN_(type) \
|
||||
+ type(type&&) noexcept = delete; \
|
||||
+ type& operator=(type&&) noexcept = delete
|
||||
+#endif
|
||||
+
|
||||
/// \file test/neorados/common_tests.h
|
||||
///
|
||||
/// \brief Tools for testing neorados code
|
||||
@@ -398,7 +410,7 @@
|
||||
\
|
||||
private: \
|
||||
boost::asio::awaitable<void> CoTestBody() override; \
|
||||
- static ::testing::TestInfo *const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
|
||||
+ static ::testing::TestInfo *const test_info_ __attribute__((unused)); \
|
||||
}; \
|
||||
\
|
||||
::testing::TestInfo *const GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
@@ -1,37 +0,0 @@
|
||||
From 8c78a22d2cf69892570f635735d9735169b64a75 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Sabaini <peter.sabaini@canonical.com>
|
||||
Date: Wed, 11 Sep 2024 16:56:50 +0200
|
||||
Subject: [PATCH] ceph-volume: fix importlib.metadata compat
|
||||
|
||||
The importlib.metadata library removed older shims in releases >5.0.0
|
||||
where EntryPoints objects use .select() instead of dict-like access.
|
||||
|
||||
Fixes: https://tracker.ceph.com/issues/68032
|
||||
|
||||
Signed-off-by: Peter Sabaini <peter.sabaini@canonical.com>
|
||||
---
|
||||
src/ceph-volume/ceph_volume/main.py | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ceph-volume/ceph_volume/main.py b/src/ceph-volume/ceph_volume/main.py
|
||||
index f8eca65ec497c..4f27f429e89e2 100644
|
||||
--- a/src/ceph-volume/ceph_volume/main.py
|
||||
+++ b/src/ceph-volume/ceph_volume/main.py
|
||||
@@ -11,8 +11,16 @@
|
||||
from importlib.metadata import entry_points
|
||||
|
||||
def get_entry_points(group: str): # type: ignore
|
||||
- return entry_points().get(group, []) # type: ignore
|
||||
+ eps = entry_points()
|
||||
+ if hasattr(eps, 'select'):
|
||||
+ # New importlib.metadata uses .select()
|
||||
+ return eps.select(group=group)
|
||||
+ else:
|
||||
+ # Fallback to older EntryPoints that returns dicts
|
||||
+ return eps.get(group, []) # type: ignore
|
||||
+
|
||||
except ImportError:
|
||||
+ # Fallback to `pkg_resources` for older versions
|
||||
from pkg_resources import iter_entry_points as entry_points # type: ignore
|
||||
|
||||
def get_entry_points(group: str): # type: ignore
|
||||
@@ -1,53 +0,0 @@
|
||||
From 5924df771f850c249396a37a62f97ac242bf2f96 Mon Sep 17 00:00:00 2001
|
||||
From: Hector Martin <marcan@marcan.st>
|
||||
Date: Wed, 20 Aug 2025 13:34:08 +0900
|
||||
Subject: [PATCH 1/2] mgr/dashboard: Make saml2 robust against module load
|
||||
errors
|
||||
|
||||
Loading saml2 can fail due to issues with the xmlsec package (possibly
|
||||
subinterpreter related):
|
||||
|
||||
File "/usr/share/ceph/mgr/dashboard/controllers/saml2.py", line 6, in <module>
|
||||
from onelogin.saml2.auth import OneLogin_Saml2_Auth
|
||||
File "/lib/python3.13/site-packages/onelogin/saml2/auth.py", line 12, in <module>
|
||||
import xmlsec
|
||||
xmlsec.Error: (100, 'lxml & xmlsec libxml2 library version mismatch')
|
||||
|
||||
Instead of taking down the entire dashboard module, treat this exception
|
||||
like a missing saml2 package.
|
||||
|
||||
Signed-off-by: Hector Martin <marcan@marcan.st>
|
||||
---
|
||||
src/pybind/mgr/dashboard/controllers/saml2.py | 2 +-
|
||||
src/pybind/mgr/dashboard/services/sso.py | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/controllers/saml2.py b/src/pybind/mgr/dashboard/controllers/saml2.py
|
||||
index c11b18a27bc7..e859f558cdc4 100644
|
||||
--- a/src/pybind/mgr/dashboard/controllers/saml2.py
|
||||
+++ b/src/pybind/mgr/dashboard/controllers/saml2.py
|
||||
@@ -8,7 +8,7 @@ try:
|
||||
from onelogin.saml2.settings import OneLogin_Saml2_Settings
|
||||
|
||||
python_saml_imported = True
|
||||
-except ImportError:
|
||||
+except Exception:
|
||||
python_saml_imported = False
|
||||
|
||||
from .. import mgr
|
||||
diff --git a/src/pybind/mgr/dashboard/services/sso.py b/src/pybind/mgr/dashboard/services/sso.py
|
||||
index 2290e6ea3e15..38910ca4aa34 100644
|
||||
--- a/src/pybind/mgr/dashboard/services/sso.py
|
||||
+++ b/src/pybind/mgr/dashboard/services/sso.py
|
||||
@@ -20,7 +20,7 @@ try:
|
||||
from onelogin.saml2.settings import OneLogin_Saml2_Settings as Saml2Settings
|
||||
|
||||
python_saml_imported = True
|
||||
-except ImportError:
|
||||
+except Exception:
|
||||
python_saml_imported = False
|
||||
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
From 76af91b516bb31ae0a79f55f315bef2c2105a06e Mon Sep 17 00:00:00 2001
|
||||
From: Nizamudeen A <nia@redhat.com>
|
||||
Date: Thu, 26 Jun 2025 12:55:22 +0530
|
||||
Subject: [PATCH 2/2] mgr/dashboard: catch protobuf error due to mismatch in
|
||||
version
|
||||
|
||||
Signed-off-by: Nizamudeen A <nia@redhat.com>
|
||||
(cherry picked from commit acb0f19c4a50b2ea68f328a61a14a2da06be298b)
|
||||
|
||||
Conflicts:
|
||||
src/pybind/mgr/dashboard/services/nvmeof_client.py
|
||||
- only kept relavant portion applicable for squid
|
||||
---
|
||||
src/pybind/mgr/dashboard/services/nvmeof_client.py | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/services/nvmeof_client.py b/src/pybind/mgr/dashboard/services/nvmeof_client.py
|
||||
index e0ea6d1e48b3..be2b5edbaa52 100644
|
||||
--- a/src/pybind/mgr/dashboard/services/nvmeof_client.py
|
||||
+++ b/src/pybind/mgr/dashboard/services/nvmeof_client.py
|
||||
@@ -1,3 +1,5 @@
|
||||
+# pylint: disable=unexpected-keyword-arg
|
||||
+
|
||||
import functools
|
||||
import logging
|
||||
from collections.abc import Iterable
|
||||
@@ -9,6 +11,14 @@ from .nvmeof_conf import NvmeofGatewaysConfig
|
||||
logger = logging.getLogger("nvmeof_client")
|
||||
|
||||
try:
|
||||
+ # if the protobuf version is newer than what we generated with
|
||||
+ # proto file import will fail (because of differences between what's
|
||||
+ # available in centos and ubuntu).
|
||||
+ # this "hack" should be removed once we update both the
|
||||
+ # distros; centos and ubuntu.
|
||||
+ import os
|
||||
+ os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"
|
||||
+
|
||||
import grpc # type: ignore
|
||||
import grpc._channel # type: ignore
|
||||
from google.protobuf.message import Message # type: ignore
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: "Max R. Carrara" <m.carrara@proxmox.com>
|
||||
Date: Wed, 16 Jul 2025 13:14:39 +0200
|
||||
Subject: [PATCH 58/59] pybind/mgr/restful: provide workaround for PyO3
|
||||
ImportError
|
||||
|
||||
Move the self-signed cert generation into a separate module
|
||||
inside python-common/ceph and run the module in a separate Python
|
||||
process.
|
||||
|
||||
This provides a workaround for the ImportError thrown by PyO3 when
|
||||
the `restful` module is loaded in the context of multiple Python
|
||||
sub-interpreters being present. In particular, the ImportError is
|
||||
thrown by the `crypto` module of the `OpenSSL` package.
|
||||
|
||||
Inspired by an upstream PR [0].
|
||||
|
||||
[0]: https://github.com/ceph/ceph/pull/62951
|
||||
|
||||
Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
|
||||
---
|
||||
src/pybind/mgr/restful/module.py | 24 +++------
|
||||
src/python-common/ceph/_crypto_wrap.py | 69 ++++++++++++++++++++++++++
|
||||
2 files changed, 76 insertions(+), 17 deletions(-)
|
||||
create mode 100644 src/python-common/ceph/_crypto_wrap.py
|
||||
|
||||
diff --git a/src/pybind/mgr/restful/module.py b/src/pybind/mgr/restful/module.py
|
||||
index 0f8c78e0bd8..7f93c41f1e6 100644
|
||||
--- a/src/pybind/mgr/restful/module.py
|
||||
+++ b/src/pybind/mgr/restful/module.py
|
||||
@@ -7,6 +7,7 @@ import json
|
||||
import time
|
||||
import errno
|
||||
import inspect
|
||||
+import subprocess
|
||||
import tempfile
|
||||
import threading
|
||||
import traceback
|
||||
@@ -19,7 +20,6 @@ from . import context
|
||||
|
||||
from uuid import uuid4
|
||||
from pecan import jsonify, make_app
|
||||
-from OpenSSL import crypto
|
||||
from pecan.rest import RestController
|
||||
from werkzeug.serving import make_server, make_ssl_devcert
|
||||
|
||||
@@ -401,24 +401,14 @@ class Module(MgrModule):
|
||||
|
||||
|
||||
def create_self_signed_cert(self):
|
||||
- # create a key pair
|
||||
- pkey = crypto.PKey()
|
||||
- pkey.generate_key(crypto.TYPE_RSA, 2048)
|
||||
-
|
||||
- # create a self-signed cert
|
||||
- cert = crypto.X509()
|
||||
- cert.get_subject().O = "IT"
|
||||
- cert.get_subject().CN = "ceph-restful"
|
||||
- cert.set_serial_number(int(uuid4()))
|
||||
- cert.gmtime_adj_notBefore(0)
|
||||
- cert.gmtime_adj_notAfter(10*365*24*60*60)
|
||||
- cert.set_issuer(cert.get_subject())
|
||||
- cert.set_pubkey(pkey)
|
||||
- cert.sign(pkey, 'sha512')
|
||||
+ cmd = ["python3", "-m", "ceph._crypto_wrap", "create_self_signed_cert"]
|
||||
+
|
||||
+ response = subprocess.run(cmd, capture_output=True, check=True)
|
||||
+ response_obj = json.loads(response.stdout)
|
||||
|
||||
return (
|
||||
- crypto.dump_certificate(crypto.FILETYPE_PEM, cert),
|
||||
- crypto.dump_privatekey(crypto.FILETYPE_PEM, pkey)
|
||||
+ response_obj["cert"].encode("utf-8"),
|
||||
+ response_obj["key"].encode("utf-8"),
|
||||
)
|
||||
|
||||
|
||||
diff --git a/src/python-common/ceph/_crypto_wrap.py b/src/python-common/ceph/_crypto_wrap.py
|
||||
new file mode 100644
|
||||
index 00000000000..16a19a5345e
|
||||
--- /dev/null
|
||||
+++ b/src/python-common/ceph/_crypto_wrap.py
|
||||
@@ -0,0 +1,69 @@
|
||||
+"""CLI wrapper for cryptographic functions of the :mod:`restful` module.
|
||||
+
|
||||
+To be called via :func:`subprocess.run()` as a workaround for
|
||||
+:class:`ImportError`s related to PyO3's current lack of sub-interpreter
|
||||
+support.
|
||||
+
|
||||
+Note:
|
||||
+ Since this module is installed as part of the ``ceph`` package,
|
||||
+ it should be called like so::
|
||||
+
|
||||
+ python3 -m ceph._crypto_wrap create_self_signed_cert
|
||||
+"""
|
||||
+
|
||||
+import argparse
|
||||
+import sys
|
||||
+import json
|
||||
+
|
||||
+from argparse import Namespace
|
||||
+from typing import Any
|
||||
+from uuid import uuid4
|
||||
+
|
||||
+from OpenSSL import crypto
|
||||
+
|
||||
+
|
||||
+def _respond(data: dict[str, Any]) -> None:
|
||||
+ json.dump(data, sys.stdout)
|
||||
+ sys.stdout.flush()
|
||||
+
|
||||
+
|
||||
+def create_self_signed_cert(args: Namespace) -> None:
|
||||
+ cert_key_pair = _create_self_signed_cert()
|
||||
+ _respond(cert_key_pair)
|
||||
+
|
||||
+
|
||||
+def _create_self_signed_cert() -> dict[str, str]:
|
||||
+ # create a key pair
|
||||
+ pubkey = crypto.PKey()
|
||||
+ pubkey.generate_key(crypto.TYPE_RSA, 2048)
|
||||
+
|
||||
+ # create a self-signed cert
|
||||
+ cert = crypto.X509()
|
||||
+ cert.get_subject().O = "IT"
|
||||
+ cert.get_subject().CN = "ceph-restful"
|
||||
+ cert.set_serial_number(int(uuid4()))
|
||||
+ cert.gmtime_adj_notBefore(0)
|
||||
+ cert.gmtime_adj_notAfter(10 * 365 * 24 * 60 * 60)
|
||||
+ cert.set_issuer(cert.get_subject())
|
||||
+ cert.set_pubkey(pubkey)
|
||||
+ cert.sign(pubkey, "sha512")
|
||||
+
|
||||
+ return {
|
||||
+ "cert": crypto.dump_certificate(crypto.FILETYPE_PEM, cert).decode(),
|
||||
+ "key": crypto.dump_privatekey(crypto.FILETYPE_PEM, pubkey).decode(),
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+def main() -> None:
|
||||
+ parser = argparse.ArgumentParser(prog="_crypto_wrap.py")
|
||||
+ subparsers = parser.add_subparsers(required=True)
|
||||
+
|
||||
+ parser_cssc = subparsers.add_parser("create_self_signed_cert")
|
||||
+ parser_cssc.set_defaults(func=create_self_signed_cert)
|
||||
+
|
||||
+ args = parser.parse_args()
|
||||
+ args.func(args)
|
||||
+
|
||||
+
|
||||
+if __name__ == "__main__":
|
||||
+ main()
|
||||
@@ -1,56 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: "Max R. Carrara" <m.carrara@proxmox.com>
|
||||
Date: Wed, 16 Jul 2025 16:31:43 +0200
|
||||
Subject: [PATCH 59/59] mgr: fix module import by making NOTIFY_TYPES in py
|
||||
modules optional
|
||||
|
||||
If NOTIFY_TYPES isn't an attribute of the passed class, the Python
|
||||
(sub-)interpreter raises an AttributeError that must be handled or cleared
|
||||
explicitly via the Python C-API. Unfortunately, this isn't done here,
|
||||
which means that the exception sticks around until handled.
|
||||
|
||||
This caused a call to PyModule::load_subclass_of() to fail and
|
||||
incorrectly report the AttributeError as cause.
|
||||
|
||||
Checking whether the class has NOTIFY_TYPES as attribute in the first
|
||||
place fixes this.
|
||||
|
||||
Note that there's an upstream PR [0] that wasn't backported that aimed
|
||||
to fix this, but does so incorrectly, as the exception is still not
|
||||
cleared there. The warnings regarding NOTIFY_TYPES missing also occurs
|
||||
on Reef but doesn't cause any module imports to fail there. As the
|
||||
affected Ceph code has stayed mostly the same between bookworm and
|
||||
trixie releases, this suggests that some behavior between Python 3.11
|
||||
and 3.13 likely changed.
|
||||
|
||||
Either way, avoiding the AttributeError altogether fixes this.
|
||||
|
||||
[0]: https://github.com/ceph/ceph/pull/57106
|
||||
|
||||
Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
|
||||
---
|
||||
src/mgr/PyModule.cc | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/mgr/PyModule.cc b/src/mgr/PyModule.cc
|
||||
index 084cf3ffc1e..e6fd269dca5 100644
|
||||
--- a/src/mgr/PyModule.cc
|
||||
+++ b/src/mgr/PyModule.cc
|
||||
@@ -513,11 +513,13 @@ int PyModule::register_options(PyObject *cls)
|
||||
|
||||
int PyModule::load_notify_types()
|
||||
{
|
||||
- PyObject *ls = PyObject_GetAttrString(pClass, "NOTIFY_TYPES");
|
||||
- if (ls == nullptr) {
|
||||
- derr << "Module " << get_name() << " has missing NOTIFY_TYPES member" << dendl;
|
||||
- return -EINVAL;
|
||||
+ if (!PyObject_HasAttrString(pClass, "NOTIFY_TYPES")) {
|
||||
+ dout(10) << "Module " << get_name() << " has no NOTIFY_TYPES member" << dendl;
|
||||
+ return 0;
|
||||
}
|
||||
+
|
||||
+ PyObject *ls = PyObject_GetAttrString(pClass, "NOTIFY_TYPES");
|
||||
+
|
||||
if (!PyObject_TypeCheck(ls, &PyList_Type)) {
|
||||
// Relatively easy mistake for human to make, e.g. defining COMMANDS
|
||||
// as a {} instead of a []
|
||||
@@ -1 +1 @@
|
||||
SHA512 (ceph-19.2.3.tar.gz) = 278101d2df7bed5363b20c2b065d7a7b26252c8164511257e213ffaa58d509015558183de10bc9281bcbe4d9f85244bcac5bba4db9823e28df6a96d0b687d00a
|
||||
SHA512 (ceph-12.2.12.tar.gz) = e694c9a8c1f9836c08fb74b54423bdc16d4900252e34643c56cf1a615d4dacddfb13df06a6a9f68bb9d438f5f07069ed358f9fa4b5a362640a3046f9c7722dcc
|
||||
|
||||
Reference in New Issue
Block a user