From 67d8eab83cf38d24ac978964be47c8c9df2ae8fb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 10 Nov 2024 06:31:03 +0100 Subject: Numbering patches. Signed-off-by: Daniel Baumann --- .../patches/0001-lp1986747-fix-osd-class-dir.patch | 21 ++++++++ debian/patches/0002-enable-strsignal.patch | 16 ++++++ .../0003-update-java-source-target-flags.patch | 40 ++++++++++++++ .../0004-fix-bash-completion-location.patch | 9 ++++ debian/patches/0005-riscv64-link-pthread.patch | 14 +++++ debian/patches/0006-bug1914584.patch | 44 +++++++++++++++ debian/patches/0007-spdk_top-string-format.patch | 39 ++++++++++++++ debian/patches/0008-spdk-fix-make-exe.patch | 22 ++++++++ .../patches/0009-fix-CheckCxxAtomic-riscv64.patch | 16 ++++++ debian/patches/0010-fix-mantic-misc.patch | 35 ++++++++++++ debian/patches/0011-fix-fmt-check.patch | 15 ++++++ debian/patches/0012-fix-cephadm-build.patch | 45 ++++++++++++++++ debian/patches/0013-ppc64el-fix-linking.patch | 24 +++++++++ debian/patches/0014-mgr-distutils.patch | 32 +++++++++++ debian/patches/0015-boost-url.patch | 63 ++++++++++++++++++++++ debian/patches/0016-logentry-c++23-compat.patch | 21 ++++++++ debian/patches/0017-ceph-exporter-systemd.patch | 60 +++++++++++++++++++++ debian/patches/0018-dout-fix.patch | 23 ++++++++ debian/patches/0019-lp2080208.patch | 46 ++++++++++++++++ debian/patches/0020-pass-build-flags.patch | 25 +++++++++ debian/patches/0021-udev-luks-on-rbd.patch | 15 ++++++ debian/patches/boost-url.patch | 63 ---------------------- debian/patches/bug1914584.patch | 44 --------------- debian/patches/ceph-exporter-systemd.patch | 60 --------------------- debian/patches/dout-fix.patch | 23 -------- debian/patches/enable-strsignal.patch | 16 ------ debian/patches/fix-CheckCxxAtomic-riscv64.patch | 16 ------ debian/patches/fix-bash-completion-location | 9 ---- debian/patches/fix-cephadm-build.patch | 45 ---------------- debian/patches/fix-fmt-check.patch | 15 ------ debian/patches/fix-mantic-misc.patch | 35 ------------ debian/patches/logentry-c++23-compat.patch | 21 -------- debian/patches/lp1986747-fix-osd-class-dir.patch | 21 -------- debian/patches/lp2080208.patch | 46 ---------------- debian/patches/mgr-distutils.patch | 32 ----------- debian/patches/pass-build-flags.patch | 25 --------- debian/patches/ppc64el-fix-linking.patch | 24 --------- debian/patches/riscv64-link-pthread.patch | 14 ----- debian/patches/series | 44 ++++++++------- debian/patches/spdk-fix-make-exe.patch | 22 -------- debian/patches/spdk_top-string-format.patch | 39 -------------- debian/patches/udev-luks-on-rbd.patch | 15 ------ .../patches/update-java-source-target-flags.patch | 40 -------------- 43 files changed, 646 insertions(+), 648 deletions(-) create mode 100644 debian/patches/0001-lp1986747-fix-osd-class-dir.patch create mode 100644 debian/patches/0002-enable-strsignal.patch create mode 100644 debian/patches/0003-update-java-source-target-flags.patch create mode 100644 debian/patches/0004-fix-bash-completion-location.patch create mode 100644 debian/patches/0005-riscv64-link-pthread.patch create mode 100644 debian/patches/0006-bug1914584.patch create mode 100644 debian/patches/0007-spdk_top-string-format.patch create mode 100644 debian/patches/0008-spdk-fix-make-exe.patch create mode 100644 debian/patches/0009-fix-CheckCxxAtomic-riscv64.patch create mode 100644 debian/patches/0010-fix-mantic-misc.patch create mode 100644 debian/patches/0011-fix-fmt-check.patch create mode 100644 debian/patches/0012-fix-cephadm-build.patch create mode 100644 debian/patches/0013-ppc64el-fix-linking.patch create mode 100644 debian/patches/0014-mgr-distutils.patch create mode 100644 debian/patches/0015-boost-url.patch create mode 100644 debian/patches/0016-logentry-c++23-compat.patch create mode 100644 debian/patches/0017-ceph-exporter-systemd.patch create mode 100644 debian/patches/0018-dout-fix.patch create mode 100644 debian/patches/0019-lp2080208.patch create mode 100644 debian/patches/0020-pass-build-flags.patch create mode 100644 debian/patches/0021-udev-luks-on-rbd.patch delete mode 100644 debian/patches/boost-url.patch delete mode 100644 debian/patches/bug1914584.patch delete mode 100644 debian/patches/ceph-exporter-systemd.patch delete mode 100644 debian/patches/dout-fix.patch delete mode 100644 debian/patches/enable-strsignal.patch delete mode 100644 debian/patches/fix-CheckCxxAtomic-riscv64.patch delete mode 100644 debian/patches/fix-bash-completion-location delete mode 100644 debian/patches/fix-cephadm-build.patch delete mode 100644 debian/patches/fix-fmt-check.patch delete mode 100644 debian/patches/fix-mantic-misc.patch delete mode 100644 debian/patches/logentry-c++23-compat.patch delete mode 100644 debian/patches/lp1986747-fix-osd-class-dir.patch delete mode 100644 debian/patches/lp2080208.patch delete mode 100644 debian/patches/mgr-distutils.patch delete mode 100644 debian/patches/pass-build-flags.patch delete mode 100644 debian/patches/ppc64el-fix-linking.patch delete mode 100644 debian/patches/riscv64-link-pthread.patch delete mode 100644 debian/patches/spdk-fix-make-exe.patch delete mode 100644 debian/patches/spdk_top-string-format.patch delete mode 100644 debian/patches/udev-luks-on-rbd.patch delete mode 100644 debian/patches/update-java-source-target-flags.patch diff --git a/debian/patches/0001-lp1986747-fix-osd-class-dir.patch b/debian/patches/0001-lp1986747-fix-osd-class-dir.patch new file mode 100644 index 000000000..0b8a3fa1d --- /dev/null +++ b/debian/patches/0001-lp1986747-fix-osd-class-dir.patch @@ -0,0 +1,21 @@ +Description: Fix rados-classes search path. + . + The commit 3bee4b0 changed the + base of the osd_class_dir path from CMAKE_INSTALL_FULL_LIBDIR to + CMAKE_INSTALL_LIBDIR. This change aligns the default value with the + correct value. +Author: Chris MacNaughton +Forwarded: https://github.com/ceph/ceph/pull/47676 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1986747 + +--- a/src/common/options/osd.yaml.in ++++ b/src/common/options/osd.yaml.in +@@ -534,7 +534,7 @@ + - name: osd_class_dir + type: str + level: advanced +- default: @CMAKE_INSTALL_LIBDIR@/rados-classes ++ default: @CMAKE_INSTALL_FULL_LIBDIR@/rados-classes + fmt_desc: The class path for RADOS class plug-ins. + with_legacy: true + - name: osd_open_classes_on_start diff --git a/debian/patches/0002-enable-strsignal.patch b/debian/patches/0002-enable-strsignal.patch new file mode 100644 index 000000000..f5647d96c --- /dev/null +++ b/debian/patches/0002-enable-strsignal.patch @@ -0,0 +1,16 @@ +Description: This defines HAVE_REENTRANT_STRSIGNAL as sys_siglist no longer + exists with glibc 2.32 and all programs should use strsignal instead. +Forwarded: no +Last-Update: 2020-09-21 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -566,7 +566,7 @@ + set(HAVE_THREAD_SAFE_RES_QUERY 1 CACHE INTERNAL "Thread safe res_query supported.") + endif() + +-option(WITH_REENTRANT_STRSIGNAL "strsignal is reentrant" OFF) ++option(WITH_REENTRANT_STRSIGNAL "strsignal is reentrant" ON) + if(WITH_REENTRANT_STRSIGNAL) + set(HAVE_REENTRANT_STRSIGNAL 1 CACHE INTERNAL "Reentrant strsignal is supported.") + endif() diff --git a/debian/patches/0003-update-java-source-target-flags.patch b/debian/patches/0003-update-java-source-target-flags.patch new file mode 100644 index 000000000..f3f1766c7 --- /dev/null +++ b/debian/patches/0003-update-java-source-target-flags.patch @@ -0,0 +1,40 @@ +Description: use --release 8 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 minimum compatibility release has been updated to 8. +Author: Tiago Stürmer Daitx +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 +@@ -15,13 +15,7 @@ + java/com/ceph/fs/CephStat.java + java/com/ceph/fs/CephStatVFS.java) + +-# note: for the -source 1.7 builds, we add +-# -Xlint:-options +-# to get rid of the warning +-# 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" $ENV{JAVA_TARGET_RELEASE} "-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}) +--- a/src/rocksdb/java/CMakeLists.txt ++++ b/src/rocksdb/java/CMakeLists.txt +@@ -4,7 +4,7 @@ + message("Please consider switching to CMake 3.11.4 or newer") + endif() + +-set(CMAKE_JAVA_COMPILE_FLAGS -source 7) ++set(CMAKE_JAVA_COMPILE_FLAGS -source $ENV{JAVA_TARGET_RELEASE}) + + set(JNI_NATIVE_SOURCES + rocksjni/backup_engine_options.cc diff --git a/debian/patches/0004-fix-bash-completion-location.patch b/debian/patches/0004-fix-bash-completion-location.patch new file mode 100644 index 000000000..eb05b9e15 --- /dev/null +++ b/debian/patches/0004-fix-bash-completion-location.patch @@ -0,0 +1,9 @@ +--- a/src/bash_completion/CMakeLists.txt ++++ b/src/bash_completion/CMakeLists.txt +@@ -11,5 +11,5 @@ + endif() + + install(FILES ${completions} +- DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/bash_completion.d) ++ DESTINATION /usr/share/bash-completion/completions) + diff --git a/debian/patches/0005-riscv64-link-pthread.patch b/debian/patches/0005-riscv64-link-pthread.patch new file mode 100644 index 000000000..782b6ed7b --- /dev/null +++ b/debian/patches/0005-riscv64-link-pthread.patch @@ -0,0 +1,14 @@ +Description: Link with -pthread instead of -lpthread to fix FTBFS on riscv64 +Forwarded: no +Last-Update: 2020-03-01 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,6 +25,7 @@ + + 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/0006-bug1914584.patch b/debian/patches/0006-bug1914584.patch new file mode 100644 index 000000000..714e8cb56 --- /dev/null +++ b/debian/patches/0006-bug1914584.patch @@ -0,0 +1,44 @@ +From a8c1aec073fc8364818027a26fa1ddb5d34c58af Mon Sep 17 00:00:00 2001 +From: Matthew Vernon +Date: Thu, 4 Feb 2021 11:41:14 +0000 +Subject: [PATCH] rgw/radosgw-admin clarify error when email address already in + use + +The error message if you try and create an S3 user with an email +address that is already associated with another S3 account is very +confusing; this patch makes it much clearer + +To reproduce: + +radosgw-admin user create --uid=foo --display-name="Foo test" --email=bar@domain.invalid +radosgw-admin user create --uid=test --display-name="AN test" --email=bar@domain.invalid +could not create user: unable to parse parameters, user id mismatch, operation id: foo does not match: test + +With this patch: + +radosgw-admin user create --uid=test --display-name="AN test" --email=bar@domain.invalid +could not create user: unable to create user test because user id foo already exists with email bar@domain.invalid + +Fixes: https://tracker.ceph.com/issues/49137 +Fixes: https://tracker.ceph.com/issues/19411 +Signed-off-by: Matthew Vernon +(cherry picked from commit 05318d6f71e45a42a46518a0ef17047dfab83990) +--- +--- a/src/rgw/driver/rados/rgw_user.cc ++++ b/src/rgw/driver/rados/rgw_user.cc +@@ -834,7 +834,14 @@ + + ret = check_op(op_state, &subprocess_msg); + if (ret < 0) { +- set_err_msg(err_msg, "unable to parse request, " + subprocess_msg); ++ if (op_state.is_populated() && (user_id == op_state.get_user_id())) { ++ set_err_msg(err_msg, "unable to create user " + user_id.to_str () ++ + " because user id " + op_state.get_user_id().to_str() ++ + " already exists with email " ++ + op_state.get_user_email()); ++ } else { ++ set_err_msg(err_msg, "unable to parse request, " + subprocess_msg); ++ } + return ret; + } + diff --git a/debian/patches/0007-spdk_top-string-format.patch b/debian/patches/0007-spdk_top-string-format.patch new file mode 100644 index 000000000..b2667afb2 --- /dev/null +++ b/debian/patches/0007-spdk_top-string-format.patch @@ -0,0 +1,39 @@ +Description: spdk_top: always use "%s"-style format for printf()-style functions + `ncuses-6.3` added printf-style function attributes and now makes + it easier to catch cases when user input is used in palce of format + string when built with CFLAGS=-Werror=format-security: + + spdk_top.c:1135:34: error: format not a string literal and no format arguments [-Werror=format-security] + 1135 | mvwprintw(win, row, col, tmp_str); + | ^~~~~~~ + + Let's wrap all the missing places with "%s" format. + +Origin: https://review.spdk.io/gerrit/c/spdk/spdk/+/10300 +--- a/src/spdk/app/spdk_top/spdk_top.c ++++ b/src/spdk/app/spdk_top/spdk_top.c +@@ -655,7 +655,7 @@ + snprintf(&tmp_str[max_str - DOTS_STR_LEN - 2], DOTS_STR_LEN, "%s", dots); + } + +- mvwprintw(win, row, col, tmp_str); ++ mvwprintw(win, row, col, "%s", tmp_str); + + refresh(); + wrefresh(win); +@@ -1861,13 +1861,13 @@ + time_last = time_now.tv_sec; + rc = get_data(); + if (rc) { +- mvprintw(g_max_row - 1, g_max_col - strlen(refresh_error) - 2, refresh_error); ++ mvprintw(g_max_row - 1, g_max_col - strlen(refresh_error) - 2, "%s", refresh_error); + } + + max_pages = refresh_tab(active_tab, current_page); + + snprintf(current_page_str, CURRENT_PAGE_STR_LEN - 1, "Page: %d/%d", current_page + 1, max_pages); +- mvprintw(g_max_row - 1, 1, current_page_str); ++ mvprintw(g_max_row - 1, 1, "%s", current_page_str); + + free_data(); + diff --git a/debian/patches/0008-spdk-fix-make-exe.patch b/debian/patches/0008-spdk-fix-make-exe.patch new file mode 100644 index 000000000..441bd00ff --- /dev/null +++ b/debian/patches/0008-spdk-fix-make-exe.patch @@ -0,0 +1,22 @@ +--- a/cmake/modules/BuildSPDK.cmake ++++ b/cmake/modules/BuildSPDK.cmake +@@ -55,7 +55,7 @@ + # unset $CFLAGS, otherwise it will interfere with how SPDK sets + # its include directory. + # unset $LDFLAGS, otherwise SPDK will fail to mock some functions. +- BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${make_cmd} EXTRA_CFLAGS=${spdk_CFLAGS} ++ BUILD_COMMAND env -i V=1 PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${MAKE_EXECUTABLE} EXTRA_CFLAGS=${spdk_CFLAGS} + BUILD_IN_SOURCE 1 + BUILD_BYPRODUCTS ${spdk_libs} + INSTALL_COMMAND "" +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -288,7 +288,7 @@ + endif() + + CMAKE_DEPENDENT_OPTION(WITH_SPDK "Enable SPDK" OFF +- "CMAKE_SYSTEM_PROCESSOR MATCHES i386|i686|amd64|x86_64|AMD64|aarch64" OFF) ++ "CMAKE_SYSTEM_PROCESSOR MATCHES xxx" OFF) + if(WITH_SPDK) + if(NOT WITH_BLUESTORE) + message(SEND_ERROR "Please enable WITH_BLUESTORE for using SPDK") diff --git a/debian/patches/0009-fix-CheckCxxAtomic-riscv64.patch b/debian/patches/0009-fix-CheckCxxAtomic-riscv64.patch new file mode 100644 index 000000000..a1a2bebae --- /dev/null +++ b/debian/patches/0009-fix-CheckCxxAtomic-riscv64.patch @@ -0,0 +1,16 @@ +Description: Fix CheckCxxAtomic to detect more accurately + Some platforms like riscv64 does not have full support for atomic primitives, + yet passes the test. Adding operator++ fixes this issue. +Author: Eric Long +Last-Update: 2022-08-30 +--- a/cmake/modules/CheckCxxAtomic.cmake ++++ b/cmake/modules/CheckCxxAtomic.cmake +@@ -47,7 +47,7 @@ + std::atomic w2; + std::atomic w4; + std::atomic w8; +- return w1 + w2 + w4 + w8; ++ return ++w1 + ++w2 + ++w4 + ++w8; + } + " ${var}) + endfunction(check_cxx_atomics) diff --git a/debian/patches/0010-fix-mantic-misc.patch b/debian/patches/0010-fix-mantic-misc.patch new file mode 100644 index 000000000..443f5ca22 --- /dev/null +++ b/debian/patches/0010-fix-mantic-misc.patch @@ -0,0 +1,35 @@ +Description: Fixes for Ubuntu Mantic +Author: Luciano Lo Giudice +Forwarded: no + +--- a/src/seastar/include/seastar/net/packet.hh ++++ b/src/seastar/include/seastar/net/packet.hh +@@ -105,7 +105,7 @@ + unsigned _len = 0; + uint16_t _nr_frags = 0; + uint16_t _allocated_frags; +- offload_info _offload_info; ++ struct offload_info _offload_info; + std::optional _rss_hash; + char _data[internal_data_size]; // only _frags[0] may use + unsigned _headroom = internal_data_size; // in _data +--- a/src/spdk/lib/iscsi/iscsi.c ++++ b/src/spdk/lib/iscsi/iscsi.c +@@ -103,7 +103,7 @@ + static int g_arc4random_initialized = 0; + + static uint32_t +-arc4random(void) ++rpl_arc4random(void) + { + uint32_t r; + uint32_t r1, r2; +@@ -117,6 +117,8 @@ + r = (r1 << 16) | r2; + return r; + } ++ ++#define arc4random rpl_arc4random + #endif /* HAVE_ARC4RANDOM */ + + static void diff --git a/debian/patches/0011-fix-fmt-check.patch b/debian/patches/0011-fix-fmt-check.patch new file mode 100644 index 000000000..74a375f14 --- /dev/null +++ b/debian/patches/0011-fix-fmt-check.patch @@ -0,0 +1,15 @@ +Description: Fix CMake check +Author: Luciano Lo Giudice +Forwarded: no + +--- a/src/seastar/cmake/CheckGcc107852.cmake ++++ b/src/seastar/cmake/CheckGcc107852.cmake +@@ -7,7 +7,7 @@ + # Seastar_PRIVATE_CXX_FLAGS, which is not applied to CMAKE_CXX_FLAGS, so + # let's apply them explicitly. + set (CMAKE_REQUIRED_FLAGS "-Werror=stringop-overflow -Werror=array-bound") +-set (CMAKE_REQUIRED_LIBRARIES fmt::fmt) ++set (CMAKE_REQUIRED_LIBRARIES fmt) + + # see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107852 + check_cxx_source_compiles (" diff --git a/debian/patches/0012-fix-cephadm-build.patch b/debian/patches/0012-fix-cephadm-build.patch new file mode 100644 index 000000000..bf63b5a32 --- /dev/null +++ b/debian/patches/0012-fix-cephadm-build.patch @@ -0,0 +1,45 @@ +Description: Fix building cephadm with no internet +Author: Luciano Lo Giudice +Forwarded: no + +--- a/src/cephadm/CMakeLists.txt ++++ b/src/cephadm/CMakeLists.txt +@@ -21,7 +21,7 @@ + --set-version-var=CEPH_RELEASE=${CEPH_RELEASE} + --set-version-var=CEPH_RELEASE_NAME=${CEPH_RELEASE_NAME} + --set-version-var=CEPH_RELEASE_TYPE=${CEPH_RELEASE_TYPE} +- --bundled-dependencies=${CEPHADM_BUNDLED_DEPENDENCIES} ++ --bundled-dependencies=none + ${bin_target_file} + ) + +@@ -31,3 +31,7 @@ + install(PROGRAMS + ${bin_target_file} + DESTINATION ${CMAKE_INSTALL_SBINDIR}) ++ ++install(DIRECTORY ++ cephadmlib ++ DESTINATION ${Python3_SITELIB}) +--- a/src/cephadm/build.py ++++ b/src/cephadm/build.py +@@ -346,7 +346,7 @@ + if has_venv: + log.info('Attempting to create a virtualenv') + venv = tempdir / "_venv_" +- _run([sys.executable, '-m', 'venv', str(venv)]) ++ _run([sys.executable, '-m', 'venv', str(venv), "--system-site-packages"]) + executable = str(venv / "bin" / pathlib.Path(executable).name) + # try to upgrade pip in the virtualenv. if it fails ignore the error + _run([executable, '-m', 'pip', 'install', '-U', 'pip']) +--- a/src/cephadm/cephadmlib/host_facts.py ++++ b/src/cephadm/cephadmlib/host_facts.py +@@ -719,7 +719,7 @@ + else: + summary = {} # type: Dict[str, int] + for line in profiles.split('\n'): +- item, mode = line.split(' ') ++ *_, mode = line.split(' ') + mode = mode.strip('()') + if mode in summary: + summary[mode] += 1 diff --git a/debian/patches/0013-ppc64el-fix-linking.patch b/debian/patches/0013-ppc64el-fix-linking.patch new file mode 100644 index 000000000..d395ed51e --- /dev/null +++ b/debian/patches/0013-ppc64el-fix-linking.patch @@ -0,0 +1,24 @@ +Description: Switch back to static linking + Resolves linking failures on ppc64el +Author: James Page +Forwarded: not-needed + +--- a/src/common/CMakeLists.txt ++++ b/src/common/CMakeLists.txt +@@ -230,7 +230,7 @@ + crc32c_aarch64.c) + endif(HAVE_INTEL) + +-add_library(crc32 OBJECT ${crc32_srcs}) ++add_library(crc32 STATIC ${crc32_srcs}) + + if(HAVE_ARMV8_CRC) + set_target_properties(crc32 PROPERTIES +--- a/src/arch/CMakeLists.txt ++++ b/src/arch/CMakeLists.txt +@@ -9,4 +9,4 @@ + list(APPEND arch_srcs ppc.c) + endif() + +-add_library(arch OBJECT ${arch_srcs}) ++add_library(arch STATIC ${arch_srcs}) diff --git a/debian/patches/0014-mgr-distutils.patch b/debian/patches/0014-mgr-distutils.patch new file mode 100644 index 000000000..e995a188a --- /dev/null +++ b/debian/patches/0014-mgr-distutils.patch @@ -0,0 +1,32 @@ +Description: Use vendored distutils from setuptools + Due to the way Python executes in the mgr process, it + avoids the distutils_hack which injects the vendored + distutils in setuptools in system modules. + . + Longer term this needs removing, but for the time + being directly reference the vendored distutils module. +Author: James Page +Forwarded: not-needed + +--- a/src/pybind/mgr/dashboard/tools.py ++++ b/src/pybind/mgr/dashboard/tools.py +@@ -9,7 +9,7 @@ + import time + import urllib + from datetime import datetime, timedelta +-from distutils.util import strtobool ++from setuptools._distutils.util import strtobool + + import cherrypy + from mgr_util import build_url +--- a/src/pybind/mgr/volumes/fs/operations/pin_util.py ++++ b/src/pybind/mgr/volumes/fs/operations/pin_util.py +@@ -3,7 +3,7 @@ + import cephfs + + from ..exception import VolumeException +-from distutils.util import strtobool ++from setuptools._distutils.util import strtobool + + _pin_value = { + "export": lambda x: int(x), diff --git a/debian/patches/0015-boost-url.patch b/debian/patches/0015-boost-url.patch new file mode 100644 index 000000000..4513ace0d --- /dev/null +++ b/debian/patches/0015-boost-url.patch @@ -0,0 +1,63 @@ +commit 857eedbe6c9ed80ed0625bd0aa27b1a1e85f8d59 +Author: Adam C. Emerson +Date: Mon May 20 16:22:28 2024 -0400 + + mds: Use Boost::url rather than `src.hpp` + + As `src.hpp` is no longer supported. + + Signed-off-by: Adam Emerson + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -667,7 +667,7 @@ + # Boost::thread depends on Boost::atomic, so list it explicitly. + set(BOOST_COMPONENTS + atomic chrono thread system regex random program_options date_time +- iostreams context coroutine) ++ iostreams context coroutine url) + set(BOOST_HEADER_COMPONENTS container) + + if(WITH_MGR) +--- a/src/mds/BoostUrlImpl.cc ++++ /dev/null +@@ -1,8 +0,0 @@ +-/* +- * https://www.boost.org/doc/libs/1_82_0/libs/url/doc/html/url/overview.html#url.overview.requirements +- * +- * To use the library as header-only; that is, to eliminate the requirement +- * to link a program to a static or dynamic Boost.URL library, +- * simply place the following line in exactly one source file in your project. +- */ +-#include +--- a/src/mds/CMakeLists.txt ++++ b/src/mds/CMakeLists.txt +@@ -45,12 +45,12 @@ + QuiesceDbManager.cc + QuiesceAgent.cc + MDSRankQuiesce.cc +- BoostUrlImpl.cc + ${CMAKE_SOURCE_DIR}/src/common/TrackedOp.cc + ${CMAKE_SOURCE_DIR}/src/common/MemoryModel.cc + ${CMAKE_SOURCE_DIR}/src/osdc/Journaler.cc + ${CMAKE_SOURCE_DIR}/src/mgr/MDSPerfMetricTypes.cc) + add_library(mds STATIC ${mds_srcs}) + target_link_libraries(mds PRIVATE ++ Boost::url + heap_profiler cpu_profiler osdc ${LUA_LIBRARIES}) + target_include_directories(mds PRIVATE "${LUA_INCLUDE_DIR}") +--- a/src/test/mds/CMakeLists.txt ++++ b/src/test/mds/CMakeLists.txt +@@ -18,11 +18,10 @@ + add_executable(unittest_mds_quiesce_db + TestQuiesceDb.cc + ../../../src/mds/QuiesceDbManager.cc +- ../../../src/mds/BoostUrlImpl.cc + $ + ) + add_ceph_unittest(unittest_mds_quiesce_db) +-target_link_libraries(unittest_mds_quiesce_db ceph-common global) ++target_link_libraries(unittest_mds_quiesce_db ceph-common global Boost::url) + + # unittest_mds_quiesce_agent + add_executable(unittest_mds_quiesce_agent diff --git a/debian/patches/0016-logentry-c++23-compat.patch b/debian/patches/0016-logentry-c++23-compat.patch new file mode 100644 index 000000000..8c4506b18 --- /dev/null +++ b/debian/patches/0016-logentry-c++23-compat.patch @@ -0,0 +1,21 @@ +commit b854bfcc70ff372cd087c068e0302d36ad86391f +Author: Ronen Friedman +Date: Sun Mar 3 16:30:59 2024 +0200 + + common: fix string creation from '0' in LogEntry + + C++23 disallows conversion from 'int' to 'string'. + That includes returning '0' from a function that returns a string. + + Signed-off-by: Ronen Friedman + +--- a/src/common/LogEntry.cc ++++ b/src/common/LogEntry.cc +@@ -73,7 +73,6 @@ + return LOG_CRIT; + default: + ceph_abort(); +- return 0; + } + } + diff --git a/debian/patches/0017-ceph-exporter-systemd.patch b/debian/patches/0017-ceph-exporter-systemd.patch new file mode 100644 index 000000000..6c3cbefcf --- /dev/null +++ b/debian/patches/0017-ceph-exporter-systemd.patch @@ -0,0 +1,60 @@ +commit 32cbe079c60031f67ee91e2f74f39244a027eba6 +Author: Shinya Hayashi +Date: Mon Feb 5 04:16:26 2024 +0000 + + systemd: add systemd unit file for ceph-exporter + + Signed-off-by: Shinya Hayashi + +--- a/ceph.spec.in ++++ b/ceph.spec.in +@@ -2091,6 +2091,7 @@ + + %files -n ceph-exporter + %{_bindir}/ceph-exporter ++%{_unitdir}/ceph-exporter.service + + %files -n rbd-fuse + %{_bindir}/rbd-fuse +--- a/systemd/CMakeLists.txt ++++ b/systemd/CMakeLists.txt +@@ -14,6 +14,7 @@ + set(SYSTEMD_ENV_FILE "${CEPH_SYSTEMD_ENV_DIR}/ceph") + foreach(service + ceph-crash ++ ceph-exporter + ceph-fuse@ + ceph-mds@ + ceph-mgr@ +--- /dev/null ++++ b/systemd/ceph-exporter.service.in +@@ -0,0 +1,29 @@ ++[Unit] ++Description=Ceph cluster exporter daemon ++PartOf=ceph.target ++After=network-online.target local-fs.target ++Before=ceph.target ++Wants=network-online.target local-fs.target ceph.target ceph-mon.target ++ ++[Service] ++ExecReload=/bin/kill -HUP $MAINPID ++ExecStart=/usr/bin/ceph-exporter -f --id %i --setuser ceph --setgroup ceph ++LockPersonality=true ++NoNewPrivileges=true ++PrivateDevices=yes ++PrivateTmp=true ++ProtectControlGroups=true ++ProtectHome=true ++ProtectHostname=true ++ProtectKernelLogs=true ++ProtectKernelModules=true ++ProtectKernelTunables=true ++ProtectSystem=full ++Restart=on-failure ++RestartSec=10 ++RestrictSUIDSGID=true ++StartLimitBurst=3 ++StartLimitInterval=30min ++ ++[Install] ++WantedBy=multi-user.target ceph.target diff --git a/debian/patches/0018-dout-fix.patch b/debian/patches/0018-dout-fix.patch new file mode 100644 index 000000000..b3eda49ea --- /dev/null +++ b/debian/patches/0018-dout-fix.patch @@ -0,0 +1,23 @@ +Description: Fix FTBFS issue in dout subsystem +Author: Luciano Lo Giudice +Forwarded: no + +--- a/src/common/dout.h ++++ b/src/common/dout.h +@@ -157,15 +157,7 @@ + #define dout_impl(cct, sub, v) \ + do { \ + const bool should_gather = [&](const auto cctX) { \ +- if constexpr (ceph::dout::is_dynamic::value || \ +- ceph::dout::is_dynamic::value) { \ +- return cctX->_conf->subsys.should_gather(sub, v); \ +- } else { \ +- /* The parentheses are **essential** because commas in angle \ +- * brackets are NOT ignored on macro expansion! A language's \ +- * limitation, sorry. */ \ +- return (cctX->_conf->subsys.template should_gather()); \ +- } \ ++ return cctX->_conf->subsys.should_gather(sub, v); \ + }(cct); \ + \ + if (should_gather) { \ diff --git a/debian/patches/0019-lp2080208.patch b/debian/patches/0019-lp2080208.patch new file mode 100644 index 000000000..fc91ff189 --- /dev/null +++ b/debian/patches/0019-lp2080208.patch @@ -0,0 +1,46 @@ +From 12cc90a8dac62824c9326f5a4b31744c3f2bf10b Mon Sep 17 00:00:00 2001 +From: Peter Sabaini +Date: Wed, 11 Sep 2024 16:56:50 +0200 +Subject: [PATCH] ceph-volume: fix importlib.metadata compat + +The importlib.metadata library removed older shims in releases >5.0.0 +where EntryPoints objects use .select() instead of dict-like access. + +Fixes: https://tracker.ceph.com/issues/68032 + +Signed-off-by: Peter Sabaini +--- + src/ceph-volume/ceph_volume/main.py | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/ceph-volume/ceph_volume/main.py b/src/ceph-volume/ceph_volume/main.py +index f8eca65ec497c..110ccf727c82e 100644 +--- a/src/ceph-volume/ceph_volume/main.py ++++ b/src/ceph-volume/ceph_volume/main.py +@@ -9,15 +9,25 @@ + # `entry_points` from `importlib.metadata` does not. + try: + from importlib.metadata import entry_points ++ from importlib.metadata import EntryPoints + + def get_entry_points(group: str): # type: ignore +- return entry_points().get(group, []) # type: ignore ++ eps = entry_points() ++ if isinstance(eps, EntryPoints) and hasattr(eps, 'select'): ++ # New importlib.metadata uses .select() ++ return eps.select(group=group) ++ else: ++ # Fallback to older EntryPoints that returns dicts ++ return eps.get(group, []) # type: ignore ++ + except ImportError: ++ # Fallback to `pkg_resources` for older versions + from pkg_resources import iter_entry_points as entry_points # type: ignore + + def get_entry_points(group: str): # type: ignore + return entry_points(group=group) # type: ignore + ++ + from ceph_volume.decorators import catches + from ceph_volume import log, devices, configuration, conf, exceptions, terminal, inventory, drive_group, activate + diff --git a/debian/patches/0020-pass-build-flags.patch b/debian/patches/0020-pass-build-flags.patch new file mode 100644 index 000000000..51be7dbce --- /dev/null +++ b/debian/patches/0020-pass-build-flags.patch @@ -0,0 +1,25 @@ +Description: Pass build flags when building Python extensions +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/2078244 +Bug-Gentoo: https://bugs.gentoo.org/866159 +Bug-Gentoo: https://bugs.gentoo.org/866161 +Origin: gentoo, https://github.com/gentoo/gentoo/commit/c588d0c55a2facb7b98331abf3ccb2439cc34286 +Author: Patrick McLean +Last-Update: 2022-08-24 + +--- a/cmake/modules/Distutils.cmake ++++ b/cmake/modules/Distutils.cmake +@@ -93,12 +93,12 @@ + COMMAND + env + CC="${PY_CC}" +- CFLAGS="${PY_CFLAGS}" ++ CFLAGS="${PY_CFLAGS}"\ ${CMAKE_C_FLAGS} + CPPFLAGS="${PY_CPPFLAGS}" + CXX="${PY_CXX}" + LDSHARED="${PY_LDSHARED}" + OPT=\"-DNDEBUG -g -fwrapv -O2 -w\" +- LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ++ LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\ ${CMAKE_LINKER_FLAGS}\ ${CMAKE_SHARED_LINKER_FLAGS} + CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR} + CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} + ${Python3_EXECUTABLE} ${setup_py} diff --git a/debian/patches/0021-udev-luks-on-rbd.patch b/debian/patches/0021-udev-luks-on-rbd.patch new file mode 100644 index 000000000..3c35e1d60 --- /dev/null +++ b/debian/patches/0021-udev-luks-on-rbd.patch @@ -0,0 +1,15 @@ +Author: Daniel Schreiber +Description: udev rules for rbd to activate LUKS volumes (Closes: #1064970) + +diff -Naurp ceph.orig/udev/50-rbd.rules ceph/udev/50-rbd.rules +--- ceph.orig/udev/50-rbd.rules ++++ ceph/udev/50-rbd.rules +@@ -1,5 +1,8 @@ + KERNEL=="rbd[0-9]*", ENV{DEVTYPE}=="disk", PROGRAM="/usr/bin/ceph-rbdnamer %k", SYMLINK+="rbd/%c" + KERNEL=="rbd[0-9]*", ENV{DEVTYPE}=="partition", PROGRAM="/usr/bin/ceph-rbdnamer %k", SYMLINK+="rbd/%c-part%n" + ++KERNEL=="rbd*", ENV{DEVTYPE}=="partition", IMPORT{builtin}="blkid --noraid" ++KERNEL=="rbd*", ENV{DEVTYPE}=="partition", ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" ++ + # This is a placeholder, uncomment and edit as necessary + #KERNEL=="rbd[0-9]*", ENV{DEVTYPE}=="disk", ACTION=="add|change", ATTR{bdi/read_ahead_kb}="128" diff --git a/debian/patches/boost-url.patch b/debian/patches/boost-url.patch deleted file mode 100644 index 4513ace0d..000000000 --- a/debian/patches/boost-url.patch +++ /dev/null @@ -1,63 +0,0 @@ -commit 857eedbe6c9ed80ed0625bd0aa27b1a1e85f8d59 -Author: Adam C. Emerson -Date: Mon May 20 16:22:28 2024 -0400 - - mds: Use Boost::url rather than `src.hpp` - - As `src.hpp` is no longer supported. - - Signed-off-by: Adam Emerson - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -667,7 +667,7 @@ - # Boost::thread depends on Boost::atomic, so list it explicitly. - set(BOOST_COMPONENTS - atomic chrono thread system regex random program_options date_time -- iostreams context coroutine) -+ iostreams context coroutine url) - set(BOOST_HEADER_COMPONENTS container) - - if(WITH_MGR) ---- a/src/mds/BoostUrlImpl.cc -+++ /dev/null -@@ -1,8 +0,0 @@ --/* -- * https://www.boost.org/doc/libs/1_82_0/libs/url/doc/html/url/overview.html#url.overview.requirements -- * -- * To use the library as header-only; that is, to eliminate the requirement -- * to link a program to a static or dynamic Boost.URL library, -- * simply place the following line in exactly one source file in your project. -- */ --#include ---- a/src/mds/CMakeLists.txt -+++ b/src/mds/CMakeLists.txt -@@ -45,12 +45,12 @@ - QuiesceDbManager.cc - QuiesceAgent.cc - MDSRankQuiesce.cc -- BoostUrlImpl.cc - ${CMAKE_SOURCE_DIR}/src/common/TrackedOp.cc - ${CMAKE_SOURCE_DIR}/src/common/MemoryModel.cc - ${CMAKE_SOURCE_DIR}/src/osdc/Journaler.cc - ${CMAKE_SOURCE_DIR}/src/mgr/MDSPerfMetricTypes.cc) - add_library(mds STATIC ${mds_srcs}) - target_link_libraries(mds PRIVATE -+ Boost::url - heap_profiler cpu_profiler osdc ${LUA_LIBRARIES}) - target_include_directories(mds PRIVATE "${LUA_INCLUDE_DIR}") ---- a/src/test/mds/CMakeLists.txt -+++ b/src/test/mds/CMakeLists.txt -@@ -18,11 +18,10 @@ - add_executable(unittest_mds_quiesce_db - TestQuiesceDb.cc - ../../../src/mds/QuiesceDbManager.cc -- ../../../src/mds/BoostUrlImpl.cc - $ - ) - add_ceph_unittest(unittest_mds_quiesce_db) --target_link_libraries(unittest_mds_quiesce_db ceph-common global) -+target_link_libraries(unittest_mds_quiesce_db ceph-common global Boost::url) - - # unittest_mds_quiesce_agent - add_executable(unittest_mds_quiesce_agent diff --git a/debian/patches/bug1914584.patch b/debian/patches/bug1914584.patch deleted file mode 100644 index 714e8cb56..000000000 --- a/debian/patches/bug1914584.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a8c1aec073fc8364818027a26fa1ddb5d34c58af Mon Sep 17 00:00:00 2001 -From: Matthew Vernon -Date: Thu, 4 Feb 2021 11:41:14 +0000 -Subject: [PATCH] rgw/radosgw-admin clarify error when email address already in - use - -The error message if you try and create an S3 user with an email -address that is already associated with another S3 account is very -confusing; this patch makes it much clearer - -To reproduce: - -radosgw-admin user create --uid=foo --display-name="Foo test" --email=bar@domain.invalid -radosgw-admin user create --uid=test --display-name="AN test" --email=bar@domain.invalid -could not create user: unable to parse parameters, user id mismatch, operation id: foo does not match: test - -With this patch: - -radosgw-admin user create --uid=test --display-name="AN test" --email=bar@domain.invalid -could not create user: unable to create user test because user id foo already exists with email bar@domain.invalid - -Fixes: https://tracker.ceph.com/issues/49137 -Fixes: https://tracker.ceph.com/issues/19411 -Signed-off-by: Matthew Vernon -(cherry picked from commit 05318d6f71e45a42a46518a0ef17047dfab83990) ---- ---- a/src/rgw/driver/rados/rgw_user.cc -+++ b/src/rgw/driver/rados/rgw_user.cc -@@ -834,7 +834,14 @@ - - ret = check_op(op_state, &subprocess_msg); - if (ret < 0) { -- set_err_msg(err_msg, "unable to parse request, " + subprocess_msg); -+ if (op_state.is_populated() && (user_id == op_state.get_user_id())) { -+ set_err_msg(err_msg, "unable to create user " + user_id.to_str () -+ + " because user id " + op_state.get_user_id().to_str() -+ + " already exists with email " -+ + op_state.get_user_email()); -+ } else { -+ set_err_msg(err_msg, "unable to parse request, " + subprocess_msg); -+ } - return ret; - } - diff --git a/debian/patches/ceph-exporter-systemd.patch b/debian/patches/ceph-exporter-systemd.patch deleted file mode 100644 index 6c3cbefcf..000000000 --- a/debian/patches/ceph-exporter-systemd.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 32cbe079c60031f67ee91e2f74f39244a027eba6 -Author: Shinya Hayashi -Date: Mon Feb 5 04:16:26 2024 +0000 - - systemd: add systemd unit file for ceph-exporter - - Signed-off-by: Shinya Hayashi - ---- a/ceph.spec.in -+++ b/ceph.spec.in -@@ -2091,6 +2091,7 @@ - - %files -n ceph-exporter - %{_bindir}/ceph-exporter -+%{_unitdir}/ceph-exporter.service - - %files -n rbd-fuse - %{_bindir}/rbd-fuse ---- a/systemd/CMakeLists.txt -+++ b/systemd/CMakeLists.txt -@@ -14,6 +14,7 @@ - set(SYSTEMD_ENV_FILE "${CEPH_SYSTEMD_ENV_DIR}/ceph") - foreach(service - ceph-crash -+ ceph-exporter - ceph-fuse@ - ceph-mds@ - ceph-mgr@ ---- /dev/null -+++ b/systemd/ceph-exporter.service.in -@@ -0,0 +1,29 @@ -+[Unit] -+Description=Ceph cluster exporter daemon -+PartOf=ceph.target -+After=network-online.target local-fs.target -+Before=ceph.target -+Wants=network-online.target local-fs.target ceph.target ceph-mon.target -+ -+[Service] -+ExecReload=/bin/kill -HUP $MAINPID -+ExecStart=/usr/bin/ceph-exporter -f --id %i --setuser ceph --setgroup ceph -+LockPersonality=true -+NoNewPrivileges=true -+PrivateDevices=yes -+PrivateTmp=true -+ProtectControlGroups=true -+ProtectHome=true -+ProtectHostname=true -+ProtectKernelLogs=true -+ProtectKernelModules=true -+ProtectKernelTunables=true -+ProtectSystem=full -+Restart=on-failure -+RestartSec=10 -+RestrictSUIDSGID=true -+StartLimitBurst=3 -+StartLimitInterval=30min -+ -+[Install] -+WantedBy=multi-user.target ceph.target diff --git a/debian/patches/dout-fix.patch b/debian/patches/dout-fix.patch deleted file mode 100644 index b3eda49ea..000000000 --- a/debian/patches/dout-fix.patch +++ /dev/null @@ -1,23 +0,0 @@ -Description: Fix FTBFS issue in dout subsystem -Author: Luciano Lo Giudice -Forwarded: no - ---- a/src/common/dout.h -+++ b/src/common/dout.h -@@ -157,15 +157,7 @@ - #define dout_impl(cct, sub, v) \ - do { \ - const bool should_gather = [&](const auto cctX) { \ -- if constexpr (ceph::dout::is_dynamic::value || \ -- ceph::dout::is_dynamic::value) { \ -- return cctX->_conf->subsys.should_gather(sub, v); \ -- } else { \ -- /* The parentheses are **essential** because commas in angle \ -- * brackets are NOT ignored on macro expansion! A language's \ -- * limitation, sorry. */ \ -- return (cctX->_conf->subsys.template should_gather()); \ -- } \ -+ return cctX->_conf->subsys.should_gather(sub, v); \ - }(cct); \ - \ - if (should_gather) { \ diff --git a/debian/patches/enable-strsignal.patch b/debian/patches/enable-strsignal.patch deleted file mode 100644 index f5647d96c..000000000 --- a/debian/patches/enable-strsignal.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: This defines HAVE_REENTRANT_STRSIGNAL as sys_siglist no longer - exists with glibc 2.32 and all programs should use strsignal instead. -Forwarded: no -Last-Update: 2020-09-21 - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -566,7 +566,7 @@ - set(HAVE_THREAD_SAFE_RES_QUERY 1 CACHE INTERNAL "Thread safe res_query supported.") - endif() - --option(WITH_REENTRANT_STRSIGNAL "strsignal is reentrant" OFF) -+option(WITH_REENTRANT_STRSIGNAL "strsignal is reentrant" ON) - if(WITH_REENTRANT_STRSIGNAL) - set(HAVE_REENTRANT_STRSIGNAL 1 CACHE INTERNAL "Reentrant strsignal is supported.") - endif() diff --git a/debian/patches/fix-CheckCxxAtomic-riscv64.patch b/debian/patches/fix-CheckCxxAtomic-riscv64.patch deleted file mode 100644 index a1a2bebae..000000000 --- a/debian/patches/fix-CheckCxxAtomic-riscv64.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: Fix CheckCxxAtomic to detect more accurately - Some platforms like riscv64 does not have full support for atomic primitives, - yet passes the test. Adding operator++ fixes this issue. -Author: Eric Long -Last-Update: 2022-08-30 ---- a/cmake/modules/CheckCxxAtomic.cmake -+++ b/cmake/modules/CheckCxxAtomic.cmake -@@ -47,7 +47,7 @@ - std::atomic w2; - std::atomic w4; - std::atomic w8; -- return w1 + w2 + w4 + w8; -+ return ++w1 + ++w2 + ++w4 + ++w8; - } - " ${var}) - endfunction(check_cxx_atomics) diff --git a/debian/patches/fix-bash-completion-location b/debian/patches/fix-bash-completion-location deleted file mode 100644 index eb05b9e15..000000000 --- a/debian/patches/fix-bash-completion-location +++ /dev/null @@ -1,9 +0,0 @@ ---- a/src/bash_completion/CMakeLists.txt -+++ b/src/bash_completion/CMakeLists.txt -@@ -11,5 +11,5 @@ - endif() - - install(FILES ${completions} -- DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/bash_completion.d) -+ DESTINATION /usr/share/bash-completion/completions) - diff --git a/debian/patches/fix-cephadm-build.patch b/debian/patches/fix-cephadm-build.patch deleted file mode 100644 index bf63b5a32..000000000 --- a/debian/patches/fix-cephadm-build.patch +++ /dev/null @@ -1,45 +0,0 @@ -Description: Fix building cephadm with no internet -Author: Luciano Lo Giudice -Forwarded: no - ---- a/src/cephadm/CMakeLists.txt -+++ b/src/cephadm/CMakeLists.txt -@@ -21,7 +21,7 @@ - --set-version-var=CEPH_RELEASE=${CEPH_RELEASE} - --set-version-var=CEPH_RELEASE_NAME=${CEPH_RELEASE_NAME} - --set-version-var=CEPH_RELEASE_TYPE=${CEPH_RELEASE_TYPE} -- --bundled-dependencies=${CEPHADM_BUNDLED_DEPENDENCIES} -+ --bundled-dependencies=none - ${bin_target_file} - ) - -@@ -31,3 +31,7 @@ - install(PROGRAMS - ${bin_target_file} - DESTINATION ${CMAKE_INSTALL_SBINDIR}) -+ -+install(DIRECTORY -+ cephadmlib -+ DESTINATION ${Python3_SITELIB}) ---- a/src/cephadm/build.py -+++ b/src/cephadm/build.py -@@ -346,7 +346,7 @@ - if has_venv: - log.info('Attempting to create a virtualenv') - venv = tempdir / "_venv_" -- _run([sys.executable, '-m', 'venv', str(venv)]) -+ _run([sys.executable, '-m', 'venv', str(venv), "--system-site-packages"]) - executable = str(venv / "bin" / pathlib.Path(executable).name) - # try to upgrade pip in the virtualenv. if it fails ignore the error - _run([executable, '-m', 'pip', 'install', '-U', 'pip']) ---- a/src/cephadm/cephadmlib/host_facts.py -+++ b/src/cephadm/cephadmlib/host_facts.py -@@ -719,7 +719,7 @@ - else: - summary = {} # type: Dict[str, int] - for line in profiles.split('\n'): -- item, mode = line.split(' ') -+ *_, mode = line.split(' ') - mode = mode.strip('()') - if mode in summary: - summary[mode] += 1 diff --git a/debian/patches/fix-fmt-check.patch b/debian/patches/fix-fmt-check.patch deleted file mode 100644 index 74a375f14..000000000 --- a/debian/patches/fix-fmt-check.patch +++ /dev/null @@ -1,15 +0,0 @@ -Description: Fix CMake check -Author: Luciano Lo Giudice -Forwarded: no - ---- a/src/seastar/cmake/CheckGcc107852.cmake -+++ b/src/seastar/cmake/CheckGcc107852.cmake -@@ -7,7 +7,7 @@ - # Seastar_PRIVATE_CXX_FLAGS, which is not applied to CMAKE_CXX_FLAGS, so - # let's apply them explicitly. - set (CMAKE_REQUIRED_FLAGS "-Werror=stringop-overflow -Werror=array-bound") --set (CMAKE_REQUIRED_LIBRARIES fmt::fmt) -+set (CMAKE_REQUIRED_LIBRARIES fmt) - - # see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107852 - check_cxx_source_compiles (" diff --git a/debian/patches/fix-mantic-misc.patch b/debian/patches/fix-mantic-misc.patch deleted file mode 100644 index 443f5ca22..000000000 --- a/debian/patches/fix-mantic-misc.patch +++ /dev/null @@ -1,35 +0,0 @@ -Description: Fixes for Ubuntu Mantic -Author: Luciano Lo Giudice -Forwarded: no - ---- a/src/seastar/include/seastar/net/packet.hh -+++ b/src/seastar/include/seastar/net/packet.hh -@@ -105,7 +105,7 @@ - unsigned _len = 0; - uint16_t _nr_frags = 0; - uint16_t _allocated_frags; -- offload_info _offload_info; -+ struct offload_info _offload_info; - std::optional _rss_hash; - char _data[internal_data_size]; // only _frags[0] may use - unsigned _headroom = internal_data_size; // in _data ---- a/src/spdk/lib/iscsi/iscsi.c -+++ b/src/spdk/lib/iscsi/iscsi.c -@@ -103,7 +103,7 @@ - static int g_arc4random_initialized = 0; - - static uint32_t --arc4random(void) -+rpl_arc4random(void) - { - uint32_t r; - uint32_t r1, r2; -@@ -117,6 +117,8 @@ - r = (r1 << 16) | r2; - return r; - } -+ -+#define arc4random rpl_arc4random - #endif /* HAVE_ARC4RANDOM */ - - static void diff --git a/debian/patches/logentry-c++23-compat.patch b/debian/patches/logentry-c++23-compat.patch deleted file mode 100644 index 8c4506b18..000000000 --- a/debian/patches/logentry-c++23-compat.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit b854bfcc70ff372cd087c068e0302d36ad86391f -Author: Ronen Friedman -Date: Sun Mar 3 16:30:59 2024 +0200 - - common: fix string creation from '0' in LogEntry - - C++23 disallows conversion from 'int' to 'string'. - That includes returning '0' from a function that returns a string. - - Signed-off-by: Ronen Friedman - ---- a/src/common/LogEntry.cc -+++ b/src/common/LogEntry.cc -@@ -73,7 +73,6 @@ - return LOG_CRIT; - default: - ceph_abort(); -- return 0; - } - } - diff --git a/debian/patches/lp1986747-fix-osd-class-dir.patch b/debian/patches/lp1986747-fix-osd-class-dir.patch deleted file mode 100644 index 0b8a3fa1d..000000000 --- a/debian/patches/lp1986747-fix-osd-class-dir.patch +++ /dev/null @@ -1,21 +0,0 @@ -Description: Fix rados-classes search path. - . - The commit 3bee4b0 changed the - base of the osd_class_dir path from CMAKE_INSTALL_FULL_LIBDIR to - CMAKE_INSTALL_LIBDIR. This change aligns the default value with the - correct value. -Author: Chris MacNaughton -Forwarded: https://github.com/ceph/ceph/pull/47676 -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1986747 - ---- a/src/common/options/osd.yaml.in -+++ b/src/common/options/osd.yaml.in -@@ -534,7 +534,7 @@ - - name: osd_class_dir - type: str - level: advanced -- default: @CMAKE_INSTALL_LIBDIR@/rados-classes -+ default: @CMAKE_INSTALL_FULL_LIBDIR@/rados-classes - fmt_desc: The class path for RADOS class plug-ins. - with_legacy: true - - name: osd_open_classes_on_start diff --git a/debian/patches/lp2080208.patch b/debian/patches/lp2080208.patch deleted file mode 100644 index fc91ff189..000000000 --- a/debian/patches/lp2080208.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 12cc90a8dac62824c9326f5a4b31744c3f2bf10b Mon Sep 17 00:00:00 2001 -From: Peter Sabaini -Date: Wed, 11 Sep 2024 16:56:50 +0200 -Subject: [PATCH] ceph-volume: fix importlib.metadata compat - -The importlib.metadata library removed older shims in releases >5.0.0 -where EntryPoints objects use .select() instead of dict-like access. - -Fixes: https://tracker.ceph.com/issues/68032 - -Signed-off-by: Peter Sabaini ---- - src/ceph-volume/ceph_volume/main.py | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/src/ceph-volume/ceph_volume/main.py b/src/ceph-volume/ceph_volume/main.py -index f8eca65ec497c..110ccf727c82e 100644 ---- a/src/ceph-volume/ceph_volume/main.py -+++ b/src/ceph-volume/ceph_volume/main.py -@@ -9,15 +9,25 @@ - # `entry_points` from `importlib.metadata` does not. - try: - from importlib.metadata import entry_points -+ from importlib.metadata import EntryPoints - - def get_entry_points(group: str): # type: ignore -- return entry_points().get(group, []) # type: ignore -+ eps = entry_points() -+ if isinstance(eps, EntryPoints) and hasattr(eps, 'select'): -+ # New importlib.metadata uses .select() -+ return eps.select(group=group) -+ else: -+ # Fallback to older EntryPoints that returns dicts -+ return eps.get(group, []) # type: ignore -+ - except ImportError: -+ # Fallback to `pkg_resources` for older versions - from pkg_resources import iter_entry_points as entry_points # type: ignore - - def get_entry_points(group: str): # type: ignore - return entry_points(group=group) # type: ignore - -+ - from ceph_volume.decorators import catches - from ceph_volume import log, devices, configuration, conf, exceptions, terminal, inventory, drive_group, activate - diff --git a/debian/patches/mgr-distutils.patch b/debian/patches/mgr-distutils.patch deleted file mode 100644 index e995a188a..000000000 --- a/debian/patches/mgr-distutils.patch +++ /dev/null @@ -1,32 +0,0 @@ -Description: Use vendored distutils from setuptools - Due to the way Python executes in the mgr process, it - avoids the distutils_hack which injects the vendored - distutils in setuptools in system modules. - . - Longer term this needs removing, but for the time - being directly reference the vendored distutils module. -Author: James Page -Forwarded: not-needed - ---- a/src/pybind/mgr/dashboard/tools.py -+++ b/src/pybind/mgr/dashboard/tools.py -@@ -9,7 +9,7 @@ - import time - import urllib - from datetime import datetime, timedelta --from distutils.util import strtobool -+from setuptools._distutils.util import strtobool - - import cherrypy - from mgr_util import build_url ---- a/src/pybind/mgr/volumes/fs/operations/pin_util.py -+++ b/src/pybind/mgr/volumes/fs/operations/pin_util.py -@@ -3,7 +3,7 @@ - import cephfs - - from ..exception import VolumeException --from distutils.util import strtobool -+from setuptools._distutils.util import strtobool - - _pin_value = { - "export": lambda x: int(x), diff --git a/debian/patches/pass-build-flags.patch b/debian/patches/pass-build-flags.patch deleted file mode 100644 index 51be7dbce..000000000 --- a/debian/patches/pass-build-flags.patch +++ /dev/null @@ -1,25 +0,0 @@ -Description: Pass build flags when building Python extensions -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/2078244 -Bug-Gentoo: https://bugs.gentoo.org/866159 -Bug-Gentoo: https://bugs.gentoo.org/866161 -Origin: gentoo, https://github.com/gentoo/gentoo/commit/c588d0c55a2facb7b98331abf3ccb2439cc34286 -Author: Patrick McLean -Last-Update: 2022-08-24 - ---- a/cmake/modules/Distutils.cmake -+++ b/cmake/modules/Distutils.cmake -@@ -93,12 +93,12 @@ - COMMAND - env - CC="${PY_CC}" -- CFLAGS="${PY_CFLAGS}" -+ CFLAGS="${PY_CFLAGS}"\ ${CMAKE_C_FLAGS} - CPPFLAGS="${PY_CPPFLAGS}" - CXX="${PY_CXX}" - LDSHARED="${PY_LDSHARED}" - OPT=\"-DNDEBUG -g -fwrapv -O2 -w\" -- LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -+ LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\ ${CMAKE_LINKER_FLAGS}\ ${CMAKE_SHARED_LINKER_FLAGS} - CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR} - CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} - ${Python3_EXECUTABLE} ${setup_py} diff --git a/debian/patches/ppc64el-fix-linking.patch b/debian/patches/ppc64el-fix-linking.patch deleted file mode 100644 index d395ed51e..000000000 --- a/debian/patches/ppc64el-fix-linking.patch +++ /dev/null @@ -1,24 +0,0 @@ -Description: Switch back to static linking - Resolves linking failures on ppc64el -Author: James Page -Forwarded: not-needed - ---- a/src/common/CMakeLists.txt -+++ b/src/common/CMakeLists.txt -@@ -230,7 +230,7 @@ - crc32c_aarch64.c) - endif(HAVE_INTEL) - --add_library(crc32 OBJECT ${crc32_srcs}) -+add_library(crc32 STATIC ${crc32_srcs}) - - if(HAVE_ARMV8_CRC) - set_target_properties(crc32 PROPERTIES ---- a/src/arch/CMakeLists.txt -+++ b/src/arch/CMakeLists.txt -@@ -9,4 +9,4 @@ - list(APPEND arch_srcs ppc.c) - endif() - --add_library(arch OBJECT ${arch_srcs}) -+add_library(arch STATIC ${arch_srcs}) diff --git a/debian/patches/riscv64-link-pthread.patch b/debian/patches/riscv64-link-pthread.patch deleted file mode 100644 index 782b6ed7b..000000000 --- a/debian/patches/riscv64-link-pthread.patch +++ /dev/null @@ -1,14 +0,0 @@ -Description: Link with -pthread instead of -lpthread to fix FTBFS on riscv64 -Forwarded: no -Last-Update: 2020-03-01 - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -25,6 +25,7 @@ - - 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 index 21df29b76..4ead786d5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,23 +1,21 @@ -lp1986747-fix-osd-class-dir.patch -enable-strsignal.patch -update-java-source-target-flags.patch -# Debian misc fixes -fix-bash-completion-location -riscv64-link-pthread.patch -# text relocation fix AARCH64 -bug1914584.patch -spdk_top-string-format.patch -spdk-fix-make-exe.patch -fix-CheckCxxAtomic-riscv64.patch -fix-mantic-misc.patch -fix-fmt-check.patch -fix-cephadm-build.patch -ppc64el-fix-linking.patch -mgr-distutils.patch -boost-url.patch -logentry-c++23-compat.patch -ceph-exporter-systemd.patch -dout-fix.patch -lp2080208.patch -pass-build-flags.patch -udev-luks-on-rbd.patch +0001-lp1986747-fix-osd-class-dir.patch +0002-enable-strsignal.patch +0003-update-java-source-target-flags.patch +0004-fix-bash-completion-location.patch +0005-riscv64-link-pthread.patch +0006-bug1914584.patch +0007-spdk_top-string-format.patch +0008-spdk-fix-make-exe.patch +0009-fix-CheckCxxAtomic-riscv64.patch +0010-fix-mantic-misc.patch +0011-fix-fmt-check.patch +0012-fix-cephadm-build.patch +0013-ppc64el-fix-linking.patch +0014-mgr-distutils.patch +0015-boost-url.patch +0016-logentry-c++23-compat.patch +0017-ceph-exporter-systemd.patch +0018-dout-fix.patch +0019-lp2080208.patch +0020-pass-build-flags.patch +0021-udev-luks-on-rbd.patch diff --git a/debian/patches/spdk-fix-make-exe.patch b/debian/patches/spdk-fix-make-exe.patch deleted file mode 100644 index 441bd00ff..000000000 --- a/debian/patches/spdk-fix-make-exe.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/cmake/modules/BuildSPDK.cmake -+++ b/cmake/modules/BuildSPDK.cmake -@@ -55,7 +55,7 @@ - # unset $CFLAGS, otherwise it will interfere with how SPDK sets - # its include directory. - # unset $LDFLAGS, otherwise SPDK will fail to mock some functions. -- BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${make_cmd} EXTRA_CFLAGS=${spdk_CFLAGS} -+ BUILD_COMMAND env -i V=1 PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${MAKE_EXECUTABLE} EXTRA_CFLAGS=${spdk_CFLAGS} - BUILD_IN_SOURCE 1 - BUILD_BYPRODUCTS ${spdk_libs} - INSTALL_COMMAND "" ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -288,7 +288,7 @@ - endif() - - CMAKE_DEPENDENT_OPTION(WITH_SPDK "Enable SPDK" OFF -- "CMAKE_SYSTEM_PROCESSOR MATCHES i386|i686|amd64|x86_64|AMD64|aarch64" OFF) -+ "CMAKE_SYSTEM_PROCESSOR MATCHES xxx" OFF) - if(WITH_SPDK) - if(NOT WITH_BLUESTORE) - message(SEND_ERROR "Please enable WITH_BLUESTORE for using SPDK") diff --git a/debian/patches/spdk_top-string-format.patch b/debian/patches/spdk_top-string-format.patch deleted file mode 100644 index b2667afb2..000000000 --- a/debian/patches/spdk_top-string-format.patch +++ /dev/null @@ -1,39 +0,0 @@ -Description: spdk_top: always use "%s"-style format for printf()-style functions - `ncuses-6.3` added printf-style function attributes and now makes - it easier to catch cases when user input is used in palce of format - string when built with CFLAGS=-Werror=format-security: - - spdk_top.c:1135:34: error: format not a string literal and no format arguments [-Werror=format-security] - 1135 | mvwprintw(win, row, col, tmp_str); - | ^~~~~~~ - - Let's wrap all the missing places with "%s" format. - -Origin: https://review.spdk.io/gerrit/c/spdk/spdk/+/10300 ---- a/src/spdk/app/spdk_top/spdk_top.c -+++ b/src/spdk/app/spdk_top/spdk_top.c -@@ -655,7 +655,7 @@ - snprintf(&tmp_str[max_str - DOTS_STR_LEN - 2], DOTS_STR_LEN, "%s", dots); - } - -- mvwprintw(win, row, col, tmp_str); -+ mvwprintw(win, row, col, "%s", tmp_str); - - refresh(); - wrefresh(win); -@@ -1861,13 +1861,13 @@ - time_last = time_now.tv_sec; - rc = get_data(); - if (rc) { -- mvprintw(g_max_row - 1, g_max_col - strlen(refresh_error) - 2, refresh_error); -+ mvprintw(g_max_row - 1, g_max_col - strlen(refresh_error) - 2, "%s", refresh_error); - } - - max_pages = refresh_tab(active_tab, current_page); - - snprintf(current_page_str, CURRENT_PAGE_STR_LEN - 1, "Page: %d/%d", current_page + 1, max_pages); -- mvprintw(g_max_row - 1, 1, current_page_str); -+ mvprintw(g_max_row - 1, 1, "%s", current_page_str); - - free_data(); - diff --git a/debian/patches/udev-luks-on-rbd.patch b/debian/patches/udev-luks-on-rbd.patch deleted file mode 100644 index 3c35e1d60..000000000 --- a/debian/patches/udev-luks-on-rbd.patch +++ /dev/null @@ -1,15 +0,0 @@ -Author: Daniel Schreiber -Description: udev rules for rbd to activate LUKS volumes (Closes: #1064970) - -diff -Naurp ceph.orig/udev/50-rbd.rules ceph/udev/50-rbd.rules ---- ceph.orig/udev/50-rbd.rules -+++ ceph/udev/50-rbd.rules -@@ -1,5 +1,8 @@ - KERNEL=="rbd[0-9]*", ENV{DEVTYPE}=="disk", PROGRAM="/usr/bin/ceph-rbdnamer %k", SYMLINK+="rbd/%c" - KERNEL=="rbd[0-9]*", ENV{DEVTYPE}=="partition", PROGRAM="/usr/bin/ceph-rbdnamer %k", SYMLINK+="rbd/%c-part%n" - -+KERNEL=="rbd*", ENV{DEVTYPE}=="partition", IMPORT{builtin}="blkid --noraid" -+KERNEL=="rbd*", ENV{DEVTYPE}=="partition", ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" -+ - # This is a placeholder, uncomment and edit as necessary - #KERNEL=="rbd[0-9]*", ENV{DEVTYPE}=="disk", ACTION=="add|change", ATTR{bdi/read_ahead_kb}="128" diff --git a/debian/patches/update-java-source-target-flags.patch b/debian/patches/update-java-source-target-flags.patch deleted file mode 100644 index f3f1766c7..000000000 --- a/debian/patches/update-java-source-target-flags.patch +++ /dev/null @@ -1,40 +0,0 @@ -Description: use --release 8 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 minimum compatibility release has been updated to 8. -Author: Tiago Stürmer Daitx -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 -@@ -15,13 +15,7 @@ - java/com/ceph/fs/CephStat.java - java/com/ceph/fs/CephStatVFS.java) - --# note: for the -source 1.7 builds, we add --# -Xlint:-options --# to get rid of the warning --# 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" $ENV{JAVA_TARGET_RELEASE} "-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}) ---- a/src/rocksdb/java/CMakeLists.txt -+++ b/src/rocksdb/java/CMakeLists.txt -@@ -4,7 +4,7 @@ - message("Please consider switching to CMake 3.11.4 or newer") - endif() - --set(CMAKE_JAVA_COMPILE_FLAGS -source 7) -+set(CMAKE_JAVA_COMPILE_FLAGS -source $ENV{JAVA_TARGET_RELEASE}) - - set(JNI_NATIVE_SOURCES - rocksjni/backup_engine_options.cc -- cgit v1.2.3