From f71bedc29d838cf0bcbf0856a4c7c47a51f79cb5 Mon Sep 17 00:00:00 2001 From: Kai Kang Date: Fri, 22 Oct 2021 18:46:28 +0800 Subject: ceph: 15.2.12 -> 15.2.15 Update ceph to latest 15.x version: * remove 0001-add-missing-include-for-atomic-bool.patch which has been fixed in upstream * update patch to support python 3.10 * add gawk to RDEPENDS that script 'rgw-gap-list-comparator' requires it Signed-off-by: Kai Kang Signed-off-by: Bruce Ashfield --- .../0001-add-missing-include-for-atomic-bool.patch | 25 ---- .../0001-cmake-add-support-for-python3.10.patch | 34 +++++ .../0001-cmake-add-support-for-python3.9.patch | 30 ----- recipes-extended/ceph/ceph_15.2.12.bb | 145 --------------------- recipes-extended/ceph/ceph_15.2.15.bb | 142 ++++++++++++++++++++ 5 files changed, 176 insertions(+), 200 deletions(-) delete mode 100644 recipes-extended/ceph/ceph/0001-add-missing-include-for-atomic-bool.patch create mode 100644 recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.10.patch delete mode 100644 recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.9.patch delete mode 100644 recipes-extended/ceph/ceph_15.2.12.bb create mode 100644 recipes-extended/ceph/ceph_15.2.15.bb diff --git a/recipes-extended/ceph/ceph/0001-add-missing-include-for-atomic-bool.patch b/recipes-extended/ceph/ceph/0001-add-missing-include-for-atomic-bool.patch deleted file mode 100644 index ffcbc583..00000000 --- a/recipes-extended/ceph/ceph/0001-add-missing-include-for-atomic-bool.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 502be73be3c3645094525aa552f5e53d8782a004 Mon Sep 17 00:00:00 2001 -From: Sakib Sajal -Date: Fri, 28 Aug 2020 19:36:19 -0400 -Subject: [PATCH] add missing include for atomic - -Signed-off-by: Sakib Sajal ---- - src/tools/rbd/action/Bench.cc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/tools/rbd/action/Bench.cc b/src/tools/rbd/action/Bench.cc -index aa6edbc1..90c551c1 100644 ---- a/src/tools/rbd/action/Bench.cc -+++ b/src/tools/rbd/action/Bench.cc -@@ -9,6 +9,7 @@ - #include "common/ceph_mutex.h" - #include "include/types.h" - #include "global/signal_handler.h" -+#include - #include - #include - #include --- -2.27.0 - diff --git a/recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.10.patch b/recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.10.patch new file mode 100644 index 00000000..94c4b8a6 --- /dev/null +++ b/recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.10.patch @@ -0,0 +1,34 @@ +From 1060f2e4362ebd6db23870d442dcd158d219ee92 Mon Sep 17 00:00:00 2001 +From: Yanfei Xu +Date: Tue, 10 Nov 2020 17:17:30 +0800 +Subject: [PATCH] cmake: add support for python 3.9 and 3.10 + +add support for python3.9. + +Signed-off-by: Yanfei Xu + +Add support for python 3.10. + +Upstream-Status: Submitted [https://github.com/ceph/ceph/pull/43630] + +Signed-off-by: Kai Kang +--- + cmake/modules/FindPython/Support.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/modules/FindPython/Support.cmake b/cmake/modules/FindPython/Support.cmake +index 6584699b79..c05bbe3306 100644 +--- a/cmake/modules/FindPython/Support.cmake ++++ b/cmake/modules/FindPython/Support.cmake +@@ -17,7 +17,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) + message (FATAL_ERROR "FindPython: INTERNAL ERROR") + endif() + if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3) +- set(_${_PYTHON_PREFIX}_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) ++ set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) + elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2) + set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) + else() +-- +2.18.2 + diff --git a/recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.9.patch b/recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.9.patch deleted file mode 100644 index d9116c4f..00000000 --- a/recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.9.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 1060f2e4362ebd6db23870d442dcd158d219ee92 Mon Sep 17 00:00:00 2001 -From: Yanfei Xu -Date: Tue, 10 Nov 2020 17:17:30 +0800 -Subject: [PATCH] cmake: add support for python3.9 - -add support for python3.9. - -Upstream-Status: Pending - -Signed-off-by: Yanfei Xu ---- - cmake/modules/FindPython/Support.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/modules/FindPython/Support.cmake b/cmake/modules/FindPython/Support.cmake -index 6584699b79..c05bbe3306 100644 ---- a/cmake/modules/FindPython/Support.cmake -+++ b/cmake/modules/FindPython/Support.cmake -@@ -17,7 +17,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) - message (FATAL_ERROR "FindPython: INTERNAL ERROR") - endif() - if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3) -- set(_${_PYTHON_PREFIX}_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) -+ set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) - elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2) - set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) - else() --- -2.18.2 - diff --git a/recipes-extended/ceph/ceph_15.2.12.bb b/recipes-extended/ceph/ceph_15.2.12.bb deleted file mode 100644 index 693b5259..00000000 --- a/recipes-extended/ceph/ceph_15.2.12.bb +++ /dev/null @@ -1,145 +0,0 @@ -SUMMARY = "User space components of the Ceph file system" -LICENSE = "LGPLv2.1 & GPLv2 & Apache-2.0 & MIT" -LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \ - file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING;md5=4eb012c221c5fd4b760029a2981a6754 \ -" -inherit cmake pkgconfig python3native python3-dir systemd -# Disable python pybind support for ceph temporary, when corss compiling pybind, -# pybind mix cmake and python setup environment, would case a lot of errors. - -SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ - file://0001-ceph-fix-build-errors-for-cross-compile.patch \ - file://0001-fix-host-library-paths-were-used.patch \ - file://ceph.conf \ - file://0001-add-missing-include-for-atomic-bool.patch \ - file://0001-cmake-add-support-for-python3.9.patch \ - file://0001-SnappyCompressor.h-fix-snappy-compiler-error.patch \ -" - -SRC_URI[sha1sum] = "9c76b298e1e659b9c5501003ac77fb28aab7823d" -SRC_URI[sha256sum] = "8710f6700de83765138df8eb4fc7a5e7c66104dd838033e0827a1850f250ac85" -SRC_URI[sha384sum] = "2a2f177e5b68f6f5d13b253a8d4daba9e956b4a79a40a4775aee288b60c612fe13b417d6baf77944c32b1181b2136f68" -SRC_URI[sha512sum] = "08266a2e9a7ca5a37e03f340873571fd012c630dd898a87241cd97c29760b2bf41fe64c8883e7b08e0f83c26245072cd26e69ecb1db02378d1ec38335ba1cd0f" - -DEPENDS = "boost bzip2 curl expat gperf-native \ - keyutils libaio libibverbs lz4 \ - nspr nss \ - oath openldap openssl \ - python3 python3-cython-native rabbitmq-c rocksdb snappy udev \ - valgrind xfsprogs zlib \ -" -SYSTEMD_SERVICE:${PN} = " \ - ceph-radosgw@.service \ - ceph-radosgw.target \ - ceph-mon@.service \ - ceph-mon.target \ - ceph-mds@.service \ - ceph-mds.target \ - ceph-osd@.service \ - ceph-osd.target \ - ceph.target \ - ceph-rbd-mirror@.service \ - ceph-rbd-mirror.target \ - ceph-volume@.service \ - ceph-mgr@.service \ - ceph-mgr.target \ - ceph-crash.service \ - rbdmap.service \ - ceph-immutable-object-cache@.service \ - ceph-immutable-object-cache.target \ -" -OECMAKE_GENERATOR = "Unix Makefiles" - -EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \ - -DWITH_FUSE=OFF \ - -DWITH_SPDK=OFF \ - -DWITH_LEVELDB=OFF \ - -DWITH_LTTNG=OFF \ - -DWITH_BABELTRACE=OFF \ - -DWITH_TESTS=OFF \ - -DWITH_MGR=OFF \ - -DWITH_MGR_DASHBOARD_FRONTEND=OFF \ - -DWITH_SYSTEM_BOOST=ON \ - -DWITH_SYSTEM_ROCKSDB=ON \ - -DWITH_RDMA=OFF \ - -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ - -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 \ - -DPython3_EXECUTABLE=${PYTHON} \ - -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \ - -DWITH_REENTRANT_STRSIGNAL=ON \ -" - -export STAGING_DIR_HOST - -do_configure:prepend () { - echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake - echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake - echo "set( PYTHON_SITEPACKAGES_DIR \"${PYTHON_SITEPACKAGES_DIR}\" )" >> ${WORKDIR}/toolchain.cmake -} - -do_install:append () { - sed -i -e 's:^#!/usr/bin/python$:&3:' \ - -e 's:${WORKDIR}.*python3:${bindir}/python3:' \ - ${D}${bindir}/ceph ${D}${bindir}/ceph-crash \ - ${D}${bindir}/ceph-volume ${D}${bindir}/ceph-volume-systemd - find ${D} -name SOURCES.txt | xargs sed -i -e 's:${WORKDIR}::' - install -d ${D}${sysconfdir}/ceph - install -m 644 ${WORKDIR}/ceph.conf ${D}${sysconfdir}/ceph/ - install -d ${D}${systemd_unitdir} - mv ${D}${libexecdir}/systemd/system ${D}${systemd_unitdir} - mv ${D}${libexecdir}/ceph/ceph-osd-prestart.sh ${D}${libdir}/ceph - mv ${D}${libexecdir}/ceph/ceph_common.sh ${D}${libdir}/ceph - # WITH_FUSE is set to OFF, remove ceph-fuse related units - rm ${D}${systemd_unitdir}/system/ceph-fuse.target ${D}${systemd_unitdir}/system/ceph-fuse@.service -} - -do_install:append:class-target () { - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d /var/lib/ceph/crash/posted 0755 root root - -" > ${D}${sysconfdir}/tmpfiles.d/ceph-placeholder.conf - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/default/volatiles - echo "d root root 0755 /var/lib/ceph/crash/posted none" > ${D}${sysconfdir}/default/volatiles/99_ceph-placeholder - fi -} - -pkg_postinst:${PN}() { - if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then - ${sysconfdir}/init.d/populate-volatile.sh update - fi -} - -FILES:${PN} += "\ - ${libdir}/rados-classes/*.so.* \ - ${libdir}/ceph/compressor/*.so \ - ${libdir}/rados-classes/*.so \ - ${libdir}/ceph/*.so \ -" - -FILES:${PN} += " \ - /etc/tmpfiles.d/ceph-placeholder.conf \ - /etc/default/volatiles/99_ceph-placeholder \ -" - -FILES:${PN}-python = "\ - ${PYTHON_SITEPACKAGES_DIR}/* \ -" -RDEPENDS:${PN} += "\ - python3-core \ - python3-misc \ - python3-modules \ - python3-prettytable \ - ${PN}-python \ -" -COMPATIBLE_HOST = "(x86_64).*" -PACKAGES += " \ - ${PN}-python \ -" -INSANE_SKIP:${PN}-python += "ldflags" -INSANE_SKIP:${PN} += "dev-so" -CCACHE_DISABLE = "1" - -CVE_PRODUCT = "ceph ceph_storage ceph_storage_mon ceph_storage_osd" diff --git a/recipes-extended/ceph/ceph_15.2.15.bb b/recipes-extended/ceph/ceph_15.2.15.bb new file mode 100644 index 00000000..0d9bae02 --- /dev/null +++ b/recipes-extended/ceph/ceph_15.2.15.bb @@ -0,0 +1,142 @@ +SUMMARY = "User space components of the Ceph file system" +LICENSE = "LGPLv2.1 & GPLv2 & Apache-2.0 & MIT" +LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \ + file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING;md5=4eb012c221c5fd4b760029a2981a6754 \ +" +inherit cmake pkgconfig python3native python3-dir systemd +# Disable python pybind support for ceph temporary, when corss compiling pybind, +# pybind mix cmake and python setup environment, would case a lot of errors. + +SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ + file://0001-ceph-fix-build-errors-for-cross-compile.patch \ + file://0001-fix-host-library-paths-were-used.patch \ + file://ceph.conf \ + file://0001-cmake-add-support-for-python3.10.patch \ + file://0001-SnappyCompressor.h-fix-snappy-compiler-error.patch \ +" + +SRC_URI[sha256sum] = "5dccdaff2ebe18d435b32bfc06f8b5f474bf6ac0432a6a07d144b7c56700d0bf" + +DEPENDS = "boost bzip2 curl expat gperf-native \ + keyutils libaio libibverbs lz4 \ + nspr nss \ + oath openldap openssl \ + python3 python3-cython-native rabbitmq-c rocksdb snappy udev \ + valgrind xfsprogs zlib \ +" +SYSTEMD_SERVICE:${PN} = " \ + ceph-radosgw@.service \ + ceph-radosgw.target \ + ceph-mon@.service \ + ceph-mon.target \ + ceph-mds@.service \ + ceph-mds.target \ + ceph-osd@.service \ + ceph-osd.target \ + ceph.target \ + ceph-rbd-mirror@.service \ + ceph-rbd-mirror.target \ + ceph-volume@.service \ + ceph-mgr@.service \ + ceph-mgr.target \ + ceph-crash.service \ + rbdmap.service \ + ceph-immutable-object-cache@.service \ + ceph-immutable-object-cache.target \ +" +OECMAKE_GENERATOR = "Unix Makefiles" + +EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \ + -DWITH_FUSE=OFF \ + -DWITH_SPDK=OFF \ + -DWITH_LEVELDB=OFF \ + -DWITH_LTTNG=OFF \ + -DWITH_BABELTRACE=OFF \ + -DWITH_TESTS=OFF \ + -DWITH_MGR=OFF \ + -DWITH_MGR_DASHBOARD_FRONTEND=OFF \ + -DWITH_SYSTEM_BOOST=ON \ + -DWITH_SYSTEM_ROCKSDB=ON \ + -DWITH_RDMA=OFF \ + -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ + -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 \ + -DPython3_EXECUTABLE=${PYTHON} \ + -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \ + -DWITH_REENTRANT_STRSIGNAL=ON \ +" + +export STAGING_DIR_HOST + +do_configure:prepend () { + echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake + echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake + echo "set( PYTHON_SITEPACKAGES_DIR \"${PYTHON_SITEPACKAGES_DIR}\" )" >> ${WORKDIR}/toolchain.cmake +} + +do_install:append () { + sed -i -e 's:^#!/usr/bin/python$:&3:' \ + -e 's:${WORKDIR}.*python3:${bindir}/python3:' \ + ${D}${bindir}/ceph ${D}${bindir}/ceph-crash \ + ${D}${bindir}/ceph-volume ${D}${bindir}/ceph-volume-systemd + find ${D} -name SOURCES.txt | xargs sed -i -e 's:${WORKDIR}::' + install -d ${D}${sysconfdir}/ceph + install -m 644 ${WORKDIR}/ceph.conf ${D}${sysconfdir}/ceph/ + install -d ${D}${systemd_unitdir} + mv ${D}${libexecdir}/systemd/system ${D}${systemd_unitdir} + mv ${D}${libexecdir}/ceph/ceph-osd-prestart.sh ${D}${libdir}/ceph + mv ${D}${libexecdir}/ceph/ceph_common.sh ${D}${libdir}/ceph + # WITH_FUSE is set to OFF, remove ceph-fuse related units + rm ${D}${systemd_unitdir}/system/ceph-fuse.target ${D}${systemd_unitdir}/system/ceph-fuse@.service +} + +do_install:append:class-target () { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /var/lib/ceph/crash/posted 0755 root root - -" > ${D}${sysconfdir}/tmpfiles.d/ceph-placeholder.conf + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/default/volatiles + echo "d root root 0755 /var/lib/ceph/crash/posted none" > ${D}${sysconfdir}/default/volatiles/99_ceph-placeholder + fi +} + +pkg_postinst:${PN}() { + if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then + ${sysconfdir}/init.d/populate-volatile.sh update + fi +} + +FILES:${PN} += "\ + ${libdir}/rados-classes/*.so.* \ + ${libdir}/ceph/compressor/*.so \ + ${libdir}/rados-classes/*.so \ + ${libdir}/ceph/*.so \ +" + +FILES:${PN} += " \ + /etc/tmpfiles.d/ceph-placeholder.conf \ + /etc/default/volatiles/99_ceph-placeholder \ +" + +FILES:${PN}-python = "\ + ${PYTHON_SITEPACKAGES_DIR}/* \ +" +RDEPENDS:${PN} += "\ + python3-core \ + python3-misc \ + python3-modules \ + python3-prettytable \ + ${PN}-python \ + gawk \ +" +COMPATIBLE_HOST = "(x86_64).*" +PACKAGES += " \ + ${PN}-python \ +" +INSANE_SKIP:${PN}-python += "ldflags" +INSANE_SKIP:${PN} += "dev-so" +CCACHE_DISABLE = "1" + +CVE_PRODUCT = "ceph ceph_storage ceph_storage_mon ceph_storage_osd" -- cgit v1.2.3-54-g00ecf