mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
community/ceph: v7 fix
This commit is contained in:
parent
db28e5985c
commit
6681b1c0a3
2 changed files with 169 additions and 4 deletions
158
community/ceph/0001-Fix-building-on-32-bit-ARM.diff
Normal file
158
community/ceph/0001-Fix-building-on-32-bit-ARM.diff
Normal file
|
@ -0,0 +1,158 @@
|
|||
From d04bf15ce582037c8b256711c697238bbdb4c031 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Thu, 5 Jul 2018 09:54:41 -0600
|
||||
Subject: [PATCH] Fix building on 32-bit ARM
|
||||
|
||||
---
|
||||
src/common/ceph_context.h | 2 +-
|
||||
src/mon/OSDMonitor.cc | 4 ++--
|
||||
src/os/bluestore/BlueStore.cc | 2 +-
|
||||
src/osd/PrimaryLogPG.cc | 4 ++--
|
||||
src/rgw/rgw_op.h | 4 ++--
|
||||
src/rgw/rgw_rest_swift.cc | 6 +++---
|
||||
src/rgw/rgw_sync_log_trim.cc | 4 ++--
|
||||
src/test/rbd_mirror/test_ImageSync.cc | 2 +-
|
||||
8 files changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/common/ceph_context.h b/src/common/ceph_context.h
|
||||
index 6af282225c..cda1b002a2 100644
|
||||
--- a/src/common/ceph_context.h
|
||||
+++ b/src/common/ceph_context.h
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
void do_command(std::string_view command, const cmdmap_t& cmdmap,
|
||||
std::string_view format, ceph::bufferlist *out);
|
||||
|
||||
- static constexpr std::size_t largest_singleton = sizeof(void*) * 72;
|
||||
+ static constexpr std::size_t largest_singleton = sizeof(void*) * 128;
|
||||
|
||||
template<typename T, typename... Args>
|
||||
T& lookup_or_create_singleton_object(std::string_view name,
|
||||
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
|
||||
index 244c8dbf1b..3e96017289 100644
|
||||
--- a/src/mon/OSDMonitor.cc
|
||||
+++ b/src/mon/OSDMonitor.cc
|
||||
@@ -738,8 +738,8 @@ OSDMonitor::update_pending_pgs(const OSDMap::Incremental& inc,
|
||||
<< " modified " << p->second.modified
|
||||
<< " [" << p->second.start << "-" << p->second.end << ")"
|
||||
<< dendl;
|
||||
- int n = std::min(max - pending_creatings.pgs.size(),
|
||||
- p->second.end - p->second.start);
|
||||
+ int n = std::min((long)(max - pending_creatings.pgs.size()),
|
||||
+ (long)(p->second.end - p->second.start));
|
||||
ps_t first = p->second.start;
|
||||
ps_t end = first + n;
|
||||
for (ps_t ps = first; ps < end; ++ps) {
|
||||
diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc
|
||||
index 17e485a131..2903881156 100644
|
||||
--- a/src/os/bluestore/BlueStore.cc
|
||||
+++ b/src/os/bluestore/BlueStore.cc
|
||||
@@ -12225,7 +12225,7 @@ size_t BlueStoreRepairer::StoreSpaceTracker::filter_out(
|
||||
if (e.second == 0) {
|
||||
continue;
|
||||
}
|
||||
- size_t pos = max(e.first / granularity, prev_pos);
|
||||
+ size_t pos = max((long)(e.first / granularity), (long)prev_pos);
|
||||
size_t end_pos = 1 + (e.first + e.second - 1) / granularity;
|
||||
while (pos != npos && pos < end_pos) {
|
||||
assert( collections_bfs[pos].element_count() ==
|
||||
diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc
|
||||
index 848b2dd12b..65e75ef8d6 100644
|
||||
--- a/src/osd/PrimaryLogPG.cc
|
||||
+++ b/src/osd/PrimaryLogPG.cc
|
||||
@@ -1628,8 +1628,8 @@ void PrimaryLogPG::calc_trim_to()
|
||||
if (limit != eversion_t() &&
|
||||
limit != pg_trim_to &&
|
||||
pg_log.get_log().approx_size() > target) {
|
||||
- size_t num_to_trim = std::min(pg_log.get_log().approx_size() - target,
|
||||
- cct->_conf->osd_pg_log_trim_max);
|
||||
+ size_t num_to_trim = std::min((long)(pg_log.get_log().approx_size() - target),
|
||||
+ (long)(cct->_conf->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;
|
||||
diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h
|
||||
index da638eb4c0..07ab0a119d 100644
|
||||
--- a/src/rgw/rgw_op.h
|
||||
+++ b/src/rgw/rgw_op.h
|
||||
@@ -1974,7 +1974,7 @@ static inline int rgw_get_request_metadata(CephContext* const cct,
|
||||
* as ObjectStore::get_max_attr_name_length() can set the limit even
|
||||
* lower than the "osd_max_attr_name_len" configurable. */
|
||||
const size_t max_attr_name_len = \
|
||||
- cct->_conf->get_val<size_t>("rgw_max_attr_name_len");
|
||||
+ cct->_conf->get_val<Option::size_t>("rgw_max_attr_name_len");
|
||||
if (max_attr_name_len && attr_name.length() > max_attr_name_len) {
|
||||
return -ENAMETOOLONG;
|
||||
}
|
||||
@@ -1990,7 +1990,7 @@ static inline int rgw_get_request_metadata(CephContext* const cct,
|
||||
/* Swift allows administrators to limit the number of metadats items
|
||||
* send _in a single request_. */
|
||||
const auto rgw_max_attrs_num_in_req = \
|
||||
- cct->_conf->get_val<size_t>("rgw_max_attrs_num_in_req");
|
||||
+ cct->_conf->get_val<Option::size_t>("rgw_max_attrs_num_in_req");
|
||||
if (rgw_max_attrs_num_in_req &&
|
||||
++valid_meta_count > rgw_max_attrs_num_in_req) {
|
||||
return -E2BIG;
|
||||
diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc
|
||||
index ebf2803b62..70cef69f5c 100644
|
||||
--- a/src/rgw/rgw_rest_swift.cc
|
||||
+++ b/src/rgw/rgw_rest_swift.cc
|
||||
@@ -724,7 +724,7 @@ static inline int handle_metadata_errors(req_state* const s, const int op_ret)
|
||||
} else if (op_ret == -E2BIG) {
|
||||
const auto error_message = boost::str(
|
||||
boost::format("Too many metadata items; max %lld")
|
||||
- % s->cct->_conf->get_val<size_t>("rgw_max_attrs_num_in_req"));
|
||||
+ % s->cct->_conf->get_val<Option::size_t>("rgw_max_attrs_num_in_req"));
|
||||
set_req_state_err(s, EINVAL, error_message);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1779,7 +1779,7 @@ void RGWInfo_ObjStore_SWIFT::list_swift_data(Formatter& formatter,
|
||||
formatter.dump_string("version", ceph_version);
|
||||
|
||||
const size_t max_attr_name_len = \
|
||||
- g_conf->get_val<size_t>("rgw_max_attr_name_len");
|
||||
+ g_conf->get_val<Option::size_t>("rgw_max_attr_name_len");
|
||||
if (max_attr_name_len) {
|
||||
const size_t meta_name_limit = \
|
||||
max_attr_name_len - strlen(RGW_ATTR_PREFIX RGW_AMZ_META_PREFIX);
|
||||
@@ -1792,7 +1792,7 @@ void RGWInfo_ObjStore_SWIFT::list_swift_data(Formatter& formatter,
|
||||
}
|
||||
|
||||
const size_t meta_num_limit = \
|
||||
- g_conf->get_val<size_t>("rgw_max_attrs_num_in_req");
|
||||
+ g_conf->get_val<Option::size_t>("rgw_max_attrs_num_in_req");
|
||||
if (meta_num_limit) {
|
||||
formatter.dump_int("max_meta_count", meta_num_limit);
|
||||
}
|
||||
diff --git a/src/rgw/rgw_sync_log_trim.cc b/src/rgw/rgw_sync_log_trim.cc
|
||||
index e1002253b8..b5dc6aa899 100644
|
||||
--- a/src/rgw/rgw_sync_log_trim.cc
|
||||
+++ b/src/rgw/rgw_sync_log_trim.cc
|
||||
@@ -351,10 +351,10 @@ int take_min_status(CephContext *cct, Iter first, Iter last,
|
||||
status->clear();
|
||||
// The initialisation below is required to silence a false positive
|
||||
// -Wmaybe-uninitialized warning
|
||||
- boost::optional<size_t> num_shards = boost::make_optional(false, 0UL);
|
||||
+ boost::optional<size_t> num_shards = boost::none;
|
||||
for (auto peer = first; peer != last; ++peer) {
|
||||
const size_t peer_shards = peer->size();
|
||||
- if (!num_shards) {
|
||||
+ if (num_shards == boost::none) {
|
||||
num_shards = peer_shards;
|
||||
status->resize(*num_shards);
|
||||
} else if (*num_shards != peer_shards) {
|
||||
diff --git a/src/test/rbd_mirror/test_ImageSync.cc b/src/test/rbd_mirror/test_ImageSync.cc
|
||||
index 5ef2cbe77a..814c73b8ca 100644
|
||||
--- a/src/test/rbd_mirror/test_ImageSync.cc
|
||||
+++ b/src/test/rbd_mirror/test_ImageSync.cc
|
||||
@@ -41,7 +41,7 @@ int flush(librbd::ImageCtx *image_ctx) {
|
||||
|
||||
void scribble(librbd::ImageCtx *image_ctx, int num_ops, size_t max_size)
|
||||
{
|
||||
- max_size = std::min(image_ctx->size, max_size);
|
||||
+ max_size = std::min((long)image_ctx->size, (long)max_size);
|
||||
for (int i=0; i<num_ops; i++) {
|
||||
uint64_t off = rand() % (image_ctx->size - max_size + 1);
|
||||
uint64_t len = 1 + rand() % max_size;
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -3,10 +3,12 @@
|
|||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - patch to remove neon detection in cmake
|
||||
# - make -j3, RAM constraints
|
||||
# - make -j1 on ARMv7, RAM constraints
|
||||
# - upstream commit to fix building on ARM
|
||||
# - patch to fix building on 32-bit ARM
|
||||
|
||||
highmem=1
|
||||
buildarch=12
|
||||
|
||||
pkgbase='ceph'
|
||||
pkgname=('ceph' 'ceph-libs')
|
||||
|
@ -35,7 +37,8 @@ source=("https://download.ceph.com/tarballs/${pkgbase}-${pkgver}.tar.gz"
|
|||
'fix-ceph_disk-python-interpreter.patch'
|
||||
'fix-or-disable-broken-tests.patch'
|
||||
'fix-python2-paths.patch'
|
||||
'remove-distro-version-detection.patch')
|
||||
'remove-distro-version-detection.patch'
|
||||
'0001-Fix-building-on-32-bit-ARM.diff')
|
||||
sha512sums=('2524ad5a868024463e1a1edc5bd9c3f7bc1f58e47bf8d331902ed53206120abc6a427dd9c1d657131e67efd955d6ed8052b6c3fed8658aa905d58ac58ee62973'
|
||||
'4354001c1abd9a0c385ba7bd529e3638fb6660b6a88d4e49706d4ac21c81b8e829303a20fb5445730bdac18c4865efb10bc809c1cd56d743c12aa9a52e160049'
|
||||
'5b813e2532d5e497d44a41c57493fb4eacecd46cac56ad49815b9f5db798ddcb4fdeb6574e86b1b45fef526feef156d9262a98bb73cdf89c9960222f66ca6d55'
|
||||
|
@ -44,7 +47,8 @@ sha512sums=('2524ad5a868024463e1a1edc5bd9c3f7bc1f58e47bf8d331902ed53206120abc6a4
|
|||
'7abd94a333fb0d6c9f7156d69ed6d4bf123f0f3030407f4347209d677b282e5023664d43e74a21a27b7856d3493ae469a17ea8a810331c7266018cc34eee4841'
|
||||
'915bb02b91a2e7c6e21243e5d4d80847aedaf6f899e3bac55f4ccae4bb8386c434aad7f052dd449fd510c103f7796bd0a25c0cfac72ee8d1e94d230cf2f0550a'
|
||||
'b8ce48ab190b2408f38a7e78d755d762994d271f7bbf88f51392572d1976c4f81e8fad78eb38051df8ef287d70554214624c7b45359d4bef2c11d9ae7d61151c'
|
||||
'02c9e8fd3c23fb4c9c4c576ee6d06e8525ca31decfd964fb7231e73c98fe2987a483dda680969752186f0918f47d9af4fb09a4901e5319077f45d870906716da')
|
||||
'02c9e8fd3c23fb4c9c4c576ee6d06e8525ca31decfd964fb7231e73c98fe2987a483dda680969752186f0918f47d9af4fb09a4901e5319077f45d870906716da'
|
||||
'691184735728d95628df627d924d0290131a528ebf03f9682698115805e7ce49500e90f32c376cc26da19db3f5ff3d49c31ef42020ed9cc127f6ac301183de71')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgbase}-${pkgver}"
|
||||
|
@ -57,6 +61,9 @@ prepare() {
|
|||
fi
|
||||
done
|
||||
|
||||
# Fix building on 32-bit ARM
|
||||
[[ $CARCH == "armv7h" ]] && patch -p1 -i ../0001-Fix-building-on-32-bit-ARM.diff && MAKEFLAGS="-j1"
|
||||
|
||||
# remove tests that require root privileges
|
||||
rm src/test/cli/ceph-authtool/cap*.t
|
||||
|
||||
|
@ -117,7 +124,7 @@ build() {
|
|||
-DWITH_MGR_DASHBOARD_FRONTEND=OFF \
|
||||
..
|
||||
|
||||
make -j3 all
|
||||
make all
|
||||
}
|
||||
|
||||
check() {
|
||||
|
|
Loading…
Reference in a new issue