aboutsummaryrefslogtreecommitdiffstats
path: root/community/ceph
diff options
context:
space:
mode:
Diffstat (limited to 'community/ceph')
-rw-r--r--community/ceph/10-musl-fixes.patch1
-rw-r--r--community/ceph/20-pci.patch2
-rw-r--r--community/ceph/30-32bit_fix.patch.noauto69
-rw-r--r--community/ceph/30-cypress.patch.noauto (renamed from community/ceph/32-cypress.patch.noauto)4
-rw-r--r--community/ceph/30-ubuntu-32bit-fixes.patch.noauto137
-rw-r--r--community/ceph/32-PurgeQueue.cc-cast.patch85
-rw-r--r--community/ceph/32-upstream32bit.patch92
-rw-r--r--community/ceph/32-upstream32bitcleanup.patch143
-rw-r--r--community/ceph/35-fix_ErasureCodeShec.patch2
-rw-r--r--community/ceph/37-fix_tests.patch3
-rw-r--r--community/ceph/42-no-virtualenvs.patch5
-rw-r--r--community/ceph/44-cmake-buildtype.patch36
-rw-r--r--community/ceph/44-missing-include.patch24
-rw-r--r--community/ceph/44-missing-include2.patch117
-rw-r--r--community/ceph/44-node_modules.patch19
-rw-r--r--community/ceph/APKBUILD246
-rw-r--r--community/ceph/ceph-mgr-node.post-deinstall4
-rw-r--r--community/ceph/ceph-mgr-node.post-install5
18 files changed, 783 insertions, 211 deletions
diff --git a/community/ceph/10-musl-fixes.patch b/community/ceph/10-musl-fixes.patch
index 183097514b..1b7c9079c1 100644
--- a/community/ceph/10-musl-fixes.patch
+++ b/community/ceph/10-musl-fixes.patch
@@ -1,3 +1,4 @@
+fix for musl
diff -Nurp a/src/tools/rbd_nbd/rbd-nbd.cc b/src/tools/rbd_nbd/rbd-nbd.cc
--- a/src/tools/rbd_nbd/rbd-nbd.cc 2020-11-21 08:06:35.834423310 +0000
diff --git a/community/ceph/20-pci.patch b/community/ceph/20-pci.patch
index ded258677a..c16e27699e 100644
--- a/community/ceph/20-pci.patch
+++ b/community/ceph/20-pci.patch
@@ -1,3 +1,5 @@
+Musl patch for pci
+
diff -Nurp a/src/spdk/dpdk/drivers/bus/pci/linux/pci_uio.c b/src/spdk/dpdk/drivers/bus/pci/linux/pci_uio.c
--- a/src/spdk/dpdk/drivers/bus/pci/linux/pci_uio.c 2020-11-21 13:07:44.255206657 +0000
+++ b/src/spdk/dpdk/drivers/bus/pci/linux/pci_uio.c 2020-11-21 13:04:06.488285583 +0000
diff --git a/community/ceph/30-32bit_fix.patch.noauto b/community/ceph/30-32bit_fix.patch.noauto
index ece67f1d55..aba21d6400 100644
--- a/community/ceph/30-32bit_fix.patch.noauto
+++ b/community/ceph/30-32bit_fix.patch.noauto
@@ -1,3 +1,5 @@
+32bit specific patches
+
diff -uNr ceph-15.2.4/src/client/Client.cc ceph-15.2.4-arm32_fix/src/client/Client.cc
--- ceph-15.2.4/src/client/Client.cc 2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-arm32_fix/src/client/Client.cc 2020-11-21 22:11:16.061796876 +1030
@@ -75,48 +77,6 @@ diff -uNr ceph-15.2.4/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.c
bufferlist out_bl;
encode(images, out_bl);
-diff -uNr ceph-15.2.4/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc ceph-15.2.4-arm32_fix/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
---- ceph-15.2.4/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc 2020-07-01 01:10:51.000000000 +0930
-+++ ceph-15.2.4-arm32_fix/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc 2020-11-21 22:11:16.066796893 +1030
-@@ -234,7 +234,7 @@
-
- json_spirit::mObject root_obj;
- root_obj["replay_state"] = replay_state;
-- root_obj["remote_snapshot_timestamp"] = remote_snap_info->timestamp.sec();
-+ root_obj["remote_snapshot_timestamp"] = (uint64_t) remote_snap_info->timestamp.sec();
-
- auto matching_remote_snap_id = util::compute_remote_snap_id(
- m_state_builder->local_image_ctx->image_lock,
-@@ -249,7 +249,7 @@
- // the local snapshot would just be the time the snapshot was
- // synced and not the consistency point in time.
- root_obj["local_snapshot_timestamp"] =
-- matching_remote_snap_it->second.timestamp.sec();
-+ (uint64_t) matching_remote_snap_it->second.timestamp.sec();
- }
-
- matching_remote_snap_it = m_state_builder->remote_image_ctx->snap_info.find(
-@@ -257,7 +257,7 @@
- if (m_remote_snap_id_end != CEPH_NOSNAP &&
- matching_remote_snap_it !=
- m_state_builder->remote_image_ctx->snap_info.end()) {
-- root_obj["syncing_snapshot_timestamp"] = remote_snap_info->timestamp.sec();
-+ root_obj["syncing_snapshot_timestamp"] = (uint64_t) remote_snap_info->timestamp.sec();
- root_obj["syncing_percent"] = static_cast<uint64_t>(
- 100 * m_local_mirror_snap_ns.last_copied_object_number /
- static_cast<float>(std::max<uint64_t>(1U, m_local_object_count)));
-diff -Nurp a/src/librbd/object_map/DiffRequest.cc b/src/librbd/object_map/DiffRequest.cc
---- a/src/librbd/object_map/DiffRequest.cc
-+++ b/src/librbd/object_map/DiffRequest.cc
-@@ -187,7 +187,7 @@
- m_object_map.resize(m_object_diff_state->size());
- }
-
-- uint64_t overlap = std::min(m_object_map.size(), prev_object_diff_state_size);
-+ uint64_t overlap = std::min((size_t)m_object_map.size(), prev_object_diff_state_size);
- auto it = m_object_map.begin();
- auto overlap_end_it = it + overlap;
- auto diff_it = m_object_diff_state->begin();
diff -Nurp a/src/client/Client.h b/src/client/Client.h
--- a/src/client/Client.h
+++ b/src/client/Client.h
@@ -147,29 +107,4 @@ diff -Nurp a/src/client/Client.h b/src/client/Client.h
void collect_and_send_metrics();
void collect_and_send_global_metrics();
---- a/src/common/cmdparse.h
-+++ b/src/common/cmdparse.h
-@@ -14,10 +14,10 @@
-
- typedef boost::variant<std::string,
- bool,
-- int64_t,
-+ size_t,
- double,
- std::vector<std::string>,
-- std::vector<int64_t>,
-+ std::vector<size_t>,
- std::vector<double>> cmd_vartype;
- typedef std::map<std::string, cmd_vartype, std::less<>> cmdmap_t;
---- a/src/s3select/include/s3select_functions.h
-+++ b/src/s3select/include/s3select_functions.h
-@@ -585,7 +585,7 @@
- {
- boost::gregorian::date_period dp =
- boost::gregorian::date_period( val_dt1.timestamp()->date(), val_dt2.timestamp()->date());
-- result->set_value( dp.length().days() );
-+ result->set_value( (int64_t)dp.length().days() );
- }
- else if (strcmp(val_date_part.str(), "hours") == 0)
- {
diff --git a/community/ceph/32-cypress.patch.noauto b/community/ceph/30-cypress.patch.noauto
index 2a28bdcb41..fecf055915 100644
--- a/community/ceph/32-cypress.patch.noauto
+++ b/community/ceph/30-cypress.patch.noauto
@@ -1,10 +1,12 @@
+remove cypress as not availiable on 32bit platforms
+
diff -Nurp a/src/pybind/mgr/dashboard/frontend/package.json b/src/pybind/mgr/dashboard/frontend/package.json
--- a/src/pybind/mgr/dashboard/frontend/package.json 2021-04-03 08:58:07.611941559 +0100
+++ b/src/pybind/mgr/dashboard/frontend/package.json 2021-04-03 08:59:13.903122038 +0100
@@ -119,8 +119,6 @@
+ "@types/node": "12.12.62",
"@types/simplebar": "5.1.1",
"codelyzer": "6.0.1",
- "css-loader": "3.6.0",
- "cypress": "5.3.0",
- "cypress-multi-reporters": "1.4.0",
"html-linter": "1.1.1",
diff --git a/community/ceph/30-ubuntu-32bit-fixes.patch.noauto b/community/ceph/30-ubuntu-32bit-fixes.patch.noauto
new file mode 100644
index 0000000000..9b9318d8d3
--- /dev/null
+++ b/community/ceph/30-ubuntu-32bit-fixes.patch.noauto
@@ -0,0 +1,137 @@
+Description: Misc fixes for 32 bit architecture builds.
+Author: James Page <james.page@ubuntu.com>
+Forwarded: no
+
+--- a/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
++++ b/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
+@@ -235,7 +235,8 @@ bool Replayer<I>::get_replay_status(std:
+
+ json_spirit::mObject root_obj;
+ root_obj["replay_state"] = replay_state;
+- root_obj["remote_snapshot_timestamp"] = remote_snap_info->timestamp.sec();
++ root_obj["remote_snapshot_timestamp"] = static_cast<uint64_t>(
++ remote_snap_info->timestamp.sec());
+
+ auto matching_remote_snap_id = util::compute_remote_snap_id(
+ m_state_builder->local_image_ctx->image_lock,
+@@ -249,8 +250,8 @@ bool Replayer<I>::get_replay_status(std:
+ // use the timestamp from the matching remote image since
+ // the local snapshot would just be the time the snapshot was
+ // synced and not the consistency point in time.
+- root_obj["local_snapshot_timestamp"] =
+- matching_remote_snap_it->second.timestamp.sec();
++ root_obj["local_snapshot_timestamp"] = static_cast<uint64_t>(
++ matching_remote_snap_it->second.timestamp.sec());
+ }
+
+ matching_remote_snap_it = m_state_builder->remote_image_ctx->snap_info.find(
+@@ -258,7 +259,8 @@ bool Replayer<I>::get_replay_status(std:
+ if (m_remote_snap_id_end != CEPH_NOSNAP &&
+ matching_remote_snap_it !=
+ m_state_builder->remote_image_ctx->snap_info.end()) {
+- root_obj["syncing_snapshot_timestamp"] = remote_snap_info->timestamp.sec();
++ root_obj["syncing_snapshot_timestamp"] = static_cast<uint64_t>(
++ remote_snap_info->timestamp.sec());
+ root_obj["syncing_percent"] = static_cast<uint64_t>(
+ 100 * m_local_mirror_snap_ns.last_copied_object_number /
+ static_cast<float>(std::max<uint64_t>(1U, m_local_object_count)));
+--- a/src/s3select/include/s3select_functions.h
++++ b/src/s3select/include/s3select_functions.h
+@@ -585,7 +585,7 @@ struct _fn_diff_timestamp : public base_
+ {
+ boost::gregorian::date_period dp =
+ boost::gregorian::date_period( val_dt1.timestamp()->date(), val_dt2.timestamp()->date());
+- result->set_value( dp.length().days() );
++ result->set_value( (int64_t)dp.length().days() );
+ }
+ else if (strcmp(val_date_part.str(), "hours") == 0)
+ {
+--- a/src/os/bluestore/BlueFS.cc
++++ b/src/os/bluestore/BlueFS.cc
+@@ -3744,11 +3744,11 @@ int BlueFS::do_replay_recovery_read(File
+
+ size_t BlueFS::probe_alloc_avail(int dev, uint64_t alloc_size)
+ {
+- size_t total = 0;
+- auto iterated_allocation = [&](size_t off, size_t len) {
++ uint64_t total = 0;
++ auto iterated_allocation = [&](uint64_t off, uint64_t len) {
+ //only count in size that is alloc_size aligned
+- size_t dist_to_alignment;
+- size_t offset_in_block = off & (alloc_size - 1);
++ uint64_t dist_to_alignment;
++ uint64_t offset_in_block = off & (alloc_size - 1);
+ if (offset_in_block == 0)
+ dist_to_alignment = 0;
+ else
+--- a/src/tools/neorados.cc
++++ b/src/tools/neorados.cc
+@@ -146,7 +146,7 @@ void create(R::RADOS& r, const std::vect
+ obj, pname));
+ }
+
+-inline constexpr std::size_t io_size = 4 << 20;
++inline constexpr std::uint64_t io_size = 4 << 20;
+
+ void write(R::RADOS& r, const std::vector<std::string>& p, s::yield_context y)
+ {
+@@ -156,7 +156,7 @@ void write(R::RADOS& r, const std::vecto
+
+ bs::error_code ec;
+ std::unique_ptr<char[]> buf = std::make_unique<char[]>(io_size);
+- std::size_t off = 0;
++ std::uint64_t off = 0;
+ boost::io::ios_exception_saver ies(std::cin);
+
+ std::cin.exceptions(std::istream::badbit);
+@@ -203,7 +203,7 @@ void read(R::RADOS& r, const std::vector
+ obj, pname));
+ }
+
+- std::size_t off = 0;
++ std::uint64_t off = 0;
+ ceph::buffer::list bl;
+ while (auto toread = std::max(len - off, io_size)) {
+ R::ReadOp op;
+--- a/src/tools/cephfs_mirror/FSMirror.cc
++++ b/src/tools/cephfs_mirror/FSMirror.cc
+@@ -334,7 +334,7 @@ void FSMirror::handle_acquire_directory(
+ std::scoped_lock locker(m_lock);
+ m_directories.emplace(dir_path);
+ m_service_daemon->add_or_update_fs_attribute(m_filesystem.fscid, SERVICE_DAEMON_DIR_COUNT_KEY,
+- m_directories.size());
++ static_cast<uint64_t>(m_directories.size()));
+
+ for (auto &[peer, peer_replayer] : m_peer_replayers) {
+ dout(10) << ": peer=" << peer << dendl;
+@@ -352,7 +352,7 @@ void FSMirror::handle_release_directory(
+ if (it != m_directories.end()) {
+ m_directories.erase(it);
+ m_service_daemon->add_or_update_fs_attribute(m_filesystem.fscid, SERVICE_DAEMON_DIR_COUNT_KEY,
+- m_directories.size());
++ static_cast<uint64_t>(m_directories.size()));
+ for (auto &[peer, peer_replayer] : m_peer_replayers) {
+ dout(10) << ": peer=" << peer << dendl;
+ peer_replayer->remove_directory(dir_path);
+--- a/src/librbd/object_map/DiffRequest.cc
++++ b/src/librbd/object_map/DiffRequest.cc
+@@ -175,7 +175,7 @@ void DiffRequest<I>::handle_load_object_
+ m_object_map.resize(num_objs);
+ }
+
+- size_t prev_object_diff_state_size = m_object_diff_state->size();
++ uint64_t prev_object_diff_state_size = m_object_diff_state->size();
+ if (prev_object_diff_state_size < num_objs) {
+ // the diff state should be the largest of all snapshots in the set
+ m_object_diff_state->resize(num_objs);
+--- a/src/SimpleRADOSStriper.cc
++++ b/src/SimpleRADOSStriper.cc
+@@ -140,7 +140,7 @@ int SimpleRADOSStriper::remove()
+ return 0;
+ }
+
+-int SimpleRADOSStriper::truncate(uint64_t size)
++int SimpleRADOSStriper::truncate(size_t size)
+ {
+ d(5) << size << dendl;
+
diff --git a/community/ceph/32-PurgeQueue.cc-cast.patch b/community/ceph/32-PurgeQueue.cc-cast.patch
new file mode 100644
index 0000000000..19a0719c4a
--- /dev/null
+++ b/community/ceph/32-PurgeQueue.cc-cast.patch
@@ -0,0 +1,85 @@
+Submitted as: https://github.com/ceph/ceph/pull/41235
+
+commit 953e7dc0f911f84a4bb377aee45b22e2ffad6867
+Author: Duncan Bellamy <dunk@denkimushi.com>
+Date: Sat May 8 11:52:35 2021 +0100
+
+ mds: PurgeQueue.cc add static cast for 32bit compilation
+
+ files_high_water is defined as uint64_t but when compiling on 32bit these max functions
+ fail as they are both not considered uint64_t by gcc 10 even though they are
+
+ files_high_water = std::max(files_high_water,
+ static_cast<uint64_t>(in_flight.size()));
+
+ Fixes: https://tracker.ceph.com/issues/50707
+
+ Signed-off-by: Duncan Bellamy <dunk@denkimushi.com>
+
+diff --git a/src/mds/PurgeQueue.cc b/src/mds/PurgeQueue.cc
+index 977be2c118..3104a3ccc4 100644
+--- a/src/mds/PurgeQueue.cc
++++ b/src/mds/PurgeQueue.cc
+@@ -7,9 +7,9 @@
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+- * License version 2.1, as published by the Free Software
++ * License version 2.1, as published by the Free Software
+ * Foundation. See file COPYING.
+- *
++ *
+ */
+
+ #include "common/debug.h"
+@@ -594,8 +594,8 @@ void PurgeQueue::_execute_item(
+
+ in_flight[expire_to] = item;
+ logger->set(l_pq_executing, in_flight.size());
+- files_high_water = std::max(files_high_water,
+- static_cast<uint64_t>(in_flight.size()));
++ files_high_water = std::max<uint64_t>(files_high_water,
++ in_flight.size());
+ logger->set(l_pq_executing_high_water, files_high_water);
+ auto ops = _calculate_ops(item);
+ ops_in_flight += ops;
+@@ -662,8 +662,8 @@ void PurgeQueue::_execute_item(
+ logger->set(l_pq_executing_ops_high_water, ops_high_water);
+ in_flight.erase(expire_to);
+ logger->set(l_pq_executing, in_flight.size());
+- files_high_water = std::max(files_high_water,
+- static_cast<uint64_t>(in_flight.size()));
++ files_high_water = std::max<uint64_t>(files_high_water,
++ in_flight.size());
+ logger->set(l_pq_executing_high_water, files_high_water);
+ return;
+ }
+@@ -716,19 +716,19 @@ void PurgeQueue::_execute_item_complete(
+
+ in_flight.erase(iter);
+ logger->set(l_pq_executing, in_flight.size());
+- files_high_water = std::max(files_high_water,
+- static_cast<uint64_t>(in_flight.size()));
++ files_high_water = std::max<uint64_t>(files_high_water,
++ in_flight.size());
+ logger->set(l_pq_executing_high_water, files_high_water);
+ dout(10) << "in_flight.size() now " << in_flight.size() << dendl;
+
+- uint64_t write_pos = journaler.get_write_pos();
+- uint64_t read_pos = journaler.get_read_pos();
+- uint64_t expire_pos = journaler.get_expire_pos();
+- uint64_t item_num = (write_pos - (in_flight.size() ? expire_pos : read_pos))
++ uint64_t write_pos = journaler.get_write_pos();
++ uint64_t read_pos = journaler.get_read_pos();
++ uint64_t expire_pos = journaler.get_expire_pos();
++ uint64_t item_num = (write_pos - (in_flight.size() ? expire_pos : read_pos))
+ / purge_item_journal_size;
+- dout(10) << "left purge items in journal: " << item_num
+- << " (purge_item_journal_size/write_pos/read_pos/expire_pos) now at "
+- << "(" << purge_item_journal_size << "/" << write_pos << "/" << read_pos
++ dout(10) << "left purge items in journal: " << item_num
++ << " (purge_item_journal_size/write_pos/read_pos/expire_pos) now at "
++ << "(" << purge_item_journal_size << "/" << write_pos << "/" << read_pos
+ << "/" << expire_pos << ")" << dendl;
+
+ logger->set(l_pq_item_in_journal, item_num);
diff --git a/community/ceph/32-upstream32bit.patch b/community/ceph/32-upstream32bit.patch
new file mode 100644
index 0000000000..917cd036bc
--- /dev/null
+++ b/community/ceph/32-upstream32bit.patch
@@ -0,0 +1,92 @@
+commit 72a5993da70955182a73755ddba35005a6d9fc11
+Author: Kefu Chai <kchai@redhat.com>
+Date: Tue Apr 27 18:24:24 2021 +0800
+
+ cls/rbd, librbd: use uint64_t for sparse_size
+
+ the size of `size_t` is varies from architecture to architecture. the
+ C++ standard only requires it to be able to represent the maximum possible
+ size of object of any type. on 32-bit architectures, it's very likely a
+ 32-bit unsigned integer. to ensure the interoperability between the
+ 64-bit systems and 32-bit systems, we should use a type with explicitly
+ defined size.
+
+ also, we don't define the dencoder for size_t. so on systems where
+ size_t is not backed by uint32_t or uint64_t, the tree does not compile.
+
+ in this change, use uint64_t for sparse_size. and leave
+ `C_SparsifyObject::m_sparse_size` intact. as the latter should be able
+ to be promoted to uint64_t when necessary.
+
+ this change is backward compatible on 64-bit systems.
+
+ Signed-off-by: Kefu Chai <kchai@redhat.com>
+
+diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc
+index 33910b7df5..e3e05d85ed 100644
+--- a/src/cls/rbd/cls_rbd.cc
++++ b/src/cls/rbd/cls_rbd.cc
+@@ -7996,7 +7996,7 @@ int namespace_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
+ */
+ int sparsify(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
+ {
+- size_t sparse_size;
++ uint64_t sparse_size;
+ bool remove_empty;
+ try {
+ auto iter = in->cbegin();
+diff --git a/src/cls/rbd/cls_rbd_client.cc b/src/cls/rbd/cls_rbd_client.cc
+index cefa1fed79..fee3ac8923 100644
+--- a/src/cls/rbd/cls_rbd_client.cc
++++ b/src/cls/rbd/cls_rbd_client.cc
+@@ -2974,7 +2974,7 @@ int namespace_list(librados::IoCtx *ioctx,
+ return namespace_list_finish(&iter, entries);
+ }
+
+-void sparsify(librados::ObjectWriteOperation *op, size_t sparse_size,
++void sparsify(librados::ObjectWriteOperation *op, uint64_t sparse_size,
+ bool remove_empty)
+ {
+ bufferlist bl;
+@@ -2983,7 +2983,7 @@ void sparsify(librados::ObjectWriteOperation *op, size_t sparse_size,
+ op->exec("rbd", "sparsify", bl);
+ }
+
+-int sparsify(librados::IoCtx *ioctx, const std::string &oid, size_t sparse_size,
++int sparsify(librados::IoCtx *ioctx, const std::string &oid, uint64_t sparse_size,
+ bool remove_empty)
+ {
+ librados::ObjectWriteOperation op;
+diff --git a/src/cls/rbd/cls_rbd_client.h b/src/cls/rbd/cls_rbd_client.h
+index 12b34c4832..ef2b05fd84 100644
+--- a/src/cls/rbd/cls_rbd_client.h
++++ b/src/cls/rbd/cls_rbd_client.h
+@@ -652,9 +652,9 @@ int sparse_copyup(librados::IoCtx *ioctx, const std::string &oid,
+ const std::map<uint64_t, uint64_t> &extent_map,
+ ceph::buffer::list data);
+
+-void sparsify(librados::ObjectWriteOperation *op, size_t sparse_size,
++void sparsify(librados::ObjectWriteOperation *op, uint64_t sparse_size,
+ bool remove_empty);
+-int sparsify(librados::IoCtx *ioctx, const std::string &oid, size_t sparse_size,
++int sparsify(librados::IoCtx *ioctx, const std::string &oid, uint64_t sparse_size,
+ bool remove_empty);
+
+ } // namespace cls_client
+diff --git a/src/librbd/WatchNotifyTypes.h b/src/librbd/WatchNotifyTypes.h
+index ca0b40f28f..4fad31ffac 100644
+--- a/src/librbd/WatchNotifyTypes.h
++++ b/src/librbd/WatchNotifyTypes.h
+@@ -410,10 +410,10 @@ struct MigratePayload : public AsyncRequestPayloadBase {
+ };
+
+ struct SparsifyPayload : public AsyncRequestPayloadBase {
+- size_t sparse_size = 0;
++ uint64_t sparse_size = 0;
+
+ SparsifyPayload() {}
+- SparsifyPayload(const AsyncRequestId &id, size_t sparse_size)
++ SparsifyPayload(const AsyncRequestId &id, uint64_t sparse_size)
+ : AsyncRequestPayloadBase(id), sparse_size(sparse_size) {
+ }
+
diff --git a/community/ceph/32-upstream32bitcleanup.patch b/community/ceph/32-upstream32bitcleanup.patch
new file mode 100644
index 0000000000..1fe036ed83
--- /dev/null
+++ b/community/ceph/32-upstream32bitcleanup.patch
@@ -0,0 +1,143 @@
+submitted as https://github.com/ceph/ceph/pull/41239
+
+commit 558adef26a2149b0dd644a2c9a7e2db8d370b556
+Author: Kefu Chai <kchai@redhat.com>
+Date: Sat May 8 21:02:54 2021 +0800
+
+ librbd/deep_copy: cast uint64_t to size_t for constructing SparseBufferlistExtent
+
+ SparseBufferlistExtent's ctor accepts size_t, so, on a 32-bit platform,
+ the parameter would be narrowed before passing to the ctor, and GCC
+ complains at seeing this:
+
+ /builds/a16bitsysop/aports/community/ceph/src/ceph-16.2.3/src/librbd/deep_copy/ObjectCopyRequest.cc:789:60: warning: narrowing conversion of 'object_extent.striper::LightweightObjectExtent::length'
+ from 'uint64_t' {aka 'long long unsigned int'} to 'size_t' {aka 'unsigned int'} [-Wnarrowing]
+ 789 | {io::SPARSE_EXTENT_STATE_ZEROED, object_extent.length});
+ | ~~~~~~~~~~~~~~^~~~~~
+
+ this change make this cast explicit and silences the warning.
+
+ Signed-off-by: Kefu Chai <kchai@redhat.com>
+
+diff --git a/src/librbd/deep_copy/ObjectCopyRequest.cc b/src/librbd/deep_copy/ObjectCopyRequest.cc
+index e86ed5ea1c..efc6749536 100644
+--- a/src/librbd/deep_copy/ObjectCopyRequest.cc
++++ b/src/librbd/deep_copy/ObjectCopyRequest.cc
+@@ -614,7 +614,8 @@ void ObjectCopyRequest<I>::merge_write_ops() {
+
+ m_snapshot_sparse_bufferlist[src_snap_seq].insert(
+ object_extent.offset, object_extent.length,
+- {io::SPARSE_EXTENT_STATE_DATA, object_extent.length,\
++ {io::SPARSE_EXTENT_STATE_DATA,
++ static_cast<size_t>(object_extent.length),
+ std::move(sub_bl)});
+
+ buffer_offset += object_extent.length;
+diff --git a/src/librbd/io/CopyupRequest.cc b/src/librbd/io/CopyupRequest.cc
+index d70851409f..a3af713151 100644
+--- a/src/librbd/io/CopyupRequest.cc
++++ b/src/librbd/io/CopyupRequest.cc
+@@ -711,7 +711,9 @@ int CopyupRequest<I>::prepare_copyup_data() {
+
+ sparse_bufferlist.insert(
+ object_offset, object_length,
+- {SPARSE_EXTENT_STATE_DATA, object_length, std::move(sub_bl)});
++ {SPARSE_EXTENT_STATE_DATA,
++ static_cast<size_t>(object_length),
++ std::move(sub_bl)});
+ }
+ } else {
+ // copyup that will concurrently written to the HEAD revision with the
+commit 130fdf7bcfd2b4c5a5b34809952b69b70e9c11a4
+Author: Kefu Chai <kchai@redhat.com>
+Date: Sat May 8 20:59:07 2021 +0800
+
+ mgr/PyModule: use Py_ssize_t for the PyList index
+
+ also silences the warnings like:
+
+ mgr/PyModule.cc:574:30: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'Py_ssize_t' {aka 'int'} [-Wsign-compare]
+ 574 | for (unsigned i = 0; i < PyList_Size(p); ++i) {
+ | ~~^~~~~~~~~~~~~~~~
+
+ Signed-off-by: Kefu Chai <kchai@redhat.com>
+
+diff --git a/src/mgr/PyModule.cc b/src/mgr/PyModule.cc
+index 28c76fe7ed..ff1ff85e7e 100644
+--- a/src/mgr/PyModule.cc
++++ b/src/mgr/PyModule.cc
+@@ -562,7 +562,7 @@ int PyModule::load_options()
+ }
+ p = PyDict_GetItemString(pOption, "enum_allowed");
+ if (p && PyObject_TypeCheck(p, &PyList_Type)) {
+- for (unsigned i = 0; i < PyList_Size(p); ++i) {
++ for (Py_ssize_t i = 0; i < PyList_Size(p); ++i) {
+ auto q = PyList_GetItem(p, i);
+ if (q) {
+ auto r = PyObject_Str(q);
+@@ -573,7 +573,7 @@ int PyModule::load_options()
+ }
+ p = PyDict_GetItemString(pOption, "see_also");
+ if (p && PyObject_TypeCheck(p, &PyList_Type)) {
+- for (unsigned i = 0; i < PyList_Size(p); ++i) {
++ for (Py_ssize_t i = 0; i < PyList_Size(p); ++i) {
+ auto q = PyList_GetItem(p, i);
+ if (q && PyObject_TypeCheck(q, &PyUnicode_Type)) {
+ option.see_also.insert(PyUnicode_AsUTF8(q));
+@@ -582,7 +582,7 @@ int PyModule::load_options()
+ }
+ p = PyDict_GetItemString(pOption, "tags");
+ if (p && PyObject_TypeCheck(p, &PyList_Type)) {
+- for (unsigned i = 0; i < PyList_Size(p); ++i) {
++ for (Py_ssize_t i = 0; i < PyList_Size(p); ++i) {
+ auto q = PyList_GetItem(p, i);
+ if (q && PyObject_TypeCheck(q, &PyUnicode_Type)) {
+ option.tags.insert(PyUnicode_AsUTF8(q));
+commit 3bf4b32c9bd15652b24bc4b8c8ea07fb6bb04357
+Author: Kefu Chai <kchai@redhat.com>
+Date: Sat May 8 20:51:19 2021 +0800
+
+ os/bluestore: print size_t using %xz
+
+ we cannot assume that size_t is an alias of "long"
+
+ Signed-off-by: Kefu Chai <kchai@redhat.com>
+
+diff --git a/src/os/bluestore/Allocator.cc b/src/os/bluestore/Allocator.cc
+index 75f3172ca5..3428545414 100644
+--- a/src/os/bluestore/Allocator.cc
++++ b/src/os/bluestore/Allocator.cc
+@@ -81,8 +81,8 @@ public:
+ f->open_object_section("free");
+ char off_hex[30];
+ char len_hex[30];
+- snprintf(off_hex, sizeof(off_hex) - 1, "0x%lx", off);
+- snprintf(len_hex, sizeof(len_hex) - 1, "0x%lx", len);
++ snprintf(off_hex, sizeof(off_hex) - 1, "0x%zx", off);
++ snprintf(len_hex, sizeof(len_hex) - 1, "0x%zx", len);
+ f->dump_string("offset", off_hex);
+ f->dump_string("length", len_hex);
+ f->close_section();
+commit 3af466ee84209896f8671046c837350e736f15de
+Author: Kefu Chai <kchai@redhat.com>
+Date: Sat May 8 20:50:08 2021 +0800
+
+ client: print int64_t using PRId64
+
+ we cannot assume that int64_t is an alias of "long"
+
+ Signed-off-by: Kefu Chai <kchai@redhat.com>
+
+diff --git a/src/client/Client.cc b/src/client/Client.cc
+index acdd8f0934..7352824f6c 100644
+--- a/src/client/Client.cc
++++ b/src/client/Client.cc
+@@ -12772,7 +12772,7 @@ size_t Client::_vxattrcb_cluster_fsid(Inode *in, char *val, size_t size)
+ size_t Client::_vxattrcb_client_id(Inode *in, char *val, size_t size)
+ {
+ auto name = messenger->get_myname();
+- return snprintf(val, size, "%s%ld", name.type_str(), name.num());
++ return snprintf(val, size, "%s%" PRId64, name.type_str(), name.num());
+ }
+
+ #define CEPH_XATTR_NAME(_type, _name) "ceph." #_type "." #_name
diff --git a/community/ceph/35-fix_ErasureCodeShec.patch b/community/ceph/35-fix_ErasureCodeShec.patch
index cf99132112..0ab2cc2ed0 100644
--- a/community/ceph/35-fix_ErasureCodeShec.patch
+++ b/community/ceph/35-fix_ErasureCodeShec.patch
@@ -1,3 +1,5 @@
+patch by Vladimir Bashkirtsev
+
diff -uNr ceph-15.2.4/src/erasure-code/shec/ErasureCodeShec.cc ceph-15.2.4-fix_ErasureCodeShec/src/erasure-code/shec/ErasureCodeShec.cc
--- ceph-15.2.4/src/erasure-code/shec/ErasureCodeShec.cc 2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-fix_ErasureCodeShec/src/erasure-code/shec/ErasureCodeShec.cc 2020-11-14 00:46:20.029488684 +1030
diff --git a/community/ceph/37-fix_tests.patch b/community/ceph/37-fix_tests.patch
index 08ca3839b0..169f6ef189 100644
--- a/community/ceph/37-fix_tests.patch
+++ b/community/ceph/37-fix_tests.patch
@@ -1,3 +1,6 @@
+patch by Vladimir Bashkirtsev
+increase timeouts for armv7 ci
+
diff -uNr ceph-15.2.4/src/test/CMakeLists.txt ceph-15.2.4-fix_tests/src/test/CMakeLists.txt
--- ceph-15.2.4/src/test/CMakeLists.txt 2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-fix_tests/src/test/CMakeLists.txt 2020-11-08 17:37:15.788767448 +1030
diff --git a/community/ceph/42-no-virtualenvs.patch b/community/ceph/42-no-virtualenvs.patch
index aa385ac898..81efe72ea5 100644
--- a/community/ceph/42-no-virtualenvs.patch
+++ b/community/ceph/42-no-virtualenvs.patch
@@ -1,3 +1,6 @@
+based on gentoo patch
+use system node instead of nodeenv installing one as only availiable for x86 with musl
+
--- a/cmake/modules/AddCephTest.cmake
+++ b/cmake/modules/AddCephTest.cmake
@@ -68,14 +68,6 @@
@@ -59,7 +62,7 @@
- OUTPUT "${mgr-dashboard-nodeenv-dir}/bin/npm"
- COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv-dir}
- COMMAND ${mgr-dashboard-nodeenv-dir}/bin/pip install nodeenv
-- COMMAND ${mgr-dashboard-nodeenv-dir}/bin/nodeenv ${node_mirror_opt} -p --node=12.18.2
+- COMMAND ${mgr-dashboard-nodeenv-dir}/bin/nodeenv --verbose ${node_mirror_opt} -p --node=12.18.2
- COMMAND mkdir ${mgr-dashboard-nodeenv-dir}/.npm
+ OUTPUT "/usr/bin/npm"
+ COMMAND /usr/bin/nodeenv -p --node=system
diff --git a/community/ceph/44-cmake-buildtype.patch b/community/ceph/44-cmake-buildtype.patch
new file mode 100644
index 0000000000..3580cdf5f6
--- /dev/null
+++ b/community/ceph/44-cmake-buildtype.patch
@@ -0,0 +1,36 @@
+commit a7e3ece459111d157a20d05de3a92cf4dab6bde6
+Author: Kefu Chai <kchai@redhat.com>
+Date: Thu Jul 1 15:24:50 2021 +0800
+
+ cmake: set CMAKE_BUILD_TYPE only if .git exists
+
+ distros intend to fine tune the CFLAGS and CXXFLAGS by themselves, see
+
+ - https://git.alpinelinux.org/abuild/tree/abuild.conf
+ - https://wiki.archlinux.org/title/CMake_package_guidelines#CMake_undesired_behaviors
+ - https://github.com/Debian/debhelper/blob/5d1bb29841043d8e47ebbdd043e6cd086cad508e/lib/Debian/Debhelper/Buildsystem/cmake.pm#L16
+
+ so instead of setting a CMAKE_BUILD_TYPE when building from a
+ dist tarball, let's just leave it empty.
+
+ Signed-off-by: Kefu Chai <kchai@redhat.com>
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 760a2ceb0c..6f35e87f90 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -156,12 +156,8 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
+ endif()
+ endif(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
+
+-if(NOT CMAKE_BUILD_TYPE)
+- if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
+- set(default_build_type "Debug")
+- else()
+- set(default_build_type "RelWithDebInfo")
+- endif()
++if(DEFINED CMAKE_BUILD_TYPE OR EXISTS "${CMAKE_SOURCE_DIR}/.git")
++ set(default_build_type "Debug")
+ set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
+ STRING "Default BUILD_TYPE is Debug, other options are: RelWithDebInfo, Release, and MinSizeRel." FORCE)
+ endif()
diff --git a/community/ceph/44-missing-include.patch b/community/ceph/44-missing-include.patch
index 833ec1beb8..f944255079 100644
--- a/community/ceph/44-missing-include.patch
+++ b/community/ceph/44-missing-include.patch
@@ -1,12 +1,16 @@
-submitted as https://github.com/ceph/ceph/pull/40583
+submitted as:
+https://github.com/ceph/ceph/pull/41470
---- a/src/tools/cephfs_mirror/PeerReplayer.cc
-+++ b/src/tools/cephfs_mirror/PeerReplayer.cc
-@@ -5,6 +5,7 @@
- #include <fcntl.h>
- #include <algorithm>
- #include <sys/time.h>
-+#include <sys/file.h>
+diff --git a/src/rgw/rgw_string.h b/src/rgw/rgw_string.h
+index 257daa9c1..90e64f98a 100644
+--- a/src/rgw/rgw_string.h
++++ b/src/rgw/rgw_string.h
+@@ -8,6 +8,8 @@
+ #include <stdlib.h>
+ #include <limits.h>
+ #include <string_view>
++#include <string>
++#include <stdexcept>
+
+ #include <boost/container/small_vector.hpp>
- #include "common/admin_socket.h"
- #include "common/ceph_context.h"
diff --git a/community/ceph/44-missing-include2.patch b/community/ceph/44-missing-include2.patch
new file mode 100644
index 0000000000..6974cd86ff
--- /dev/null
+++ b/community/ceph/44-missing-include2.patch
@@ -0,0 +1,117 @@
+commit ff79cae5a1243111c8a039426081638d40a258fa
+Author: Kefu Chai <kchai@redhat.com>
+Date: Mon Apr 12 17:28:56 2021 +0800
+
+ common/Formatter: include used header
+
+ otherwise it fails to build with gcc-toolset-10, like:
+
+ ../src/common/Formatter.cc: In member function ‘virtual void ceph::XMLFormatter::close_section()’:
+ ../src/common/Formatter.cc:449:8: error: ‘transform’ is not a member of ‘std’
+ 449 | std::transform(section.begin(), section.end(), section.begin(),
+ | ^~~~~~~~~
+
+ Signed-off-by: Kefu Chai <kchai@redhat.com>
+
+diff --git a/src/common/Formatter.cc b/src/common/Formatter.cc
+index b599e48b34..362deffb5a 100644
+--- a/src/common/Formatter.cc
++++ b/src/common/Formatter.cc
+@@ -19,6 +19,7 @@
+ #include "include/buffer.h"
+
+ #include <fmt/format.h>
++#include <algorithm>
+ #include <set>
+ #include <limits>
+
+From 7c2f58ea5ec70e5606ab362e6f4cfda087cec65a Mon Sep 17 00:00:00 2001
+From: Kefu Chai <kchai@redhat.com>
+Date: Mon, 12 Apr 2021 17:32:59 +0800
+Subject: [PATCH] mon,osd: always init local variable
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+this change silences the warning like:
+
+../src/mon/Monitor.cc: In member function ‘void Monitor::handle_command(MonOpRequestRef)’:
+../src/mon/Monitor.cc:3703:55: warning: ‘osd’ may be used uninitialized in this function [-Wmaybe-uninitialized]
+ 3703 | uint64_t seq = mgrstatmon()->get_last_osd_stat_seq(osd);
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
+
+Signed-off-by: Kefu Chai <kchai@redhat.com>
+---
+ src/mon/Monitor.cc | 2 +-
+ src/osd/osd_types.h | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc
+index 6126db9caa609..ffac8be278c16 100644
+--- a/src/mon/Monitor.cc
++++ b/src/mon/Monitor.cc
+@@ -3698,7 +3698,7 @@ void Monitor::handle_command(MonOpRequestRef op)
+ rs = ss2.str();
+ r = 0;
+ } else if (prefix == "osd last-stat-seq") {
+- int64_t osd;
++ int64_t osd = 0;
+ cmd_getval(cmdmap, "id", osd);
+ uint64_t seq = mgrstatmon()->get_last_osd_stat_seq(osd);
+ if (f) {
+diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h
+index c0fe8f781c21e..fe2fe7defa9a8 100644
+--- a/src/osd/osd_types.h
++++ b/src/osd/osd_types.h
+@@ -1631,12 +1631,12 @@ struct pg_pool_t {
+ }
+
+ int64_t get_dedup_tier() const {
+- int64_t tier_id;
++ int64_t tier_id = 0;
+ opts.get(pool_opts_t::DEDUP_TIER, &tier_id);
+ return tier_id;
+ }
+ int64_t get_dedup_cdc_chunk_size() const {
+- int64_t chunk_size;
++ int64_t chunk_size = 0;
+ opts.get(pool_opts_t::DEDUP_CDC_CHUNK_SIZE, &chunk_size);
+ return chunk_size;
+ }
+From 03770f75562812c683ff1503d2032dcd66d83289 Mon Sep 17 00:00:00 2001
+From: Kefu Chai <kchai@redhat.com>
+Date: Mon, 12 Apr 2021 17:43:13 +0800
+Subject: [PATCH] include/denc: include used header
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+to address the FTBFS like:
+
+/home/kchai/ceph/src/include/denc.h: In member function ‘void DencDumper<T>::dump() const’:
+/home/kchai/ceph/src/include/denc.h:121:60: error: ‘O_BINARY’ was not declared in this scope
+ int fd = ::open(fn, O_WRONLY|O_TRUNC|O_CREAT|O_CLOEXEC|O_BINARY, 0644);
+ ^~~~~~~~
+/home/kchai/ceph/src/include/denc.h:121:60: note: the macro ‘O_BINARY’ had not yet been defined
+In file included from /home/kchai/ceph/src/include/statlite.h:14,
+ from /home/kchai/ceph/src/include/types.h:41,
+ from /home/kchai/ceph/src/auth/Crypto.h:19,
+ from /home/kchai/ceph/src/auth/Crypto.cc:21:
+
+Signed-off-by: Kefu Chai <kchai@redhat.com>
+---
+ src/include/denc.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/include/denc.h b/src/include/denc.h
+index 266121bd20cda..10fa8d0c87124 100644
+--- a/src/include/denc.h
++++ b/src/include/denc.h
+@@ -39,6 +39,7 @@
+ #include <boost/intrusive/set.hpp>
+ #include <boost/optional.hpp>
+
++#include "include/compat.h"
+ #include "include/intarith.h"
+ #include "include/int_types.h"
+ #include "include/scope_guard.h"
diff --git a/community/ceph/44-node_modules.patch b/community/ceph/44-node_modules.patch
new file mode 100644
index 0000000000..1e74f9ce0a
--- /dev/null
+++ b/community/ceph/44-node_modules.patch
@@ -0,0 +1,19 @@
+submitted as :
+https://github.com/ceph/ceph/pull/41353
+
+--- a/src/pybind/mgr/CMakeLists.txt
++++ b/src/pybind/mgr/CMakeLists.txt
+@@ -22,4 +22,12 @@
+ REGEX "rook/rook-client-python.*" EXCLUDE
+ REGEX "osd_perf_query/.*" EXCLUDE
+ REGEX "tox.ini" EXCLUDE
+- REGEX "requirements.txt" EXCLUDE)
++ REGEX "requirements.*\.txt" EXCLUDE
++ REGEX "constraints.*\.txt" EXCLUDE
++ REGEX "node_modules" EXCLUDE
++ REGEX "cypress.*" EXCLUDE
++ REGEX "\.coveragerc" EXCLUDE
++ REGEX "\.editorconfig" EXCLUDE
++ REGEX "\..*lintrc" EXCLUDE
++ REGEX "\.browserslistrc" EXCLUDE
++ REGEX "\.prettier*" EXCLUDE)
diff --git a/community/ceph/APKBUILD b/community/ceph/APKBUILD
index 8c76df284c..d51b0bd650 100644
--- a/community/ceph/APKBUILD
+++ b/community/ceph/APKBUILD
@@ -3,14 +3,14 @@
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=ceph
-pkgver=16.2.0
+pkgver=16.2.5
pkgrel=1
pkgdesc="Ceph is a distributed object store and file system"
pkgusers="ceph"
pkggroups="ceph"
url="https://ceph.com/"
-#32bit still WIP
-arch="all !x86 !armv7 !armhf !mips !mips64"
+# riscv64 missing nodejs
+arch="all !mips !mips64 !riscv64"
# https://github.com/ceph/ceph/blob/master/COPYING
license="LGPL-2.1-only AND LGPL-2.0-or-later AND GPL-2.0-only AND GPL-3.0-only AND CC-BY-SA-1.0 AND BSL-1.0 AND GPL-2.0-or-later WITH Autoconf-exception-2.0 AND BSD-3-Clause AND MIT AND custom"
depends="ceph-osd ceph-mds ceph-mon"
@@ -41,7 +41,7 @@ makedepends="
acl-dev
argp-standalone
bc
- boost1.75-dev
+ boost-dev
btrfs-progs
bzip2-dev
cmake
@@ -51,6 +51,7 @@ makedepends="
curl-dev
cython
diffutils
+ doxygen
eudev-dev
expat-dev
fcgi-dev
@@ -59,6 +60,7 @@ makedepends="
fuse
fuse-dev
git
+ graphviz-dev
grep
gperf
jq
@@ -108,15 +110,22 @@ source="https://download.ceph.com/tarballs/ceph_$pkgver.orig.tar.gz
10-musl-fixes.patch
20-pci.patch
30-32bit_fix.patch.noauto
+ 30-cypress.patch.noauto
+ 30-ubuntu-32bit-fixes.patch.noauto
31-32bit_fix_tests.patch.noauto
- 32-cypress.patch.noauto
+ 32-PurgeQueue.cc-cast.patch
+ 32-upstream32bit.patch
+ 32-upstream32bitcleanup.patch
35-fix_ErasureCodeShec.patch
37-fix_tests.patch
42-no-virtualenvs.patch
43-aarch64-erasure.patch
+ 44-cmake-buildtype.patch
44-LogClock.h.patch
- 44-missing-include.patch
44-staticcast.patch
+ 44-node_modules.patch
+ 44-missing-include.patch
+ 44-missing-include2.patch
"
subpackages="
@@ -125,7 +134,6 @@ subpackages="
$pkgname-common
$pkgname-mds
$pkgname-mgr
- $pkgname-mgr-node:mgr_node:noarch
$pkgname-mon::noarch
$pkgname-mon-daemon:mon_daemon
$pkgname-mon-tools:mon_tools
@@ -153,6 +161,12 @@ subpackages="
"
# secfixes:
+# 16.2.4-r0:
+# - CVE-2021-3509
+# - CVE-2021-3531
+# - CVE-2021-3524
+# 16.2.3-r0:
+# - CVE-2021-20288
# 15.2.8-r0:
# - CVE-2020-27781
# 15.2.6-r0:
@@ -171,10 +185,6 @@ subpackages="
_ceph_uid=167
_ceph_gid=167
-_prefix=/usr
-_bindir=$_prefix/bin
-_datadir=$_prefix/share
-
_py3_sitelib() {
python3 -c "import site; print(site.getsitepackages()[0])"
}
@@ -185,9 +195,13 @@ prepare() {
case "$CARCH" in
x86|armv7|armhf)
patch -p1 -i "$srcdir"/30-32bit_fix.patch.noauto
- patch -p1 -i "$srcdir"/32-cypress.patch.noauto
+ patch -p1 -i "$srcdir"/30-cypress.patch.noauto
+ patch -p1 -i "$srcdir"/30-ubuntu-32bit-fixes.patch.noauto
patch -p1 -i "$srcdir"/31-32bit_fix_tests.patch.noauto ;;
esac
+
+ #delete bundled boost as >300mb and using system boost
+ rm -rf src/boost
}
build() {
@@ -196,7 +210,11 @@ build() {
# builders keep failing when -jN == nproc
export MAKEFLAGS="$MAKEFLAGS -j$((JOBS<16 ? JOBS : 16))"
+ # use alternate registry as original can timeout for arm32bit
+ export NPM_REGISTRY=https://registry.npmjs.org
+
cmake -B build \
+ -DCMAKE_BUILD_TYPE=None \
-DLUA_LIBRARIES=/usr/lib/lua"$_lua"/liblua.so \
-DALLOCATOR=libc \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -208,10 +226,7 @@ build() {
-DWITH_MANPAGE=ON \
-DWITH_SYSTEM_BOOST=ON \
-DWITH_SYSTEM_NPM=ON \
- -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
- -DWITH_PYTHON2=OFF \
-DWITH_PYTHON3=3 \
- -DMGR_PYTHON_VERSION=3 \
-DWITH_LTTNG=OFF \
-DWITH_RDMA=OFF \
-DWITH_SYSTEMD=OFF \
@@ -224,31 +239,37 @@ build() {
}
package() {
+ # free up some space before install
+ rm -rf build/src/pybind/mgr/dashboard/cypress
+ rm -rf src/pybind/mgr/dashboard/frontend/node_modules
+
make -C build DESTDIR="$pkgdir" install
- # Remove the upstream init file and put in openrc ones
+ # remove the upstream init file and put in openrc ones
rm -f "$pkgdir"/etc/init.d/ceph
- install -D -m 0744 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/ceph
- install -D -m 0744 "$srcdir"/"$pkgname".confd "$pkgdir"/etc/conf.d/ceph
+ install -D -m 755 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/ceph
+ install -D -m 644 "$srcdir"/"$pkgname".confd "$pkgdir"/etc/conf.d/ceph
- # Move mount.* binaries to /sbin
+ # move mount.* binaries to /sbin
mkdir -p "$pkgdir"/sbin
mv "$pkgdir"/usr/sbin/mount.* "$pkgdir"/sbin
- install -m 0644 -D src/etc-rbdmap "$pkgdir"/etc/ceph/rbdmap
- install -m 0644 -D src/logrotate.conf "$pkgdir"/etc/logrotate.d/ceph
- install -m 0644 -D etc/sysctl/90-ceph-osd.conf "$pkgdir"/etc/sysctl.d/90-ceph-osd.conf
+ install -m 644 -D src/etc-rbdmap "$pkgdir"/etc/ceph/rbdmap
+ install -m 644 -D src/logrotate.conf "$pkgdir"/etc/logrotate.d/ceph
+ install -m 644 -D etc/sysctl/90-ceph-osd.conf "$pkgdir"/etc/sysctl.d/90-ceph-osd.conf
# udev rules
- install -m 0644 -D udev/50-rbd.rules "$pkgdir"/etc/udev/rules.d/50-rbd.rules
+ install -m 644 -D udev/50-rbd.rules "$pkgdir"/etc/udev/rules.d/50-rbd.rules
# sudoers.d
- install -m 0600 -D sudoers.d/ceph-osd-smartctl "$pkgdir"/etc/sudoers.d/ceph-osd-smartctl
-
- # copy out things that need splitting
- mv "$pkgdir"/usr/share/ceph/mgr/dashboard/frontend/node_modules "$builddir"/
+ install -m 600 -D sudoers.d/ceph-osd-smartctl "$pkgdir"/etc/sudoers.d/ceph-osd-smartctl
# delete systemd related stuff
rm "$pkgdir"/usr/sbin/ceph-volume-systemd
+
+ # move docs to docs
+ mkdir -p "$pkgdir"/usr/share/doc/ceph/dashboard
+ mv "$pkgdir"/usr/share/ceph/mgr/dashboard/*.rst "$pkgdir"/usr/share/doc/ceph/dashboard/
+ mv "$pkgdir"/usr/share/ceph/mgr/cephadm/HACKING.rst "$pkgdir"/usr/share/doc/ceph/cephadm-HACKING.rst
}
check() {
@@ -275,22 +296,20 @@ base() {
librbd=$pkgver-r$pkgrel
librados=$pkgver-r$pkgrel
libcephfs=$pkgver-r$pkgrel
- "
-
- _pkg $_bindir \
- ceph-crash \
- crushtool \
- monmaptool \
- osdmaptool \
- ceph-kvstore-tool \
- ceph-run
- amove usr/sbin/ceph-create-keys
- amove usr/libexec/ceph/ceph_common.sh
- amove usr/lib/rados-classes/*.so*
- amove usr/lib/ceph/erasure-code/libec_*.so*
- amove usr/lib/ceph/compressor/libceph_*.so*
- amove usr/lib/ceph/crypto/libceph_*.so*
- amove etc/logrotate.d/ceph
+ "
+
+ amove usr/bin/ceph-crash \
+ usr/bin/crushtool \
+ usr/bin/*maptool \
+ usr/bin/ceph-kvstore-tool \
+ usr/bin/ceph-run \
+ usr/sbin/ceph-create-keys \
+ usr/libexec/ceph/ceph_common.sh \
+ usr/lib/rados-classes/*.so* \
+ usr/lib/ceph/erasure-code/libec_*.so* \
+ usr/lib/ceph/compressor/libceph_*.so* \
+ usr/lib/ceph/crypto/libceph_*.so* \
+ etc/logrotate.d/ceph
for dir in crash crash/posted tmp bootstrap-osd bootstrap-mds \
bootstrap-rgw bootstrap-mgr bootstrap-rbd \
bootstrap-rbd-mirror; do
@@ -304,26 +323,18 @@ common() {
pkgdesc="Common utilities to mount and interact with a ceph storage cluster."
depends="py3-rados py3-rbd py3-cephfs py3-prettytable"
- _pkg $_bindir ceph \
- ceph-authtool \
- ceph-conf \
- ceph-dencoder \
- ceph-rbdnamer \
- ceph-syn \
- cephfs-data-scan \
- cephfs-journal-tool \
- cephfs-table-tool \
- rados \
- rbd \
- rbd-replay \
- rbd-replay-many \
- rbdmap \
- ceph-post-file
- amove sbin/mount.ceph
- amove usr/share/ceph/*.ceph.com*
- amove etc/ceph/rbdmap
-
- _pkg "$(_py3_sitelib)" ceph_argparse.py* ceph_daemon.py*
+ amove usr/bin/ceph \
+ usr/bin/ceph-authtool \
+ usr/bin/ceph-conf \
+ usr/bin/ceph-rbdnamer \
+ usr/bin/rados \
+ usr/bin/rbd \
+ usr/bin/rbdmap \
+ sbin/mount.ceph \
+ usr/share/ceph/*.ceph.com* \
+ etc/ceph/rbdmap
+
+ amove "$(_py3_sitelib)"/ceph_argparse.py* "$(_py3_sitelib)"/ceph_daemon.py*
amove etc/udev/rules.d/50-rbd.rules
install -m 3770 -o $_ceph_uid -g $_ceph_gid -d \
@@ -371,36 +382,36 @@ mon_tools() {
ceph_fuse() {
pkgdesc="FUSE based client for Ceph distributed network file system."
depends=
- amove usr/bin/ceph-fuse
- amove sbin/mount.fuse.ceph
+
+ amove usr/bin/ceph-fuse sbin/mount.fuse.ceph
}
rbd_fuse() {
pkgdesc="FUSE based client to map Ceph rbd images to files."
depends=
+
amove usr/bin/rbd-fuse
}
rbd_mirror() {
pkgdesc="Daemon for mirroring RBD images between Ceph clusters."
depends="ceph-common=$pkgver-r$pkgrel"
+
amove usr/bin/rbd-mirror
}
rbd_nbd() {
pkgdesc="NBD based client to map Ceph rbd images to local device."
depends=
+
amove usr/bin/rbd-nbd
}
radosgw() {
pkgdesc="Rados REST gateway which implements Amazon's S3 and OpenStack's Swift APIs."
depends="ceph-common oath-toolkit-liboath"
- _pkg $_bindir radosgw \
- radosgw-admin \
- radosgw-es \
- radosgw-object-expirer \
- radosgw-token
+
+ amove usr/bin/radosgw*
mkdir -p "$subpkgdir"/var/lib/ceph/radosgw
}
@@ -417,10 +428,10 @@ osd_daemon() {
pkgdesc="Object storage daemon for the Ceph distributed file system."
depends="$_osd_daemon_deps $pkgname-user=$pkgver-r$pkgrel"
- amove usr/bin/ceph-osd
- amove usr/libexec/ceph/ceph-osd-prestart.sh
- amove etc/sudoers.d/ceph-osd-smartctl
- amove etc/sysctl.d/90-ceph-osd.conf
+ amove usr/bin/ceph-osd \
+ usr/libexec/ceph/ceph-osd-prestart.sh \
+ etc/sudoers.d/ceph-osd-smartctl \
+ etc/sysctl.d/90-ceph-osd.conf
install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
"$subpkgdir"/var/lib/ceph/osd
}
@@ -429,10 +440,7 @@ osd_tools() {
pkgdesc="Object storage daemon tools for the Ceph distributed file system."
depends="$pkgname-base=$pkgver-r$pkgrel $_osd_tools_deps"
- _pkg $_bindir ceph-clsinfo \
- ceph-bluestore-tool \
- ceph-objectstore-tool \
- ceph-osdomap-tool
+ amove usr/bin/ceph-clsinfo usr/bin/ceph-*-tool
install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
"$subpkgdir"/var/lib/ceph/osd
}
@@ -441,16 +449,15 @@ ceph_volume() {
pkgdesc="ceph-volume tool for the Ceph distributed file system."
depends="$_ceph_volume_deps"
- amove usr/sbin/ceph-volume
- amove "$(_py3_sitelib)"/ceph_volume
- amove "$(_py3_sitelib)"/ceph_volume-*
+ amove usr/sbin/ceph-volume \
+ "$(_py3_sitelib)"/ceph_volume "$(_py3_sitelib)"/ceph_volume-*
}
librados() {
pkgdesc="RADOS distributed object store client library"
depends=
- amove usr/lib/librados.so.*
- amove usr/lib/ceph/libceph-common.so.*
+
+ amove usr/lib/librados.so.* usr/lib/ceph/libceph-common.so.*
}
_py3_rados() {
@@ -470,6 +477,7 @@ libradosstriper() {
librbd() {
pkgdesc="RADOS block device client library"
depends=
+
amove usr/lib/librbd.so.*
}
@@ -483,6 +491,7 @@ _py3_rbd() {
libcephfs() {
pkgdesc="Ceph distributed file system client library"
depends=
+
amove usr/lib/libcephfs.so.*
}
@@ -490,20 +499,27 @@ _py3_cephfs() {
pkgdesc="Python libraries for Ceph distributed file system"
depends="py3-rados"
- amove "$(_py3_sitelib)"/cephfs*
- amove "$(_py3_sitelib)"/ceph_volume_client.py
+ amove "$(_py3_sitelib)"/cephfs* "$(_py3_sitelib)"/ceph_volume_client.py
}
utils() {
- pkgdesc="Ceph utils"
+ pkgdesc="Ceph utils and recovery tools"
depends="ceph-common=$pkgver-r$pkgrel"
- amove usr/bin/ceph-diff-sorted
+ amove usr/bin/ceph-diff-sorted \
+ usr/bin/ceph-post-file \
+ usr/bin/ceph-syn \
+ usr/bin/cephfs-data-scan \
+ usr/bin/ceph-dencoder \
+ usr/bin/cephfs-journal-tool \
+ usr/bin/cephfs-table-tool \
+ usr/bin/rbd-replay*
}
bash_completion() {
pkgdesc="Bash completions for Ceph"
depends=
+
install_if="ceph=$pkgver-r$pkgrel bash-completion"
amove etc/bash_completion.d/*
}
@@ -512,49 +528,33 @@ mgr() {
pkgdesc="Ceph Manager Daemon"
depends="ceph-base=$pkgver-r$pkgrel"
- amove usr/bin/ceph-mgr
- _pkg $_datadir/ceph mgr
+ amove usr/bin/ceph-mgr usr/share/ceph/mgr
install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
"$subpkgdir"/var/lib/ceph/mgr
}
-mgr_node() {
- pkgdesc="Ceph Manager NodeJS installed modules"
- depends="$pkgname-mgr=$pkgver-r$pkgrel nodejs npm"
- install="$subpkgname.post-install $subpkgname.post-deinstall"
-
- mkdir -p "$subpkgdir"/usr/share/ceph/mgr/dashboard/frontend
- cd "$subpkgdir"/usr/share/ceph/mgr/dashboard/frontend
- cp "$builddir"/src/pybind/mgr/dashboard/frontend/package*.json ./
- npm shrinkwrap
-}
-
-_pkg() {
- local path=$1
- shift
- if ! [ -d "$pkgdir"/$path ]; then
- error "$pkgdir/$path is not a directory"
- return 1
- fi
- mkdir -p "$subpkgdir"$path
- for _file in "$@"; do
- mv "$pkgdir"$path/$_file "$subpkgdir"$path
- done
-}
-
-sha512sums="aeb9a91c33221c64ea24603dc88cab346bf0abdf0d41ff85c2e1cf134130737ec1fab1246be0a2fa3af8a655ae1dabb69688855f229f54438e60cb8098175b8e ceph_16.2.0.orig.tar.gz
+sha512sums="
+5c32f9aa817ecfa788725bcfe5743756853ca9b3f9ee453242110f1b5e1bdd1feaef79ad9ccf2b185445c9644bcecb1355e151a2255bfd27edc9818e0d6d4c4a ceph_16.2.5.orig.tar.gz
110bdbcb40216c7ed155a8d23020784741b4992d895f4f04a146d275506e4e68053854d3b063b41e9c9b3e3e4f95b6b90602f92c185c853c0d8f47ad0c6b7121 ceph.confd
ce5f162501f6b67fe254546dddf880d1a5b1d1a0fa69e0b1918de17e8da45c5c6124512b8cbd98b76f29d931403de0d11c5ffd330ed8ee1f4dc75bb04baecae3 ceph.initd
-c608f11cf358d76daf5281467a4ea941a81474fbe7f5faa41f7f4d0abaf9136a01576bbb1ab24bdd7bc91a49f66bd7f0a84717de5ec27250d74dd1e47e3b5dd3 10-musl-fixes.patch
-427ab410aeb02d49c5caa8ff68c7b8df325229823d625b7069cd48c66dd9e129e742270850fb2be2238eb6fa12b8256845b4d94426ca96b2a9187b2726e78423 20-pci.patch
-10ba6f106b3a5f81a3b1852df106a043e83b239ff4d558abd1ff421c644df0f66e84c728cc623adf8708a735e284d0682cd5e6be5c7e60817de4e7571f6f3766 30-32bit_fix.patch.noauto
+94687578411bf0de1b17555ed81c188c88ea63ac4a25993bd8fde9cf68afbbfbdec7b2d7c54fdcfbd4aed4eb78754e8061c308955596cbe037ff15b575874cc6 10-musl-fixes.patch
+03ef3598181c45ecba5600a1e4db7fd897ea9d3c8abdfaad2dcf84c7a241d9ba18e7f7885d69ee0572ee307fc94600a2784a07da909d37a51de27f8ded2e3a70 20-pci.patch
+b879993a285a771c3640c5214ff70e8e01673c0c5e23a0f88ac70db168aeb1dd2eaed12805ed5076adae5a0f596abcb9d82220c6fd97643169cb92788898a189 30-32bit_fix.patch.noauto
+2eebc4501d40edf92c5302b25dea554807caba6abd22a3569d708db8a057085d74a3ecdac2adab54edb0619cf3d74884e1d44ef95d991a069dd473279819b974 30-cypress.patch.noauto
+01c446ac4528d8e12d3544f603ba32a0bf0d5a3a72f9f8f3726725f9d225ee447d2fea4ee2ddf10b36498cc01f2ecf51175dbfcc6376aac4c8002f52c6a04299 30-ubuntu-32bit-fixes.patch.noauto
f974ab36cd6fa49c1d4613203a4f2152723e4952a185dfb6349bc4ca8ee1a7a9d0477bea136c54248271de30a4e584734ba41e8ec41bf274b04074622888ae39 31-32bit_fix_tests.patch.noauto
-0ea07b5bf8aeb3e0bffc04bf1058af9db0e1e773922be348ebf79594d860a1e734897ef34af143790ef12c3dffa7588b63e94390a1c236b0da0ddf4c689c8dbd 32-cypress.patch.noauto
-8a3e902309238ae6917b4c5fe9fa371dad3ba8e01848f462a9b67ad8d69b8370a8957f6c88462a7016319fd323eb6d6c31415734db56485a8a8b279d2705aff5 35-fix_ErasureCodeShec.patch
-cdd7cd0853ad0804415335e0e0c7dc72098de07c769e05d785ac1ebce77311eed6c5ab795c58eededdfa2eaeaf39e9b83c733be2e476b687cadf89c1b5b24a27 37-fix_tests.patch
-985fbcfa83164fe6a5ea517be2a5529eeb9a061bf38ddbc4fa3e8363d0b88f93b00fd1b638344991e2cc6cb52392f02c55690949de38211d541366fd0bce7401 42-no-virtualenvs.patch
+964e7ca107cc731be2be7bf6813aca760ca1c6e6f6b3748103c1e6baef4d25e41442752a72f5e5daed2b1c6c4f96c9aebbb7114247e8a5047511fbd035767aeb 32-PurgeQueue.cc-cast.patch
+fb69f1c886f3cc05a10dd8722429c6bdc840674113e83cf3592caf75b5d4082e5bdaea73426b28edbde724c4973775f2109a3eb4e0a84384fa8083621d463fbd 32-upstream32bit.patch
+73326b47deb0967ff024731c28a956ca63800ffcbfa36c6351c157328d2036b3f8406368cc7c7e087841e144b32889f27d807f3405ac1c5a1c2daf6bd7ca5338 32-upstream32bitcleanup.patch
+abb3cab9c01cc3d6d42a9858678059a8c9c43bda2649bf97b489fdc205eb10ae27f9fb7302062e0fb41f5cffddbfc2ae529130569034f373732a0a5d33aba86e 35-fix_ErasureCodeShec.patch
+908169df45177240d2dcc721fe1637c521789aed56c3b3400ed3ba9c73d93634e4369258fb0e0395dc27053be26229ee8f370e445f0e69d01f551a710a29d407 37-fix_tests.patch
+2584ceb68b50423fac386ce83ad194f22aa574e11b99916e712471bacba28486d2639a8fe63d97c5697f33270c0de99db1f0e76eb43b14cc47c6de7da6903fde 42-no-virtualenvs.patch
aea43c2a99f16f7fccf33aeca3565077bb2274816ca68db64b672addc85bde5c479bc9ad0fb33dbde79c9390f9acf1d98545e20e311e40dd428dad5ed02f0651 43-aarch64-erasure.patch
+741a0f83ecf1a8298bcc8cb8ab9f25f6d27cfe69367150a8821fde445efe20a255b3f1296dc92003a2956475e3f15f3d0ac920be280dd03ac3f311c754dbb890 44-cmake-buildtype.patch
e47d736d3ab1417758fc5f92798a77272b978799e6d9f0728b2036d6cc5975c6c10f8dc4590c2e1cb31e1e9fc03c582394b30727e315a6889de524fc8bf95369 44-LogClock.h.patch
-125627c9ce4d5c0be1cd9e371c7ac0ad9ffd3fc0ccc0290b2c3ff4cc9c8f8b3c2a5e96bf9eaf0de2426e5b05d5f221ec5e7b5d1ef0b085b56da45f664955f2c9 44-missing-include.patch
-f89c913a53e2806c59508d26f5dc72abb428c7e4e3b7c1aeb6eaf92744ea9a13cac2f00a2ac90f91ad7682f66d876a5fffedd10feeceecd71a944793581da443 44-staticcast.patch"
+f89c913a53e2806c59508d26f5dc72abb428c7e4e3b7c1aeb6eaf92744ea9a13cac2f00a2ac90f91ad7682f66d876a5fffedd10feeceecd71a944793581da443 44-staticcast.patch
+85d0009b0d1442af81d115402cdbd17667d85314030e1748a4656c1ee798b02efdcff41ccb374a6b63f7bf012bf1756b61e75c5d2b6399c329a6e62024ad0011 44-node_modules.patch
+b95ec157f9c77177afd3deb8e3485bb5f10e1b634a15617d14e09b08d6680d32201ecb249ea5ea98127a312e1fdb22fdbe9f0216690291a2849419aa7ab81610 44-missing-include.patch
+8269647901e2c10d2e85668abb34f44a0b394460fb89e4eeb6dbf3eb964764a9e4b56b1ec90ab07da428ae33ad3147ea51830fdd83654e1b8b4c179db90b5e1f 44-missing-include2.patch
+"
diff --git a/community/ceph/ceph-mgr-node.post-deinstall b/community/ceph/ceph-mgr-node.post-deinstall
deleted file mode 100644
index 17955c8c04..0000000000
--- a/community/ceph/ceph-mgr-node.post-deinstall
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -rf /usr/share/ceph/mgr/dashboard/frontend/node_modules
-exit 0
diff --git a/community/ceph/ceph-mgr-node.post-install b/community/ceph/ceph-mgr-node.post-install
deleted file mode 100644
index e3de2749e1..0000000000
--- a/community/ceph/ceph-mgr-node.post-install
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/ceph/mgr/dashboard/frontend
-NG_CLI_ANALYTICS=false npm ci --userconfig "$(pwd)"/.npmrc --only=prod
-exit 0