From: Jakub Bogusz Date: Sat, 30 Jul 2022 07:29:16 +0000 (+0200) Subject: - started update to 17.2.2 (WIP, saving work) X-Git-Tag: auto/th/ceph-17.2.3-1~9 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fceph.git;a=commitdiff_plain;h=f8f6a16fa9a1cf9804c1bca7c3a026f9712280fc - started update to 17.2.2 (WIP, saving work) --- diff --git a/ceph-arrow-pld.patch b/ceph-arrow-pld.patch new file mode 100644 index 0000000..ee5ca80 --- /dev/null +++ b/ceph-arrow-pld.patch @@ -0,0 +1,11 @@ +--- ceph-17.2.2/src/arrow/cpp/cmake_modules/SetupCxxFlags.cmake.orig 2021-11-10 03:04:48.000000000 +0100 ++++ ceph-17.2.2/src/arrow/cpp/cmake_modules/SetupCxxFlags.cmake 2022-07-28 17:43:21.652954490 +0200 +@@ -626,7 +626,7 @@ elseif("${CMAKE_BUILD_TYPE}" STREQUAL "P + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS_PROFILE_BUILD}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAGS_PROFILE_BUILD}") + else() +- message(FATAL_ERROR "Unknown build type: ${CMAKE_BUILD_TYPE}") ++ + endif() + + message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}") diff --git a/ceph-cmake-static.patch b/ceph-cmake-static.patch new file mode 100644 index 0000000..e912c5e --- /dev/null +++ b/ceph-cmake-static.patch @@ -0,0 +1,38 @@ +https://src.fedoraproject.org/rpms/ceph/raw/rawhide/f/0018-src-rgw-store-dbstore-CMakeLists.txt.patch +--- ceph-17.1.0/src/rgw/store/dbstore/sqlite/CMakeLists.txt.orig 2022-03-01 08:19:04.974902872 -0500 ++++ ceph-17.1.0/src/rgw/store/dbstore/sqlite/CMakeLists.txt 2022-03-11 07:55:16.236261471 -0500 +@@ -12,5 +12,5 @@ + set(SQLITE_COMPILE_FLAGS "-DSQLITE_THREADSAFE=1") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SQLITE_COMPILE_FLAGS}") + +-add_library(sqlite_db ${sqlite_db_srcs}) ++add_library(sqlite_db STATIC ${sqlite_db_srcs}) + target_link_libraries(sqlite_db sqlite3 dbstore_lib rgw_common) +--- ceph-17.1.0/src/rgw/store/dbstore/CMakeLists.txt.orig 2022-02-28 14:11:49.987077811 -0500 ++++ ceph-17.1.0/src/rgw/store/dbstore/CMakeLists.txt 2022-03-11 08:40:13.409682698 -0500 +@@ -16,7 +16,7 @@ + dbstore_mgr.cc + ) + +-add_library(dbstore_lib ${dbstore_srcs}) ++add_library(dbstore_lib STATIC ${dbstore_srcs}) + target_include_directories(dbstore_lib PUBLIC "${CMAKE_SOURCE_DIR}/src/fmt/include") + target_include_directories(dbstore_lib PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw") + set(link_targets spawn) +@@ -38,6 +38,7 @@ + + # add pthread library + set (CMAKE_LINK_LIBRARIES ${CMAKE_LINK_LIBRARIES} pthread) ++set (CMAKE_LINK_LIBRARIES ${CMAKE_LINK_LIBRARIES} global) + + find_package(gtest QUIET) + if(WITH_TESTS) +@@ -47,7 +48,7 @@ + endif() + + include_directories(${CMAKE_INCLUDE_DIR}) +-add_library(dbstore ${dbstore_mgr_srcs}) ++add_library(dbstore STATIC ${dbstore_mgr_srcs}) + target_link_libraries(dbstore ${CMAKE_LINK_LIBRARIES}) + + # testing purpose diff --git a/ceph-fcgi.patch b/ceph-fcgi.patch deleted file mode 100644 index bc62db1..0000000 --- a/ceph-fcgi.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- ceph-12.2.13/src/rgw/CMakeLists.txt.orig 2020-01-30 21:52:36.000000000 +0100 -+++ ceph-12.2.13/src/rgw/CMakeLists.txt 2020-05-28 21:27:33.099627687 +0200 -@@ -135,6 +135,7 @@ - - - if (WITH_RADOSGW_FCGI_FRONTEND) -+ include_directories(SYSTEM ${FCGI_INCLUDE_DIR}) - list(APPEND rgw_a_srcs rgw_fcgi.cc) - endif() - diff --git a/ceph.spec b/ceph.spec index 5d8bafa..3ea7edc 100644 --- a/ceph.spec +++ b/ceph.spec @@ -42,25 +42,23 @@ Summary: User space components of the Ceph file system Summary(pl.UTF-8): Działające w przestrzeni użytkownika elementy systemu plików Ceph Name: ceph -Version: 16.2.9 +Version: 17.2.2 Release: 1 License: LGPL v2.1 (libraries), GPL v2 (some programs) Group: Base Source0: http://download.ceph.com/tarballs/%{name}-%{version}.tar.gz -# Source0-md5: d823195299c0950659343fc6ad39aa1b +# Source0-md5: 739ca7bdbdb6463db94e869ad78826d7 Source1: ceph.sysconfig Source3: ceph.tmpfiles Patch0: %{name}-python.patch Patch1: %{name}-fio.patch -Patch2: %{name}-fcgi.patch -Patch3: string-includes.patch +Patch2: %{name}-cmake-static.patch +Patch3: %{name}-arrow-pld.patch Patch4: no-virtualenvs.patch -Patch5: system-zstd.patch Patch6: types.patch Patch7: use-provided-cpu-flag-values.patch Patch8: ix86-no-asm.patch Patch9: long-int-time_t.patch -Patch10: fuse3-api.patch Patch11: %{name}-liburing.patch URL: https://ceph.io/ %{?with_babeltrace:BuildRequires: babeltrace-devel} @@ -117,7 +115,7 @@ BuildRequires: openldap-devel BuildRequires: openssl-devel >= 1.1 BuildRequires: perl-base BuildRequires: pkgconfig -%{?with_pmem:BuildRequires: pmdk-devel >= 1.6.1} +%{?with_pmem:BuildRequires: pmdk-devel >= 1.10.0} BuildRequires: python3 >= 1:3.2 BuildRequires: python3-devel >= 1:3.2 %{?with_tests:BuildRequires: python3-tox >= 2.9.1} @@ -305,14 +303,12 @@ uruchamiania demonów. %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %ifarch %{ix86} %patch9 -p1 %endif -%patch10 -p1 %patch11 -p1 %{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' \ @@ -394,7 +390,6 @@ install -d $RPM_BUILD_ROOT%{_localstatedir}/{lib/ceph/{tmp,mon,osd,mds,mgr,rados # sanitize paths; no config options for cmake %{__mv} $RPM_BUILD_ROOT/etc/init.d $RPM_BUILD_ROOT/etc/rc.d -%{__mv} $RPM_BUILD_ROOT%{_libexecdir}/systemd/system/* $RPM_BUILD_ROOT%{systemdunitdir} %{__mv} $RPM_BUILD_ROOT%{_sbindir}/mount.* $RPM_BUILD_ROOT/sbin cp -p src/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ceph @@ -502,6 +497,7 @@ fi %attr(755,root,root) %{_bindir}/cephfs-mirror %attr(755,root,root) %{_bindir}/cephfs-table-tool %attr(755,root,root) %{_bindir}/cephfs-top +%attr(755,root,root) %{_bindir}/crushdiff %attr(755,root,root) %{_bindir}/crushtool %attr(755,root,root) %{_bindir}/librados-config %attr(755,root,root) %{_bindir}/monmaptool @@ -538,6 +534,12 @@ fi %attr(755,root,root) %{_libdir}/ceph/crypto/libceph_crypto_isal.so* %endif %attr(755,root,root) %{_libdir}/ceph/crypto/libceph_crypto_openssl.so* +%dir %{_libdir}/ceph/denc +%attr(755,root,root) %{_libdir}/ceph/denc/denc-mod-cephfs.so +%attr(755,root,root) %{_libdir}/ceph/denc/denc-mod-common.so +%attr(755,root,root) %{_libdir}/ceph/denc/denc-mod-osd.so +%attr(755,root,root) %{_libdir}/ceph/denc/denc-mod-rbd.so +%attr(755,root,root) %{_libdir}/ceph/denc/denc-mod-rgw.so %dir %{_libdir}/ceph/erasure-code %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_clay.so* %ifarch %{x8664} @@ -567,7 +569,6 @@ fi %attr(755,root,root) %{_libdir}/rados-classes/libcls_fifo.so* %attr(755,root,root) %{_libdir}/rados-classes/libcls_hello.so* %attr(755,root,root) %{_libdir}/rados-classes/libcls_journal.so* -%attr(755,root,root) %{_libdir}/rados-classes/libcls_kvs.so* %attr(755,root,root) %{_libdir}/rados-classes/libcls_lock.so* %attr(755,root,root) %{_libdir}/rados-classes/libcls_log.so* %attr(755,root,root) %{_libdir}/rados-classes/libcls_lua.so* @@ -579,6 +580,7 @@ fi %attr(755,root,root) %{_libdir}/rados-classes/libcls_rgw.so* %attr(755,root,root) %{_libdir}/rados-classes/libcls_rgw_gc.so* %attr(755,root,root) %{_libdir}/rados-classes/libcls_sdk.so* +%attr(755,root,root) %{_libdir}/rados-classes/libcls_test_remote_reads.so* %attr(755,root,root) %{_libdir}/rados-classes/libcls_timeindex.so* %attr(755,root,root) %{_libdir}/rados-classes/libcls_user.so* %attr(755,root,root) %{_libdir}/rados-classes/libcls_version.so* @@ -594,7 +596,6 @@ fi %{_mandir}/man8/ceph-conf.8* %{_mandir}/man8/ceph-create-keys.8* %{_mandir}/man8/ceph-dencoder.8* -%{_mandir}/man8/ceph-deploy.8* %{_mandir}/man8/ceph-diff-sorted.8* %{_mandir}/man8/ceph-immutable-object-cache.8* %{_mandir}/man8/ceph-kvstore-tool.8* @@ -610,6 +611,7 @@ fi %{_mandir}/man8/cephadm.8* %{_mandir}/man8/cephfs-mirror.8* %{_mandir}/man8/cephfs-top.8* +%{_mandir}/man8/crushdiff.8* %{_mandir}/man8/crushtool.8* %{_mandir}/man8/librados-config.8* %{_mandir}/man8/monmaptool.8* diff --git a/fuse3-api.patch b/fuse3-api.patch deleted file mode 100644 index f7b25ce..0000000 --- a/fuse3-api.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ceph-16.2.7/src/client/fuse_ll.cc~ 2021-12-07 17:15:49.000000000 +0100 -+++ ceph-16.2.7/src/client/fuse_ll.cc 2022-02-13 13:00:03.661557137 +0100 -@@ -247,7 +247,7 @@ - } - - static void fuse_ll_forget(fuse_req_t req, fuse_ino_t ino, -- long unsigned nlookup) -+ uint64_t nlookup) - { - CephFuse::Handle *cfuse = fuse_ll_req_prepare(req); - cfuse->client->ll_forget(cfuse->iget(ino), nlookup+1); diff --git a/no-virtualenvs.patch b/no-virtualenvs.patch index 87eddbd..75c4dce 100644 --- a/no-virtualenvs.patch +++ b/no-virtualenvs.patch @@ -1,22 +1,33 @@ -diff --git a/cmake/modules/AddCephTest.cmake b/cmake/modules/AddCephTest.cmake -index d26d003c779..bc962e3aa73 100644 --- a/cmake/modules/AddCephTest.cmake +++ b/cmake/modules/AddCephTest.cmake -@@ -68,14 +68,6 @@ function(add_tox_test name) - list(APPEND tox_envs py3) +@@ -70,17 +70,6 @@ function(add_tox_test name) endif() string(REPLACE ";" "," tox_envs "${tox_envs}") -- add_custom_command( -- OUTPUT ${venv_path}/bin/activate -- COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python="${Python3_EXECUTABLE}" ${venv_path} -- WORKING_DIRECTORY ${tox_path} -- COMMENT "preparing venv for ${name}") -- add_custom_target(${name}-venv -- DEPENDS ${venv_path}/bin/activate) -- add_dependencies(tests ${name}-venv) add_test( +- NAME setup-venv-for-${name} +- COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${Python3_EXECUTABLE} ${venv_path} +- WORKING_DIRECTORY ${tox_path}) +- set_tests_properties(setup-venv-for-${name} PROPERTIES +- FIXTURES_SETUP venv-for-${name}) +- add_test( +- NAME teardown-venv-for-${name} +- COMMAND ${CMAKE_COMMAND} -E remove_directory ${venv_path}) +- set_tests_properties(teardown-venv-for-${name} PROPERTIES +- FIXTURES_CLEANUP venv-for-${name}) +- add_test( NAME ${test_name} COMMAND ${CMAKE_SOURCE_DIR}/src/script/run_tox.sh + --source-dir ${CMAKE_SOURCE_DIR} +@@ -88,8 +77,7 @@ function(add_tox_test name) + --tox-path ${tox_path} + --tox-envs ${tox_envs} + --venv-path ${venv_path}) +- set_tests_properties(${test_name} PROPERTIES +- FIXTURES_REQUIRED venv-for-${name}) ++ set_tests_properties(${test_name} PROPERTIES) + set_property( + TEST ${test_name} + PROPERTY ENVIRONMENT diff --git a/src/ceph-volume/CMakeLists.txt b/src/ceph-volume/CMakeLists.txt index 9166553dc73..9a6c87595b9 100644 --- a/src/ceph-volume/CMakeLists.txt @@ -44,21 +55,38 @@ index 9166553dc73..9a6c87595b9 100644 add_custom_target(ceph-volume-venv-setup DEPENDS ${CEPH_VOLUME_VIRTUALENV}/bin/ceph-volume) -diff --git a/src/pybind/mgr/dashboard/CMakeLists.txt b/src/pybind/mgr/dashboard/CMakeLists.txt -index 9b3432213a0..973b185f5de 100644 ---- a/src/pybind/mgr/dashboard/CMakeLists.txt -+++ b/src/pybind/mgr/dashboard/CMakeLists.txt -@@ -5,9 +5,6 @@ function(add_npm_command) +--- a/src/pybind/mgr/dashboard/frontend/CMakeLists.txt ++++ b/src/pybind/mgr/dashboard/frontend/CMakeLists.txt +@@ -5,17 +5,10 @@ function(add_npm_command) set(multi_kw COMMAND DEPENDS) cmake_parse_arguments(NC "${options}" "${single_kw}" "${multi_kw}" ${ARGN}) string(REPLACE ";" " " command "${NC_COMMAND}") - if(NC_NODEENV) -- string(REGEX REPLACE "^(.*(npm|npx) .*)$" ". ${mgr-dashboard-nodeenv-dir}/bin/activate && \\1 && deactivate" command ${command}) +- string(REGEX REPLACE +- "^(([^ ]+=[^ ]+ )*npm .*)$" +- ". ${mgr-dashboard-nodeenv-dir}/bin/activate && \\1 && deactivate" +- command ${command}) +- else() + string(REGEX REPLACE + "^([^ ]=[^ ] )*npm (.*)$" + "\\1${NPM_EXECUTABLE} \\2" + command ${command}) - endif() string(REPLACE " " ";" command "${command}") add_custom_command( OUTPUT "${NC_OUTPUT}" -@@ -51,11 +48,8 @@ else(WITH_SYSTEM_NPM) +@@ -36,9 +29,7 @@ function(add_npm_options) + list(GET opt 1 value) + list(APPEND commands + COMMAND +- . ${NC_NODEENV_DIR}/bin/activate && +- npm config set ${key} ${value} --userconfig ${NC_NODEENV_DIR}/.npmrc && +- deactivate) ++ npm config set ${key} ${value} --userconfig ${NC_NODEENV_DIR}/.npmrc + endforeach() + add_custom_target(${NC_TARGET} + ${commands} +@@ -60,11 +51,8 @@ else(WITH_SYSTEM_NPM) set(node_mirror_opt "--mirror=$ENV{NODE_MIRROR}") endif() add_custom_command( @@ -68,7 +96,7 @@ index 9b3432213a0..973b185f5de 100644 - COMMAND ${mgr-dashboard-nodeenv-dir}/bin/nodeenv --verbose ${node_mirror_opt} -p --node=12.18.2 - COMMAND mkdir ${mgr-dashboard-nodeenv-dir}/.npm + OUTPUT "/bin/npm" -+ COMMAND /bin/nodeenv ${node_mirror_opt} -p --node=12.18.2 ++ COMMAND /bin/nodeenv --verbose ${node_mirror_opt} -p --node=12.18.2 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "dashboard nodeenv is being installed" - ) + COMMENT "dashboard nodeenv is being installed") + if(DEFINED ENV{NPM_REGISTRY}) diff --git a/string-includes.patch b/string-includes.patch deleted file mode 100644 index f703a8f..0000000 --- a/string-includes.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit ebf3a0398f18eab67d2ba25e6a10b41ff140f6a4 -Author: Duncan Bellamy -Date: Fri May 21 06:30:10 2021 +0100 - - rgw/rgw_string.h: add missing includes for alpine and boost 1.75 - alpine needs: string, stdexcept - - Fixes: https://tracker.ceph.com/issues/50924 - Signed-off-by: Duncan Bellamy - -diff --git a/src/rgw/rgw_string.h b/src/rgw/rgw_string.h -index 257daa9c1fe..90e64f98a25 100644 ---- a/src/rgw/rgw_string.h -+++ b/src/rgw/rgw_string.h -@@ -8,6 +8,8 @@ - #include - #include - #include -+#include -+#include - - #include - diff --git a/system-zstd.patch b/system-zstd.patch deleted file mode 100644 index c50cca4..0000000 --- a/system-zstd.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt -index b53b0d9444..5bf5796da2 100644 ---- a/src/compressor/zstd/CMakeLists.txt -+++ b/src/compressor/zstd/CMakeLists.txt -@@ -1,34 +1,11 @@ - # zstd - --# libzstd - build it statically --set(ZSTD_C_FLAGS "-fPIC -Wno-unused-variable -O3") -- --include(ExternalProject) --ExternalProject_Add(zstd_ext -- SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/zstd/build/cmake -- CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -- -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -- -DCMAKE_C_FLAGS=${ZSTD_C_FLAGS} -- -DCMAKE_AR=${CMAKE_AR} -- -DCMAKE_POSITION_INDEPENDENT_CODE=${ENABLE_SHARED} -- -G${CMAKE_GENERATOR} -- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/libzstd -- BUILD_COMMAND ${CMAKE_COMMAND} --build --target libzstd_static -- BUILD_BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/libzstd/lib/libzstd.a" -- INSTALL_COMMAND "true") -- --add_library(zstd STATIC IMPORTED) --set_target_properties(zstd PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/src/zstd/lib" -- IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/libzstd/lib/libzstd.a") --add_dependencies(zstd zstd_ext) -- - set(zstd_sources - CompressionPluginZstd.cc - ) - - add_library(ceph_zstd SHARED ${zstd_sources}) --target_link_libraries(ceph_zstd PRIVATE zstd $<$:ceph-common>) -+target_link_libraries(ceph_zstd zstd) - set_target_properties(ceph_zstd PROPERTIES - VERSION 2.0.0 - SOVERSION 2 diff --git a/types.patch b/types.patch index 3df886a..5427d9f 100644 --- a/types.patch +++ b/types.patch @@ -1,21 +1,3 @@ ---- ceph-16.2.7/src/log/LogClock.h~ 2021-12-07 17:15:49.000000000 +0100 -+++ ceph-16.2.7/src/log/LogClock.h 2022-02-12 18:57:04.434978131 +0100 -@@ -8,14 +8,11 @@ - #include - #include - #include -+#include - - #include "include/ceph_assert.h" - #include "common/ceph_time.h" - --#ifndef suseconds_t --typedef long suseconds_t; --#endif -- - namespace ceph { - namespace logging { - namespace _logclock { --- ceph-16.2.7/src/SimpleRADOSStriper.cc~ 2021-12-07 17:15:49.000000000 +0100 +++ ceph-16.2.7/src/SimpleRADOSStriper.cc 2022-02-12 21:59:28.261721940 +0100 @@ -140,7 +140,7 @@ @@ -27,17 +9,6 @@ { d(5) << size << dendl; ---- ceph-16.2.7/src/common/buffer.cc~ 2021-12-07 17:15:49.000000000 +0100 -+++ ceph-16.2.7/src/common/buffer.cc 2022-02-12 19:45:24.576619502 +0100 -@@ -2272,7 +2272,7 @@ - - void ceph::buffer::list::page_aligned_appender::_refill(size_t len) { - const size_t alloc = \ -- std::max((size_t)min_alloc, (len + CEPH_PAGE_SIZE - 1) & CEPH_PAGE_MASK); -+ std::max((size_t)min_alloc, (size_t)((len + CEPH_PAGE_SIZE - 1) & CEPH_PAGE_MASK)); - auto new_back = \ - ptr_node::create(buffer::create_page_aligned(alloc)); - new_back->set_length(0); // unused, so far. --- ceph-16.2.7/src/os/bluestore/BlueFS.cc~ 2021-12-07 17:15:49.000000000 +0100 +++ ceph-16.2.7/src/os/bluestore/BlueFS.cc 2022-02-12 21:40:54.182516511 +0100 @@ -3799,7 +3799,7 @@ @@ -49,17 +20,6 @@ }; if (alloc[dev]) { alloc[dev]->dump(iterated_allocation); ---- ceph-16.2.7/src/s3select/include/s3select_functions.h~ 2020-06-23 03:08:18.000000000 +0200 -+++ ceph-16.2.7/src/s3select/include/s3select_functions.h 2022-02-12 22:04:21.710093616 +0100 -@@ -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) - { --- ceph-16.2.7/src/librbd/object_map/DiffRequest.cc.orig 2021-12-07 17:15:49.000000000 +0100 +++ ceph-16.2.7/src/librbd/object_map/DiffRequest.cc 2022-02-12 22:17:55.163378523 +0100 @@ -187,7 +187,7 @@