diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:29 +0000 |
commit | df4528d6668ab18e40584fe540355bdfba0fb6dd (patch) | |
tree | f1bfdcb6485edff853369405dd5423c662c47345 /debian/patches | |
parent | Adding upstream version 14.2.21. (diff) | |
download | ceph-df4528d6668ab18e40584fe540355bdfba0fb6dd.tar.xz ceph-df4528d6668ab18e40584fe540355bdfba0fb6dd.zip |
Adding debian version 14.2.21-1.debian/14.2.21-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches')
20 files changed, 634 insertions, 0 deletions
diff --git a/debian/patches/32bit-avoid-overloading.patch b/debian/patches/32bit-avoid-overloading.patch new file mode 100644 index 00000000..7d906caf --- /dev/null +++ b/debian/patches/32bit-avoid-overloading.patch @@ -0,0 +1,23 @@ +Description: Avoid overloading on 32 bit architectures + unsigned and size_t are equivalent on 32 bit architectures, + so only define the size_t based overload of advance on 64 + bit architectures. + https://wiki.debian.org/ArchitectureSpecificsMemo +Author: James Page <james.page@ubuntu.com>, Bernd Zeimetz <bzed@debian.org> +Forwarded: no + +--- a/src/include/buffer.h ++++ b/src/include/buffer.h +@@ -737,7 +737,12 @@ inline namespace v14_2_0 { + + void advance(int o) = delete; + void advance(unsigned o); ++ ++// unsigned and size_t are equivalent on 32bit architectures. ++// so casting is only needed when not on 32bit. ++#if defined(UINTPTR_MAX) && UINTPTR_MAX > 0xffffffff + void advance(size_t o) { advance(static_cast<unsigned>(o)); } ++#endif + void seek(unsigned o); + char operator*() const; + iterator_impl& operator++(); diff --git a/debian/patches/32bit-avoid-size_t.patch b/debian/patches/32bit-avoid-size_t.patch new file mode 100644 index 00000000..1917577c --- /dev/null +++ b/debian/patches/32bit-avoid-size_t.patch @@ -0,0 +1,112 @@ +Description: Avoid use of size_t when necessary + On 32 bit architectures size_t is not a 64 bit type, which + causes comparison mismatch failures during compilation. +Author: James Page <james.page@ubuntu.com>, Bernd Zeimetz <bzed@debian.org> +Forwarded: no + +Index: ceph/src/osd/PrimaryLogPG.cc +=================================================================== +--- ceph.orig/src/osd/PrimaryLogPG.cc ++++ ceph/src/osd/PrimaryLogPG.cc +@@ -1611,7 +1611,7 @@ int PrimaryLogPG::do_scrub_ls(MOSDOp *m, + + void PrimaryLogPG::calc_trim_to() + { +- size_t target = cct->_conf->osd_min_pg_log_entries; ++ uint64_t target = cct->_conf->osd_min_pg_log_entries; + if (is_degraded() || + state_test(PG_STATE_RECOVERING | + PG_STATE_RECOVERY_WAIT | +@@ -1627,15 +1627,15 @@ 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); ++ uint64_t num_to_trim = std::min(pg_log.get_log().approx_size() - target, ++ 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; + } + list<pg_log_entry_t>::const_iterator it = pg_log.get_log().log.begin(); + eversion_t new_trim_to; +- for (size_t i = 0; i < num_to_trim; ++i) { ++ for (uint64_t i = 0; i < num_to_trim; ++i) { + new_trim_to = it->version; + ++it; + if (new_trim_to > limit) { +Index: ceph/src/os/bluestore/BlueFS.h +=================================================================== +--- ceph.orig/src/os/bluestore/BlueFS.h ++++ ceph/src/os/bluestore/BlueFS.h +@@ -72,7 +72,7 @@ public: + * @params + * alloc_size - allocation unit size to check + */ +- virtual size_t available_freespace(uint64_t alloc_size) = 0; ++ virtual uint64_t available_freespace(uint64_t alloc_size) = 0; + }; + + class BlueFSVolumeSelector { +Index: ceph/src/os/bluestore/BlueStore.cc +=================================================================== +--- ceph.orig/src/os/bluestore/BlueStore.cc ++++ ceph/src/os/bluestore/BlueStore.cc +@@ -5930,12 +5930,12 @@ int BlueStore::allocate_bluefs_freespace + return 0; + } + +-size_t BlueStore::available_freespace(uint64_t alloc_size) { +- size_t total = 0; +- auto iterated_allocation = [&](size_t off, size_t len) { ++uint64_t BlueStore::available_freespace(uint64_t alloc_size) { ++ 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 +Index: ceph/src/os/bluestore/BlueStore.h +=================================================================== +--- ceph.orig/src/os/bluestore/BlueStore.h ++++ ceph/src/os/bluestore/BlueStore.h +@@ -3107,7 +3107,7 @@ private: + PExtentVector& extents) override { + return allocate_bluefs_freespace(min_size, size, &extents); + }; +- size_t available_freespace(uint64_t alloc_size) override; ++ uint64_t available_freespace(uint64_t alloc_size) override; + + public: + struct sb_info_t { +Index: ceph/src/common/config_values.h +=================================================================== +--- ceph.orig/src/common/config_values.h ++++ ceph/src/common/config_values.h +@@ -50,7 +50,7 @@ public: + #define OPTION_OPT_U32(name) uint64_t name; + #define OPTION_OPT_U64(name) uint64_t name; + #define OPTION_OPT_UUID(name) uuid_d name; +-#define OPTION_OPT_SIZE(name) size_t name; ++#define OPTION_OPT_SIZE(name) uint64_t name; + #define OPTION(name, ty) \ + public: \ + OPTION_##ty(name) +Index: ceph/src/common/options.cc +=================================================================== +--- ceph.orig/src/common/options.cc ++++ ceph/src/common/options.cc +@@ -189,7 +189,7 @@ int Option::parse_value( + } + *out = uuid; + } else if (type == Option::TYPE_SIZE) { +- Option::size_t sz{strict_iecstrtoll(val.c_str(), error_message)}; ++ Option::size_t sz{static_cast<std::size_t>(strict_iecstrtoll(val.c_str(), error_message))}; + if (!error_message->empty()) { + return -EINVAL; + } diff --git a/debian/patches/add-option-to-disable-ceph-dencoder.patch b/debian/patches/add-option-to-disable-ceph-dencoder.patch new file mode 100644 index 00000000..a9cf2057 --- /dev/null +++ b/debian/patches/add-option-to-disable-ceph-dencoder.patch @@ -0,0 +1,11 @@ +Index: ceph/src/tools/CMakeLists.txt +=================================================================== +--- ceph.orig/src/tools/CMakeLists.txt ++++ ceph/src/tools/CMakeLists.txt +@@ -126,4 +126,6 @@ if(WITH_RBD) + endif() + endif(WITH_RBD) + ++if(NOT DISABLE_DENCODER) + add_subdirectory(ceph-dencoder) ++endif(DISABLE_DENCODER) diff --git a/debian/patches/allow-bgp-to-host.patch b/debian/patches/allow-bgp-to-host.patch new file mode 100644 index 00000000..6c76dda3 --- /dev/null +++ b/debian/patches/allow-bgp-to-host.patch @@ -0,0 +1,18 @@ +Description: allow BGP-to-the-host style binding +Author: Thomas Goirand +Forwarded: no +Last-Update: 2021-04-21 + +diff --git a/src/common/ipaddr.cc b/src/common/ipaddr.cc +index 0abf7f20ca..ce81e7e735 100644 +--- a/src/common/ipaddr.cc ++++ b/src/common/ipaddr.cc +@@ -56,7 +56,7 @@ const struct ifaddrs *find_ipv4_in_subnet(const struct ifaddrs *addrs, + if (addrs->ifa_addr == NULL) + continue; + +- if (strcmp(addrs->ifa_name, "lo") == 0 || boost::starts_with(addrs->ifa_name, "lo:")) ++ if (boost::starts_with(addrs->ifa_name, "lo:")) + continue; + + if (numa_node >= 0 && !match_numa_node(addrs->ifa_name, numa_node)) diff --git a/debian/patches/another-cmakelists-fix.patch b/debian/patches/another-cmakelists-fix.patch new file mode 100644 index 00000000..75abf233 --- /dev/null +++ b/debian/patches/another-cmakelists-fix.patch @@ -0,0 +1,35 @@ +Description: Another cmakelists fix + This fixes the last Boost 1.74 compatibility problems. +Author: Thomas Goirand <zigo@debian.org> +Forwarded: no +Last-Update: 2021-01-08 + +Index: ceph/CMakeLists.txt +=================================================================== +--- ceph.orig/CMakeLists.txt ++++ ceph/CMakeLists.txt +@@ -30,6 +30,9 @@ endif() + if(POLICY CMP0093) + cmake_policy(SET CMP0093 NEW) + endif() ++if(POLICY CMP0093) ++ cmake_policy(SET CMP0093 NEW) ++endif() + list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/") + + if(CMAKE_SYSTEM_NAME MATCHES "Linux") +Index: ceph/src/rgw/CMakeLists.txt +=================================================================== +--- ceph.orig/src/rgw/CMakeLists.txt ++++ ceph/src/rgw/CMakeLists.txt +@@ -23,6 +23,10 @@ if(Boost_VERSION VERSION_GREATER 1.73) + add_definitions(-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + endif() + ++if(Boost_VERSION VERSION_GREATER_EQUAL 1.74) ++ add_definitions(-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) ++endif() ++ + set(librgw_common_srcs + services/svc_finisher.cc + services/svc_notify.cc diff --git a/debian/patches/bluefs-use-uint64_t-for-len.patch b/debian/patches/bluefs-use-uint64_t-for-len.patch new file mode 100644 index 00000000..fb629b88 --- /dev/null +++ b/debian/patches/bluefs-use-uint64_t-for-len.patch @@ -0,0 +1,58 @@ +From 10a953afc8f803e50c96354470fb114b33e62599 Mon Sep 17 00:00:00 2001 +From: Kefu Chai <kchai@redhat.com> +Date: Fri, 28 Jun 2019 11:35:54 +0800 +Subject: [PATCH] os/bluestore/BlueFS: use uint64_t for `len` + +change the type of parameter `len` of `BlueFS::_read_random()` from +`size_t` to `uint64_t`. + +i think the type of `size_t` comes from +`rocksdb::RandomAccessFile::Read(uint64_t offset, size_t n, +rocksdb::Slice* result, char* scratch)`. and when we implement this +method, we continued using `n`'s type. but, we are using it with +`std::min()`, for instance, where the template parameter type deduction +fails if the lhs and rhs parameters' types are different. so probaly the +better solution is to use `uint64_t` directly to avoid the the cast and +specializing the template. + +Signed-off-by: Kefu Chai <kchai@redhat.com> +--- + src/os/bluestore/BlueFS.cc | 4 ++-- + src/os/bluestore/BlueFS.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +Index: ceph/src/os/bluestore/BlueFS.cc +=================================================================== +--- ceph.orig/src/os/bluestore/BlueFS.cc ++++ ceph/src/os/bluestore/BlueFS.cc +@@ -1678,7 +1678,7 @@ void BlueFS::_drop_link(FileRef file) + int64_t BlueFS::_read_random( + FileReader *h, ///< [in] read from here + uint64_t off, ///< [in] offset +- size_t len, ///< [in] this many bytes ++ uint64_t len, ///< [in] this many bytes + char *out) ///< [out] optional: or copy it here + { + auto* buf = &h->buf; +@@ -1710,7 +1710,7 @@ int64_t BlueFS::_read_random( + uint64_t x_off = 0; + auto p = h->file->fnode.seek(off, &x_off); + ceph_assert(p != h->file->fnode.extents.end()); +- uint64_t l = std::min(p->length - x_off, static_cast<uint64_t>(len)); ++ uint64_t l = std::min(p->length - x_off, len); + //hard cap to 1GB + l = std::min(l, uint64_t(1) << 30); + dout(20) << __func__ << " read random 0x" +Index: ceph/src/os/bluestore/BlueFS.h +=================================================================== +--- ceph.orig/src/os/bluestore/BlueFS.h ++++ ceph/src/os/bluestore/BlueFS.h +@@ -422,7 +422,7 @@ private: + int64_t _read_random( + FileReader *h, ///< [in] read from here + uint64_t offset, ///< [in] offset +- size_t len, ///< [in] this many bytes ++ uint64_t len, ///< [in] this many bytes + char *out); ///< [out] optional: or copy it here + + void _invalidate_cache(FileRef f, uint64_t offset, uint64_t length); diff --git a/debian/patches/civetweb-755-1.8-somaxconn-configurable.patch b/debian/patches/civetweb-755-1.8-somaxconn-configurable.patch new file mode 100644 index 00000000..8313b3ec --- /dev/null +++ b/debian/patches/civetweb-755-1.8-somaxconn-configurable.patch @@ -0,0 +1,53 @@ +Description: Makes SOMAXCONN user-configurable. +Author: Jesse Williamson <jesse.williamson@canonical.com> +Origin: upstream, https://github.com/civetweb/civetweb/pull/776/commits/febab7dc38c9671577603425c54c20f841e27f97 +Bug: https://github.com/civetweb/civetweb/issues/775 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1838109 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/civetweb/src/civetweb.c ++++ b/src/civetweb/src/civetweb.c +@@ -1541,10 +1541,6 @@ typedef int socklen_t; + #define MSG_NOSIGNAL (0) + #endif + +-#if !defined(SOMAXCONN) +-#define SOMAXCONN (100) +-#endif +- + /* Size of the accepted socket queue */ + #if !defined(MGSQLEN) + #define MGSQLEN (20) +@@ -2063,6 +2059,7 @@ enum { + SSL_CERTIFICATE, + SSL_CERTIFICATE_CHAIN, + NUM_THREADS, ++ SO_MAX_CONNECTIONS, + RUN_AS_USER, + URL_REWRITE_PATTERN, + HIDE_FILES, +@@ -2165,6 +2162,7 @@ static struct mg_option config_options[] + {"ssl_certificate", CONFIG_TYPE_FILE, NULL}, + {"ssl_certificate_chain", CONFIG_TYPE_FILE, NULL}, + {"num_threads", CONFIG_TYPE_NUMBER, "50"}, ++ {"max_connections", CONFIG_TYPE_NUMBER, "100"}, + {"run_as_user", CONFIG_TYPE_STRING, NULL}, + {"url_rewrite_patterns", CONFIG_TYPE_STRING_LIST, NULL}, + {"hide_files_patterns", CONFIG_TYPE_EXT_PATTERN, NULL}, +@@ -13340,7 +13338,15 @@ set_ports_option(struct mg_context *ctx) + continue; + } + +- if (listen(so.sock, SOMAXCONN) != 0) { ++ char *p = ctx->config[SO_MAX_CONNECTIONS]; ++ long opt_max_connections = strtol(p, NULL, 10); ++ if(opt_max_connections > INT_MAX || opt_max_connections < 1) { ++ mg_cry(fc(ctx), ++ "max_connections value \"%s\" is invalid", p); ++ continue; ++ } ++ ++ if (listen(so.sock, (int)opt_max_connections) != 0) { + + mg_cry(fc(ctx), + "cannot listen to %.*s: %d (%s)", diff --git a/debian/patches/civetweb-755-1.8-somaxconn-configurable_conf.patch b/debian/patches/civetweb-755-1.8-somaxconn-configurable_conf.patch new file mode 100644 index 00000000..e8e3b0b0 --- /dev/null +++ b/debian/patches/civetweb-755-1.8-somaxconn-configurable_conf.patch @@ -0,0 +1,18 @@ +Description: Adds max_connections to reference configuration. +Author: Jesse Williamson <jesse.williamson@canonical.com> +Origin: upstream, https://github.com/civetweb/civetweb/pull/776/commits/3b8eb36676f70d06f8918ccf62029207c49cdda0 +Bug: https://github.com/civetweb/civetweb/issues/775 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1838109 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/civetweb/resources/civetweb.conf ++++ b/src/civetweb/resources/civetweb.conf +@@ -8,6 +8,8 @@ + document_root . + listening_ports 8080 + ++#so_max_connections 100 ++ + # cgi_pattern **.cgi$|**.pl$|**.php$ + # cgi_environment + # put_delete_auth_file diff --git a/debian/patches/civetweb-755-1.8-somaxconn-configurable_test.patch b/debian/patches/civetweb-755-1.8-somaxconn-configurable_test.patch new file mode 100644 index 00000000..cdd27b5a --- /dev/null +++ b/debian/patches/civetweb-755-1.8-somaxconn-configurable_test.patch @@ -0,0 +1,17 @@ +Description: Adds max_connections to test display. +Author: Jesse Williamson <jesse.williamson@canonical.com> +Origin: upstream, https://github.com/civetweb/civetweb/pull/776/commits/3b8eb36676f70d06f8918ccf62029207c49cdda0 +Bug: https://github.com/civetweb/civetweb/issues/775 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1838109 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/civetweb/test/page3.ssjs ++++ b/src/civetweb/test/page3.ssjs +@@ -21,6 +21,7 @@ opts = [ + "document_root", + "ssl_certificate", + "num_threads", ++"max_connections", + "run_as_user", + "url_rewrite_patterns", + "hide_files_patterns", diff --git a/debian/patches/cmake_add_1.74_to_known_versions.patch b/debian/patches/cmake_add_1.74_to_known_versions.patch new file mode 100644 index 00000000..00478891 --- /dev/null +++ b/debian/patches/cmake_add_1.74_to_known_versions.patch @@ -0,0 +1,52 @@ +Description: cmake: add 1.74 to known versions +Author: Kefu Chai <kchai@redhat.com> +Bug-Debian: https://bugs.debian.org/977243 +Origin: upstream, https://github.com/ceph/ceph/commit/b6a94da6149e50bdd43752919d7c01b04c59f79e.patch +Last-Update: 2020-12-13 + +--- ceph-14.2.15.orig/cmake/modules/FindBoost.cmake ++++ ceph-14.2.15/cmake/modules/FindBoost.cmake +@@ -437,10 +437,23 @@ if (NOT Boost_NO_BOOST_CMAKE) + endif() + endif() + ++ set(_boost_FIND_PACKAGE_ARGS "") ++ if(Boost_NO_SYSTEM_PATHS) ++ list(APPEND _boost_FIND_PACKAGE_ARGS NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) ++ endif() ++ + # Do the same find_package call but look specifically for the CMake version. + # Note that args are passed in the Boost_FIND_xxxxx variables, so there is no + # need to delegate them to this find_package call. +- find_package(Boost QUIET NO_MODULE) ++ cmake_policy(PUSH) ++ if(BOOST_ROOT AND NOT Boost_ROOT) ++ if(POLICY CMP0074) ++ cmake_policy(SET CMP0074 NEW) ++ endif() ++ set(Boost_ROOT "${BOOST_ROOT}") ++ endif() ++ find_package(Boost QUIET NO_MODULE ${_boost_FIND_PACKAGE_ARGS}) ++ cmake_policy(POP) + mark_as_advanced(Boost_DIR) + + # If we found a boost cmake package, then we're done. Print out what we found. +@@ -1157,7 +1170,7 @@ function(_Boost_COMPONENT_DEPENDENCIES c + set(_Boost_TIMER_DEPENDENCIES chrono) + set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) +- if(NOT Boost_VERSION_STRING VERSION_LESS 1.73.0) ++ if(NOT Boost_VERSION_STRING VERSION_LESS 1.75.0) + message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets") + endif() + endif() +@@ -1429,7 +1442,8 @@ else() + # _Boost_COMPONENT_HEADERS. See the instructions at the top of + # _Boost_COMPONENT_DEPENDENCIES. + set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} +- "1.72.0" "1.72" "1.71.0" "1.71" "1.70.0" "1.70" "1.69.0" "1.69" ++ "1.74.0" "1.74" ++ "1.73.0" "1.73" "1.72.0" "1.72" "1.71.0" "1.71" "1.70.0" "1.70" "1.69.0" "1.69" + "1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65" + "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" + "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" diff --git a/debian/patches/cmake_define_BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT_for_Boost.Asio_users.patch b/debian/patches/cmake_define_BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT_for_Boost.Asio_users.patch new file mode 100644 index 00000000..2c792ce6 --- /dev/null +++ b/debian/patches/cmake_define_BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT_for_Boost.Asio_users.patch @@ -0,0 +1,30 @@ +Description: cmake: define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT for + Boost.Asio users + . + see also + https://www.boost.org/doc/libs/1_74_0/doc/html/boost_asio/std_executors.html#boost_asio.std_executors.polymorphic_i_o_executor + . + we could use `asio::any_io_executor` later on though for better + performance. + . + also, define CMP0093, so FindBoost reports Boost_VERSION in x.y.z + format. it is simpler to use `VERSION_GREATER_EQUAL` to compare its + version with 1.74 instead of its C macro version ("107000"). +Signed-off-by: Kefu Chai <kchai@redhat.com> +Author: Kefu Chai <kchai@redhat.com> +Origin: upstream, https://github.com/ceph/ceph/commit/3d708219092d0e89a1434c30ffc8a4999f062cc0.patch +Bug-Debian: https://bugs.debian.org/977243 +Last-Update: 2021-03-24 + +--- ceph-14.2.15.orig/CMakeLists.txt 2020-12-14 09:42:50.543215302 +0100 ++++ ceph-14.2.15/CMakeLists.txt 2020-12-14 09:44:07.827084724 +0100 +@@ -21,6 +21,9 @@ + if(POLICY CMP0051) + cmake_policy(SET CMP0051 NEW) + endif() ++if(POLICY CMP0074) ++ cmake_policy(SET CMP0074 NEW) ++endif() + if(POLICY CMP0075) + cmake_policy(SET CMP0075 NEW) + endif() diff --git a/debian/patches/debian-armel-armhf-buildflags.patch b/debian/patches/debian-armel-armhf-buildflags.patch new file mode 100644 index 00000000..e9a450aa --- /dev/null +++ b/debian/patches/debian-armel-armhf-buildflags.patch @@ -0,0 +1,45 @@ +--- a/cmake/modules/SIMDExt.cmake ++++ b/cmake/modules/SIMDExt.cmake +@@ -40,11 +40,14 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch + + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|ARM") + set(HAVE_ARM 1) +- CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_ARM_NEON) +- if(HAVE_ARM_NEON) +- set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mfpu=neon") ++ if(CMAKE_LIBRARY_ARCHITECTURE EQUAL "arm-linux-gnueabi") ++ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} --with-arch=armv5te --with-float=soft") ++ else() ++ CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_ARM_NEON) ++ if(HAVE_ARM_NEON) ++ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mfpu=neon") ++ endif() + endif() +- + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64") + set(HAVE_INTEL 1) + if(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64") +--- a/src/erasure-code/jerasure/gf-complete/m4/ax_ext.m4 ++++ b/src/erasure-code/jerasure/gf-complete/m4/ax_ext.m4 +@@ -19,10 +19,17 @@ AC_DEFUN([AX_EXT], + ;; + + arm*) +- AC_CACHE_CHECK([whether NEON is enabled], [ax_cv_have_neon_ext], [ax_cv_have_neon_ext=yes]) +- if test "$ax_cv_have_neon_ext" = yes; then +- AX_CHECK_COMPILE_FLAG(-mfpu=neon, [SIMD_FLAGS="$SIMD_FLAGS -mfpu=neon -DARM_NEON"], [ax_cv_have_neon_ext=no]) +- fi ++ case $host_cpu in ++ arm-linux-gnueabi) ++ AX_CHECK_COMPILE_FLAG(-mfpu=soft, [SIMD_FLAGS="$SIMD_FLAGS -mfpu=soft -march=armv5te"], [ax_cv_have_neon_ext=no]) ++ ;; ++ *) ++ AC_CACHE_CHECK([whether NEON is enabled], [ax_cv_have_neon_ext], [ax_cv_have_neon_ext=yes]) ++ if test "$ax_cv_have_neon_ext" = yes; then ++ AX_CHECK_COMPILE_FLAG(-mfpu=neon, [SIMD_FLAGS="$SIMD_FLAGS -mfpu=neon -DARM_NEON"], [ax_cv_have_neon_ext=no]) ++ fi ++ ;; ++ esac + ;; + + powerpc*) diff --git a/debian/patches/disable-crypto.patch b/debian/patches/disable-crypto.patch new file mode 100644 index 00000000..7cd12682 --- /dev/null +++ b/debian/patches/disable-crypto.patch @@ -0,0 +1,16 @@ +Index: ceph/src/os/CMakeLists.txt +=================================================================== +--- ceph.orig/src/os/CMakeLists.txt ++++ ceph/src/os/CMakeLists.txt +@@ -110,8 +110,9 @@ endif() + target_link_libraries(os kv) + + add_dependencies(os compressor_plugins) +-add_dependencies(os crypto_plugins) +- ++if(HAVE_INTEL AND HAVE_BETTER_YASM_ELF64 AND (NOT APPLE)) ++ add_dependencies(os crypto_plugins) ++endif() + + if(WITH_BLUESTORE) + add_executable(ceph-bluestore-tool diff --git a/debian/patches/fix-bash-completion-location b/debian/patches/fix-bash-completion-location new file mode 100644 index 00000000..916ff8a7 --- /dev/null +++ b/debian/patches/fix-bash-completion-location @@ -0,0 +1,9 @@ +--- a/src/bash_completion/CMakeLists.txt ++++ b/src/bash_completion/CMakeLists.txt +@@ -11,5 +11,5 @@ if(WITH_RADOSGW) + endif() + + install(FILES ${completions} +- DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/bash_completion.d) ++ DESTINATION /usr/share/bash-completion/completions) + diff --git a/debian/patches/fix-ceph-osd-systemd-target.patch b/debian/patches/fix-ceph-osd-systemd-target.patch new file mode 100644 index 00000000..9f42077b --- /dev/null +++ b/debian/patches/fix-ceph-osd-systemd-target.patch @@ -0,0 +1,17 @@ +Description: Fix systemd ceph-osd.target + This helps when rebooting. +Author: Thomas Goirand <zigo@debian.org> +Forwarded: no +Last-Update: 2021-01-28 + +--- ceph-14.2.16.orig/systemd/ceph-osd.target ++++ ceph-14.2.16/systemd/ceph-osd.target +@@ -1,7 +1,7 @@ + [Unit] + Description=ceph target allowing to start/stop all ceph-osd@.service instances at once + PartOf=ceph.target +-After=ceph-mon.target ++After=ceph-mon.target systemd-udev-settle.service + Before=ceph.target + Wants=ceph.target ceph-mon.target + diff --git a/debian/patches/make-ceph-python-3.9-aware.patch b/debian/patches/make-ceph-python-3.9-aware.patch new file mode 100644 index 00000000..67e55ea7 --- /dev/null +++ b/debian/patches/make-ceph-python-3.9-aware.patch @@ -0,0 +1,28 @@ +Description: Make Ceph Python 3.9 aware + Add versions of interpreters Ceph didn't know about. +Author: Thomas Goirand <zigo@debian.org> +Forwarded: no +Last-Update: 2020-11-28 + +--- ceph-14.2.15.orig/cmake/modules/FindPython3Interp.cmake ++++ ceph-14.2.15/cmake/modules/FindPython3Interp.cmake +@@ -69,7 +69,7 @@ + + unset(_Python3_NAMES) + +-set(_PYTHON3_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0) ++set(_PYTHON3_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) + + if(Python3Interp_FIND_VERSION) + if(Python3Interp_FIND_VERSION_COUNT GREATER 1) +--- ceph-14.2.15.orig/cmake/modules/FindPython3Libs.cmake ++++ ceph-14.2.15/cmake/modules/FindPython3Libs.cmake +@@ -101,7 +101,7 @@ endif() + # To avoid picking up the system Python.h pre-maturely. + set(CMAKE_FIND_FRAMEWORK LAST) + +-set(_PYTHON3_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0) ++set(_PYTHON3_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) + + if(Python3Libs_FIND_VERSION) + if(Python3Libs_FIND_VERSION_COUNT GREATER 1) diff --git a/debian/patches/mds-purgequeue-use_uint64_t.patch b/debian/patches/mds-purgequeue-use_uint64_t.patch new file mode 100644 index 00000000..8797da21 --- /dev/null +++ b/debian/patches/mds-purgequeue-use_uint64_t.patch @@ -0,0 +1,31 @@ +Index: ceph/src/mds/PurgeQueue.cc +=================================================================== +--- ceph.orig/src/mds/PurgeQueue.cc ++++ ceph/src/mds/PurgeQueue.cc +@@ -499,7 +499,7 @@ 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, in_flight.size()); ++ files_high_water = std::max(files_high_water, static_cast<uint64_t>(in_flight.size())); + logger->set(l_pq_executing_high_water, files_high_water); + auto ops = _calculate_ops(item); + ops_in_flight += ops; +@@ -577,7 +577,7 @@ 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, in_flight.size()); ++ files_high_water = std::max(files_high_water, static_cast<uint64_t>(in_flight.size())); + logger->set(l_pq_executing_high_water, files_high_water); + return; + } +@@ -654,7 +654,7 @@ 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, in_flight.size()); ++ files_high_water = std::max(files_high_water, static_cast<uint64_t>(in_flight.size())); + logger->set(l_pq_executing_high_water, files_high_water); + dout(10) << "in_flight.size() now " << in_flight.size() << dendl; + diff --git a/debian/patches/riscv64-link-pthread.patch b/debian/patches/riscv64-link-pthread.patch new file mode 100644 index 00000000..5d4a72d4 --- /dev/null +++ b/debian/patches/riscv64-link-pthread.patch @@ -0,0 +1,16 @@ +Description: Link with -pthread instead of -lpthread to fix FTBFS on riscv64 +Forwarded: no +Last-Update: 2020-03-01 + +Index: ceph/CMakeLists.txt +=================================================================== +--- ceph.orig/CMakeLists.txt ++++ ceph/CMakeLists.txt +@@ -31,6 +31,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_S + + if(CMAKE_SYSTEM_NAME MATCHES "Linux") + set(LINUX ON) ++ set(THREADS_PREFER_PTHREAD_FLAG ON) + FIND_PACKAGE(Threads) + elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + set(FREEBSD ON) diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..3d2eab5b --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,22 @@ +update-java-source-target-flags.patch +disable-crypto.patch +32bit-avoid-overloading.patch +32bit-avoid-size_t.patch +# Ubuntu: civetweb max connections +civetweb-755-1.8-somaxconn-configurable_conf.patch +civetweb-755-1.8-somaxconn-configurable.patch +civetweb-755-1.8-somaxconn-configurable_test.patch +# Upstream: py3 +# Upstream: 32bit +bluefs-use-uint64_t-for-len.patch +debian-armel-armhf-buildflags.patch +fix-bash-completion-location +add-option-to-disable-ceph-dencoder.patch +riscv64-link-pthread.patch +mds-purgequeue-use_uint64_t.patch +make-ceph-python-3.9-aware.patch +cmake_define_BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT_for_Boost.Asio_users.patch +cmake_add_1.74_to_known_versions.patch +another-cmakelists-fix.patch +fix-ceph-osd-systemd-target.patch +allow-bgp-to-host.patch diff --git a/debian/patches/update-java-source-target-flags.patch b/debian/patches/update-java-source-target-flags.patch new file mode 100644 index 00000000..6c8b7922 --- /dev/null +++ b/debian/patches/update-java-source-target-flags.patch @@ -0,0 +1,23 @@ +Description: use --release 7 instead of -source/-target + Instead of -source/-target ceph should be build with --release for OpenJDK 9 + or later so that the bootclasspath is also set, as per JEP-247, otherwise it + risks incurring into binary incompatibility when run with an earlier OpenJDK. + OpenJDK 11 minimum compatibility release has been updated to 7. +Author: Tiago Stürmer Daitx <tiago.daitx@ubuntu.com> +Bug-Ubuntu: https://launchpad.net/bugs/1756854 +Bug-Ubuntu: https://launchpad.net/bugs/1766998 +Forwarded: no +Last-Update: 2018-04-24 +--- + +--- a/src/java/CMakeLists.txt ++++ b/src/java/CMakeLists.txt +@@ -21,7 +21,7 @@ set(java_srcs + # warning: [options] bootstrap class path not set in conjunction with -source 1.7 + # as per + # https://blogs.oracle.com/darcy/entry/bootclasspath_older_source +-set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.8" "-target" "1.8" "-Xlint:-options") ++set(CMAKE_JAVA_COMPILE_FLAGS "--release" "7" "-Xlint:-options") + set(jni_header_dir "${CMAKE_CURRENT_BINARY_DIR}/native") + if(CMAKE_VERSION VERSION_LESS 3.11) + set(CMAKE_JAVA_COMPILE_FLAGS ${CMAKE_JAVA_COMPILE_FLAGS} "-h" ${jni_header_dir}) |